Skip to main content

OnePasswordTwoFactorPrompt

Trait OnePasswordTwoFactorPrompt 

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

Asks the user for a 1Password two-factor code.

Required Methods§

Source

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

Returns the code the user entered, or None if they cancelled. Each rejected code restarts the login, so attempt grows as the user retries.

Trait Implementations§

Source§

impl<T> FfiConverterArc<T> for dyn OnePasswordTwoFactorPrompt

Source§

const TYPE_ID_META: MetadataBuffer

Source§

type FfiType = Handle

Source§

fn lower(obj: Arc<Self>) -> Self::FfiType

Source§

fn try_lift(handle: Self::FfiType) -> Result<Arc<Self>>

Source§

fn write(obj: Arc<Self>, buf: &mut Vec<u8>)

Source§

fn try_read(buf: &mut &[u8]) -> Result<Arc<Self>>

Source§

impl<T> LiftRef<T> for dyn OnePasswordTwoFactorPrompt

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§