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
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Credential
impl Send for Credential
impl Sync for Credential
impl Unpin for Credential
impl UnwindSafe for Credential
Blanket Implementations
Mutably borrows from an owned value. Read more