1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2025-09-25 22:29:45 +00:00

Can authenticate admin with reset token

This commit is contained in:
2021-05-11 16:52:57 +02:00
parent 25830fe6d1
commit d8ec093786
9 changed files with 146 additions and 6 deletions

View File

@@ -160,9 +160,15 @@ pub const PASSWORD_RESET_TOKEN_LIFETIME: u64 = 60 * 60 * 6;
/// Length of admin reset tokens
pub const ADMIN_RESET_TOKEN_LENGTH: usize = 255;
/// Duration of the validity of a password reset token (1 hour)
/// Duration of the validity of an admin password reset token (1 hour)
pub const ADMIN_RESET_TOKEN_LIFETIME: u64 = 60 * 60;
/// Length of an admin access token
pub const ADMIN_ACCESS_TOKEN_LENGTH: usize = 300;
/// Duration of the validation of an admin access token without refresh
pub const ADMIN_ACCESS_TOKEN_LIFETIME: u64 = 60 * 10;
/// Minimum password length
pub const PASSWORD_MIN_LENGTH: usize = 3;