Add session system

This commit is contained in:
2023-09-02 09:12:36 +02:00
parent 0ac1480572
commit 129d23f671
7 changed files with 260 additions and 17 deletions

View File

@ -0,0 +1,8 @@
/// Name of the cookie that contains session information
pub const SESSION_COOKIE_NAME: &str = "X-auth-token";
/// Maximum session duration after inactivity, in seconds
pub const MAX_INACTIVITY_DURATION: u64 = 60 * 30;
/// Maximum session duration (6 hours)
pub const MAX_SESSION_DURATION: u64 = 3600 * 6;