pub struct MfaManager { /* private fields */ }Implementations§
Source§impl MfaManager
impl MfaManager
pub fn new(issuer: String, period: u32, digits: u32) -> Self
pub fn generate_totp_secret(&self) -> String
pub fn generate_totp_config( &self, account_name: &str, secret: Option<String>, ) -> TotpConfig
pub fn generate_totp_uri(&self, config: &TotpConfig) -> String
pub fn verify_totp( &self, secret: &str, code: &str, tolerance: u64, ) -> Result<bool>
pub fn generate_backup_codes(&self, count: usize) -> Vec<String>
pub fn generate_webauthn_challenge(&self) -> String
pub fn create_webauthn_credential( &self, credential_id: String, public_key: Vec<u8>, name: String, ) -> WebAuthnCredential
pub fn verify_webauthn_signature( &self, _credential: &WebAuthnCredential, authenticator_data: &[u8], _client_data_json: &[u8], _signature: &[u8], ) -> Result<bool>
Auto Trait Implementations§
impl Freeze for MfaManager
impl RefUnwindSafe for MfaManager
impl Send for MfaManager
impl Sync for MfaManager
impl Unpin for MfaManager
impl UnwindSafe for MfaManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more