commit 2eb4f290a57764ecaac75e7f6a7c89a557ee7c94
parent 9a5f3a501563a3a314c71619f893db3eed14333e
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(),
}