PrimaryPasswordAuthenticator

Trait PrimaryPasswordAuthenticator 

pub trait PrimaryPasswordAuthenticator: Send + Sync {
    // Required methods
    fn get_primary_password<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<String, DbCryptoApiError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn on_authentication_success<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(), DbCryptoApiError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn on_authentication_failure<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(), DbCryptoApiError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
}
Expand description

PrimaryPasswordAuthenticator is used in conjunction with NSSKeyManager to provide the primary password and the success or failure actions of the authentication process.

Required Methods§

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

Get a primary password for authentication, otherwise return the AuthenticationCancelled error to cancel the authentication process.

fn on_authentication_success<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), DbCryptoApiError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

fn on_authentication_failure<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), DbCryptoApiError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Trait Implementations§

§

impl<T> FfiConverterArc<T> for dyn PrimaryPasswordAuthenticator

§

const TYPE_ID_META: MetadataBuffer

§

type FfiType = Handle

§

fn lower( obj: Arc<dyn PrimaryPasswordAuthenticator>, ) -> <dyn PrimaryPasswordAuthenticator as FfiConverterArc<T>>::FfiType

§

fn try_lift( handle: <dyn PrimaryPasswordAuthenticator as FfiConverterArc<T>>::FfiType, ) -> Result<Arc<dyn PrimaryPasswordAuthenticator>, Error>

§

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

§

fn try_read( buf: &mut &[u8], ) -> Result<Arc<dyn PrimaryPasswordAuthenticator>, Error>

§

impl<T> LiftRef<T> for dyn PrimaryPasswordAuthenticator

Implementors§