Skip to main content

CredentialStore

Trait CredentialStore 

Source
pub trait CredentialStore: Send + Sync {
    // Required methods
    fn put(&self, credential: StoredPasskey);
    fn get(&self, credential_id: &str) -> Option<StoredPasskey>;
    fn for_user(&self, user: &UserId) -> Vec<StoredPasskey>;
    fn remove(&self, credential_id: &str);
}
Expand description

Persistence seam for passkey credentials.

Required Methods§

Source

fn put(&self, credential: StoredPasskey)

Stores or replaces a credential by its id.

Source

fn get(&self, credential_id: &str) -> Option<StoredPasskey>

Fetches a credential by id.

Source

fn for_user(&self, user: &UserId) -> Vec<StoredPasskey>

Every credential belonging to a user.

Source

fn remove(&self, credential_id: &str)

Removes a credential by id.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§