token-validator: wg tunnel API interface
This commit is contained in:
parent
38902bee8d
commit
ab40917285
4 changed files with 241 additions and 14 deletions
|
|
@ -112,6 +112,18 @@ CREATE TABLE IF NOT EXISTS student_sessions(
|
|||
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_tunnel_tokens(
|
||||
token BLOB(255) NOT NULL,
|
||||
token_text CHAR(10) NOT NULL,
|
||||
id_student INTEGER NOT NULL,
|
||||
time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
pubkey BLOB(50) DEFAULT NULL,
|
||||
FOREIGN KEY(id_student) REFERENCES students(id_student)
|
||||
) DEFAULT CHARACTER SET = utf8 COLLATE = utf8_bin;
|
||||
`); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue