diff options
author | Nils Mittler <[email protected]> | 2023-02-20 16:51:09 +0100 |
---|---|---|
committer | Daniel GarcĂa <[email protected]> | 2023-02-21 21:37:24 +0100 |
commit | 6fa1dc50bedb4a391a786fdd30fb3814a9d11f2d (patch) | |
tree | 9645ca78d71fa3c0fd5ebb0c59b826227be88192 | |
parent | 2bb41367bca49329c2ece74096e50fc9a422039d (diff) | |
download | vaultwarden-6fa1dc50bedb4a391a786fdd30fb3814a9d11f2d.tar.gz vaultwarden-6fa1dc50bedb4a391a786fdd30fb3814a9d11f2d.zip |
Apply Admin Session Lifetime to JWT
-rw-r--r-- | src/auth.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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(), } |