aboutsummaryrefslogtreecommitdiff
path: root/src/auth.rs
diff options
context:
space:
mode:
authorNils Mittler <[email protected]>2023-02-20 16:51:09 +0100
committerNils Mittler <[email protected]>2023-02-20 16:51:09 +0100
commit2eb4f290a57764ecaac75e7f6a7c89a557ee7c94 (patch)
treeb6f600b3bbdffc52dc6721727e1f38866c2c8940 /src/auth.rs
parent9a5f3a501563a3a314c71619f893db3eed14333e (diff)
downloadvaultwarden-2eb4f290a57764ecaac75e7f6a7c89a557ee7c94.tar.gz
vaultwarden-2eb4f290a57764ecaac75e7f6a7c89a557ee7c94.zip
Apply Admin Session Lifetime to JWT
Diffstat (limited to 'src/auth.rs')
-rw-r--r--src/auth.rs2
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(),
}