commit 6fa1dc50bedb4a391a786fdd30fb3814a9d11f2d
parent 2bb41367bca49329c2ece74096e50fc9a422039d
Author: Nils Mittler <nmittler@bcf-pc03.desktop>
Date: Mon, 20 Feb 2023 16:51:09 +0100
Apply Admin Session Lifetime to JWT
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/auth.rs b/src/auth.rs
@@ -241,7 +241,7 @@ pub fn generate_admin_claims() -> BasicJwtClaims {
let time_now = Utc::now().naive_utc();
BasicJwtClaims {
nbf: time_now.timestamp(),
- exp: (time_now + Duration::minutes(20)).timestamp(),
+ exp: (time_now + Duration::minutes(CONFIG.admin_cookie_lifetime())).timestamp(),
iss: JWT_ADMIN_ISSUER.to_string(),
sub: "admin_panel".to_string(),
}