stages/authentiactor_validate: cookies (#2978)

* stages/authenticator_validate: rewrite to use signed jwt cookie + expiry as MFA threshold

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>

* add more tests

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>

* add more tests

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens L
2022-05-29 19:47:34 +02:00
committed by GitHub
parent fb25b28976
commit 9f2529c886
9 changed files with 307 additions and 123 deletions

View File

@ -31,10 +31,11 @@ export function me(): Promise<SessionUser> {
avatar: "",
uid: "",
username: "",
name: ""
name: "",
settings: {},
}
};
if (ex.status === 401 || ex.status === 403) {
if (ex.response.status === 401 || ex.response.status === 403) {
window.location.assign("/");
}
return defaultUser;