MemoryStore

Type Alias MemoryStore 

Source
pub type MemoryStore = HashMap<Vec<u8>, Passkey>;
Expand description

In-memory store for Passkeys

Useful for tests.

Aliased Type§

pub struct MemoryStore { /* private fields */ }

Trait Implementations§

Source§

impl CredentialStore for MemoryStore

Source§

type PasskeyItem = Passkey

Defines the return type of find_credentials(…)
Source§

fn find_credentials<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, allow_credentials: Option<&'life1 [PublicKeyCredentialDescriptor]>, _rp_id: &'life2 str, _user_handle: Option<&'life3 [u8]>, ) -> Pin<Box<dyn Future<Output = Result<Vec<Self::PasskeyItem>, StatusCode>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Find all credentials matching the given ids and rp_id. Read more
Source§

fn save_credential<'life0, 'async_trait>( &'life0 mut self, cred: Passkey, _user: PublicKeyCredentialUserEntity, _rp: PublicKeyCredentialRpEntity, _options: Options, ) -> Pin<Box<dyn Future<Output = Result<(), StatusCode>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Save the new credential into your store
Source§

fn update_credential<'life0, 'life1, 'async_trait>( &'life0 mut self, cred: &'life1 Passkey, ) -> Pin<Box<dyn Future<Output = Result<(), StatusCode>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Update the credential in your store
Source§

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

Get information about the store