mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 20:23:43 +08:00
fix(users): Add max wrong attempts for two-fa (#6247)
This commit is contained in:
@ -196,6 +196,23 @@ pub struct TwoFactorAuthStatusResponse {
|
||||
pub recovery_code: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug, serde::Deserialize, serde::Serialize)]
|
||||
pub struct TwoFactorAuthAttempts {
|
||||
pub is_completed: bool,
|
||||
pub remaining_attempts: u8,
|
||||
}
|
||||
|
||||
#[derive(Debug, serde::Deserialize, serde::Serialize)]
|
||||
pub struct TwoFactorAuthStatusResponseWithAttempts {
|
||||
pub totp: TwoFactorAuthAttempts,
|
||||
pub recovery_code: TwoFactorAuthAttempts,
|
||||
}
|
||||
|
||||
#[derive(Debug, serde::Deserialize, serde::Serialize)]
|
||||
pub struct TwoFactorStatus {
|
||||
pub status: Option<TwoFactorAuthStatusResponseWithAttempts>,
|
||||
}
|
||||
|
||||
#[derive(Debug, serde::Deserialize, serde::Serialize)]
|
||||
pub struct UserFromEmailRequest {
|
||||
pub token: Secret<String>,
|
||||
|
||||
Reference in New Issue
Block a user