diff options
author | Jesse Luehrs <doy@tozt.net> | 2021-07-05 14:47:27 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-05 14:47:27 -0400 |
commit | 4fa073afca3f449271b8d70e759e4584e060f26d (patch) | |
tree | 942397c891f13edc603d7eb510d6be3ad8238104 /src | |
parent | ecbafabaf56a32f494cf52a857247624dfef5228 (diff) | |
parent | e2389e9bc84f99204f164c617b42e63578e00831 (diff) | |
download | rbw-4fa073afca3f449271b8d70e759e4584e060f26d.tar.gz rbw-4fa073afca3f449271b8d70e759e4584e060f26d.zip |
Merge pull request #59 from srhb/fixup-webauthn
TwoFactorProviderType: Allow WebAuthn
Diffstat (limited to 'src')
-rw-r--r-- | src/api.rs | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -48,6 +48,7 @@ pub enum TwoFactorProviderType { U2f = 4, Remember = 5, OrganizationDuo = 6, + WebAuthn = 7, } impl<'de> serde::Deserialize<'de> for TwoFactorProviderType { @@ -104,6 +105,7 @@ impl std::convert::TryFrom<u64> for TwoFactorProviderType { 4 => Ok(Self::U2f), 5 => Ok(Self::Remember), 6 => Ok(Self::OrganizationDuo), + 7 => Ok(Self::WebAuthn), _ => Err(Error::InvalidTwoFactorProvider { ty: format!("{}", ty), }), @@ -123,6 +125,7 @@ impl std::str::FromStr for TwoFactorProviderType { "4" => Ok(Self::U2f), "5" => Ok(Self::Remember), "6" => Ok(Self::OrganizationDuo), + "7" => Ok(Self::WebAuthn), _ => Err(Error::InvalidTwoFactorProvider { ty: ty.to_string() }), } } |