Delegate session lifetime to actix-identity crate

This commit is contained in:
2022-04-02 17:17:54 +02:00
parent cb4daa1112
commit 9e72e6a044
4 changed files with 15 additions and 43 deletions

View File

@@ -9,16 +9,13 @@ pub const DEFAULT_ADMIN_PASSWORD: &str = "admin";
pub const APP_NAME: &str = "Basic OIDC";
/// Maximum session duration after inactivity, in seconds
pub const MAX_INACTIVITY_DURATION: u64 = 60 * 30;
pub const MAX_INACTIVITY_DURATION: i64 = 60 * 30;
/// Minimum interval between each last activity record in session
pub const MIN_ACTIVITY_RECORD_TIME: u64 = 10;
/// Maximum session duration (6 hours)
pub const MAX_SESSION_DURATION: i64 = 3600 * 6;
/// Minimum password length
pub const MIN_PASS_LEN: usize = 4;
/// Maximum session duration (6 hours)
pub const MAX_SESSION_DURATION: u64 = 3600 * 6;
/// The name of the cookie used to store session information
pub const SESSION_COOKIE_NAME: &str = "auth-cookie";