logins::encryption

Trait PrimaryPasswordAuthenticator

Source
pub trait PrimaryPasswordAuthenticator: Send + Sync {
    // Required methods
    fn get_primary_password<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = ApiResult<String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn on_authentication_success(&self);
    fn on_authentication_failure(&self);
}
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§

Source

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

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

Source

fn on_authentication_success(&self)

Source

fn on_authentication_failure(&self)

Trait Implementations§

Source§

impl<T> FfiConverterArc<T> for dyn PrimaryPasswordAuthenticator

Source§

const TYPE_ID_META: MetadataBuffer = _

Source§

type FfiType = *const c_void

Source§

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

Source§

fn try_lift(v: 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 PrimaryPasswordAuthenticator

Implementors§