BasicOIDC/src/constants.rs

30 lines
861 B
Rust

/// File in storage containing users list
pub const USERS_LIST_FILE: &str = "users.json";
/// Default built-in credentials
pub const DEFAULT_ADMIN_USERNAME: &str = "admin";
pub const DEFAULT_ADMIN_PASSWORD: &str = "admin";
/// App name
pub const APP_NAME: &str = "Basic OIDC";
/// Maximum session duration after inactivity, in seconds
pub const MAX_INACTIVITY_DURATION: i64 = 60 * 30;
/// Maximum session duration (6 hours)
pub const MAX_SESSION_DURATION: i64 = 3600 * 6;
/// Minimum password length
pub const MIN_PASS_LEN: usize = 4;
/// The name of the cookie used to store session information
pub const SESSION_COOKIE_NAME: &str = "auth-cookie";
/// Authenticated routes prefix
pub const AUTHENTICATED_ROUTES: &str = "/settings";
/// Admin routes prefix
pub const ADMIN_ROUTES: &str = "/admin";
/// Auth route
pub const LOGIN_ROUTE: &str = "/login";