Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ pub enum TwoFactorProviderType {
Remember = 5,
OrganizationDuo = 6,
WebAuthn = 7,
RecoveryCode = 8,
}

impl TwoFactorProviderType {
Expand Down Expand Up @@ -138,6 +139,7 @@ impl std::convert::TryFrom<u64> for TwoFactorProviderType {
5 => Ok(Self::Remember),
6 => Ok(Self::OrganizationDuo),
7 => Ok(Self::WebAuthn),
8 => Ok(Self::RecoveryCode),
_ => Err(Error::InvalidTwoFactorProvider {
ty: format!("{ty}"),
}),
Expand All @@ -158,6 +160,7 @@ impl std::str::FromStr for TwoFactorProviderType {
"5" => Ok(Self::Remember),
"6" => Ok(Self::OrganizationDuo),
"7" => Ok(Self::WebAuthn),
"8" => Ok(Self::RecoveryCode),
_ => Err(Error::InvalidTwoFactorProvider { ty: ty.to_string() }),
}
}
Expand Down
Loading