Struct webauthn_rs::proto::Credential[][src]

pub struct Credential {
    pub cred_id: CredentialID,
    pub cred: COSEKey,
    pub counter: u32,
    pub verified: bool,
    pub registration_policy: UserVerificationPolicy,
}
Expand description

A user’s authenticator credential. It contains an id, the public key and a counter of how many times the authenticator has been used.

Fields

cred_id: CredentialID

The ID of this credential.

cred: COSEKey

The public key of this credential

counter: u32

The counter for this credential

verified: bool

During registration, if this credential was verified then this is true. If not it is false. This is based on the policy at the time of registration of the credential.

This is a deviation from the Webauthn specification, because it clarifies the user experience of the credentials to UV being a per-credential attribute, rather than a per-authentication ceremony attribute. For example it can be surprising to register a credential as un-verified but then to use verification with it in the future.

registration_policy: UserVerificationPolicy

During registration, the policy that was requested from this credential. This is used to understand if the how the verified component interacts with the device, IE an always verified authenticator vs one that can dynamically request it.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.