PasskeyAccessor

Trait PasskeyAccessor 

Source
pub trait PasskeyAccessor {
    // Required methods
    fn key(&self) -> Cow<'_, CoseKey>;
    fn credential_id(&self) -> &[u8] ;
    fn rp_id(&self) -> &str;
    fn user_handle(&self) -> Option<&[u8]>;
    fn username(&self) -> Option<&str>;
    fn user_display_name(&self) -> Option<&str>;
    fn counter(&self) -> Option<u32>;
    fn set_counter(&mut self, counter: u32);
    fn extensions(&self) -> Cow<'_, CredentialExtensions>;
}
Expand description

A trait to model the different aspects of a passkey, this allows the abstraction of a passkey on custom items.

Required Methods§

Source

fn key(&self) -> Cow<'_, CoseKey>

The private key

This is a Cow in case the type does not save the private key in Cose format.

Source

fn credential_id(&self) -> &[u8]

The passkey’s credential Id.

Source

fn rp_id(&self) -> &str

The Relying Party ID to which the passkey is bound to.

Source

fn user_handle(&self) -> Option<&[u8]>

The user handle for which this passkey is bound to.

Source

fn username(&self) -> Option<&str>

The username that this passkey is created for.

Source

fn user_display_name(&self) -> Option<&str>

The user’s display name.

Source

fn counter(&self) -> Option<u32>

The counter of times this passkey has been used.

See Counter considerations on Passkey::counter

Source

fn set_counter(&mut self, counter: u32)

Set a new value for the PasskeyAccessor::set_counter

Source

fn extensions(&self) -> Cow<'_, CredentialExtensions>

Get the extensions that that this passkey provides

This is a Cow in case the type does not save the extension data in the format defined by passkey-types.

Implementations on Foreign Types§

Source§

impl PasskeyAccessor for Passkey

Source§

fn key(&self) -> Cow<'_, CoseKey>

Source§

fn credential_id(&self) -> &[u8]

Source§

fn rp_id(&self) -> &str

Source§

fn user_handle(&self) -> Option<&[u8]>

Source§

fn username(&self) -> Option<&str>

Source§

fn user_display_name(&self) -> Option<&str>

Source§

fn counter(&self) -> Option<u32>

Source§

fn set_counter(&mut self, counter: u32)

Source§

fn extensions(&self) -> Cow<'_, CredentialExtensions>

Implementors§