Need to perform 2FA before modifying factors

This commit is contained in:
2024-03-27 19:26:07 +01:00
parent 8d739c6f72
commit 9a79ef701b
9 changed files with 107 additions and 7 deletions

View File

@@ -29,6 +29,10 @@ pub const MAX_SECOND_FACTOR_NAME_LEN: usize = 25;
/// exempted from this IP address to use 2FA
pub const SECOND_FACTOR_EXEMPTION_AFTER_SUCCESSFUL_LOGIN: u64 = 7 * 24 * 3600;
/// The maximum acceptable interval of time between last two factors authentication of a user and
/// access to a critical route / a critical client
pub const SECOND_FACTOR_EXPIRATION_FOR_CRITICAL_OPERATIONS: u64 = 60 * 10;
/// Minimum password length
pub const MIN_PASS_LEN: usize = 4;