refreshable tokens

This commit is contained in:
2021-09-03 19:06:04 +02:00
parent 5b1209679b
commit b2e1ecab2b
4 changed files with 284 additions and 30 deletions

View File

@ -12,6 +12,14 @@ create table user_t (
expiry integer not null default 600
);
create sequence token_s start with 1 increment by 1;
create table token_t (
id integer primary key not null default nextval('token_s'),
"user" integer not null references user_t (id),
salt varchar(64) not null,
valid boolean not null default true
);
create sequence claim_s start with 1 increment by 1;
create table claim_t (
id integer primary key not null default nextval('claim_s'),