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§
Sourcefn key(&self) -> Cow<'_, CoseKey>
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.
Sourcefn credential_id(&self) -> &[u8] ⓘ
fn credential_id(&self) -> &[u8] ⓘ
The passkey’s credential Id.
Sourcefn user_handle(&self) -> Option<&[u8]>
fn user_handle(&self) -> Option<&[u8]>
The user handle for which this passkey is bound to.
Sourcefn user_display_name(&self) -> Option<&str>
fn user_display_name(&self) -> Option<&str>
The user’s display name.
Sourcefn counter(&self) -> Option<u32>
fn counter(&self) -> Option<u32>
The counter of times this passkey has been used.
See Counter considerations on Passkey::counter
Sourcefn set_counter(&mut self, counter: u32)
fn set_counter(&mut self, counter: u32)
Set a new value for the PasskeyAccessor::set_counter
Sourcefn extensions(&self) -> Cow<'_, CredentialExtensions>
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.