Skip to main content

PasskeyOps

Trait PasskeyOps 

Source
pub trait PasskeyOps:
    Send
    + Sync
    + 'static {
    type Passkey: AuthPasskey;

    // Required methods
    fn create_passkey<'life0, 'async_trait>(
        &'life0 self,
        input: CreatePasskey,
    ) -> Pin<Box<dyn Future<Output = Result<Self::Passkey, AuthError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn get_passkey_by_id<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Self::Passkey>, AuthError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn get_passkey_by_credential_id<'life0, 'life1, 'async_trait>(
        &'life0 self,
        credential_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Self::Passkey>, AuthError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn list_passkeys_by_user<'life0, 'life1, 'async_trait>(
        &'life0 self,
        user_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Self::Passkey>, AuthError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn update_passkey_counter<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 str,
        counter: u64,
    ) -> Pin<Box<dyn Future<Output = Result<Self::Passkey, AuthError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn update_passkey_name<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        id: &'life1 str,
        name: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<Self::Passkey, AuthError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             Self: 'async_trait;
    fn delete_passkey<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
}
Expand description

Passkey persistence operations.

Required Associated Types§

Required Methods§

Source

fn create_passkey<'life0, 'async_trait>( &'life0 self, input: CreatePasskey, ) -> Pin<Box<dyn Future<Output = Result<Self::Passkey, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Source

fn get_passkey_by_id<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Self::Passkey>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn get_passkey_by_credential_id<'life0, 'life1, 'async_trait>( &'life0 self, credential_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Self::Passkey>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn list_passkeys_by_user<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<Self::Passkey>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn update_passkey_counter<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, counter: u64, ) -> Pin<Box<dyn Future<Output = Result<Self::Passkey, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn update_passkey_name<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, id: &'life1 str, name: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Self::Passkey, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Source

fn delete_passkey<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Implementors§

Source§

impl<U, S, A, O, M, I, V, P> PasskeyOps for MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>