token-handler: handle authorization through Epita CRI LDAP

This commit is contained in:
nemunaire 2019-03-13 11:19:51 +01:00
commit 38902bee8d
6 changed files with 194 additions and 12 deletions

View file

@ -102,6 +102,16 @@ CREATE TABLE IF NOT EXISTS student_pong(
time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY(id_student) REFERENCES students(id_student)
) DEFAULT CHARACTER SET = utf8 COLLATE = utf8_bin;
`); err != nil {
return err
}
if _, err := db.Exec(`
CREATE TABLE IF NOT EXISTS student_sessions(
id_session BLOB(255) NOT NULL,
id_student INTEGER NOT NULL,
time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY(id_student) REFERENCES students(id_student)
) DEFAULT CHARACTER SET = utf8 COLLATE = utf8_bin;
`); err != nil {
return err
}