pub enum Credential {
Full(FullCredential),
Stripped(StrippedCredential),
}Expand description
A credential that is managed by the authenticator.
The authenticator uses two credential representations:
FullCredentialcontains 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.StrippedCredentialcontains 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§
Full(FullCredential)
Stripped(StrippedCredential)
Implementations§
Source§impl Credential
impl Credential
pub fn try_from<UP: UserPresence, T: CryptoClient + Chacha8Poly1305 + FilesystemClient>( authnr: &mut Authenticator<UP, T>, rp_id_hash: &[u8; 32], descriptor: &PublicKeyCredentialDescriptorRef<'_>, ) -> Result<Self>
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>
pub fn id<T: Chacha8Poly1305 + Sha256>( &self, trussed: &mut T, key_encryption_key: KeyId, rp_id_hash: &[u8; 32], ) -> Result<CredentialId>
pub fn algorithm(&self) -> i32
pub fn cred_protect(&self) -> Option<CredentialProtectionPolicy>
pub fn key(&self) -> &Key
pub fn third_party_payment(&self) -> Option<bool>
Trait Implementations§
Source§impl Clone for Credential
impl Clone for Credential
Source§fn clone(&self) -> Credential
fn clone(&self) -> Credential
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for Credential
impl RefUnwindSafe for Credential
impl Send for Credential
impl Sync for Credential
impl Unpin for Credential
impl UnwindSafe for Credential
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more