mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2024-11-21 20:35:28 +03:00
Apply Admin Session Lifetime to JWT
This commit is contained in:
parent
9a5f3a5015
commit
2eb4f290a5
1 changed files with 1 additions and 1 deletions
|
@ -241,7 +241,7 @@ pub fn generate_admin_claims() -> BasicJwtClaims {
|
||||||
let time_now = Utc::now().naive_utc();
|
let time_now = Utc::now().naive_utc();
|
||||||
BasicJwtClaims {
|
BasicJwtClaims {
|
||||||
nbf: time_now.timestamp(),
|
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(),
|
iss: JWT_ADMIN_ISSUER.to_string(),
|
||||||
sub: "admin_panel".to_string(),
|
sub: "admin_panel".to_string(),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue