Refactor login tokens management

This commit is contained in:
2023-06-16 18:40:21 +02:00
parent f54dfde7f7
commit 9dd3811136
3 changed files with 104 additions and 49 deletions

View File

@ -45,5 +45,14 @@ pub const ACCOUNT_DELETE_TOKEN_DURATION: Duration = Duration::from_secs(3600 * 1
/// OpenID state duration
pub const OPEN_ID_STATE_DURATION: Duration = Duration::from_secs(3600);
/// Auth token duration
pub const AUTH_TOKEN_DURATION: Duration = Duration::from_secs(3600 * 24);
/// Minimum interval before heartbeat update
pub const AUTH_TOKEN_HB_MIN_INTERVAL: Duration = Duration::from_secs(60);
/// Auth token max inactivity period
pub const AUTH_TOKEN_MAX_INACTIVITY: Duration = Duration::from_secs(3600);
/// Length of family invitation code
pub const FAMILY_INVITATION_CODE_LEN: usize = 7;