Credential

Enum Credential 

Source
pub enum Credential {
    Full(FullCredential),
    Stripped(StrippedCredential),
}
Expand description

A credential that is managed by the authenticator.

The authenticator uses two credential representations:

  • FullCredential contains all data available for a credential and is used for resident credentials that are stored on the filesystem. Older versions of this app used this reprensentation for non-resident credentials too.
  • StrippedCredential contains the minimal data required for non-resident credentials. As the data for these credentials is encoded in the credential ID, we try to keep it as small as possible.

Variants§

Implementations§

Source§

impl Credential

Source

pub fn try_from<UP: UserPresence, T: CryptoClient + Chacha8Poly1305 + FilesystemClient>( authnr: &mut Authenticator<UP, T>, rp_id_hash: &[u8; 32], descriptor: &PublicKeyCredentialDescriptorRef<'_>, ) -> Result<Self>

Source

pub fn try_from_bytes<UP: UserPresence, T: CryptoClient + Chacha8Poly1305 + FilesystemClient>( authnr: &mut Authenticator<UP, T>, rp_id_hash: &[u8; 32], id: &[u8], ) -> Result<Self>

Source

pub fn id<T: Chacha8Poly1305 + Sha256>( &self, trussed: &mut T, key_encryption_key: KeyId, rp_id_hash: &[u8; 32], ) -> Result<CredentialId>

Source

pub fn algorithm(&self) -> i32

Source

pub fn cred_protect(&self) -> Option<CredentialProtectionPolicy>

Source

pub fn key(&self) -> &Key

Source

pub fn third_party_payment(&self) -> Option<bool>

Trait Implementations§

Source§

impl Clone for Credential

Source§

fn clone(&self) -> Credential

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Credential

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.