Skip to main content

OnePasswordTwoFactorUi

Trait OnePasswordTwoFactorUi 

Source
pub trait OnePasswordTwoFactorUi: Send + Sync {
    // Required method
    fn provide_totp<'life0, 'async_trait>(
        &'life0 self,
        attempt: u32,
    ) -> Pin<Box<dyn Future<Output = TotpResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Callback for interactive two-factor authentication.

Required Methods§

Source

fn provide_totp<'life0, 'async_trait>( &'life0 self, attempt: u32, ) -> Pin<Box<dyn Future<Output = TotpResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provides a TOTP passcode for the given zero-based attempt. Each wrong code restarts the login, so attempt grows as the user retries.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§