From 6fa1dc50bedb4a391a786fdd30fb3814a9d11f2d Mon Sep 17 00:00:00 2001 From: Nils Mittler Date: Mon, 20 Feb 2023 16:51:09 +0100 Subject: [PATCH] Apply Admin Session Lifetime to JWT --- src/auth.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/auth.rs b/src/auth.rs index 03f14cb8..6f265e9f 100644 --- 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(), }