pub struct PublicKeyCredential<R: AuthenticatorResponse> {
pub id: String,
pub raw_id: Bytes,
pub ty: PublicKeyCredentialType,
pub response: R,
pub authenticator_attachment: Option<AuthenticatorAttachment>,
pub client_extension_results: AuthenticationExtensionsClientOutputs,
}Expand description
This is the response from a successful creation or assertion of a credential.
It is recommended to use the type aliases depending on which response you are expecting:
- Credential Creation: CreatedPublicKeyCredential
- Credential assertion: AuthenticatedPublicKeyCredential
Fields§
§id: StringThe id contains the credential ID, chosen by the authenticator. This is usually the base64url encoded data of Self::raw_id
The credential ID is used to look up credentials for use and is therefore expected to be globally unique with high probability across all credentials of the same type across all authenticators.
NOTE: This API does not constrain the format or length of this identifier, except that it MUST be sufficient for the authenticator to uniquely select a key.
raw_id: BytesThe raw byte containing the credential ID, see Self::id for more information.
ty: PublicKeyCredentialTypeAlways PublicKeyCredentialType
response: RThis contains the authenticator’s response to the client’s request to either:
- create a public key in which case it is of type AuthenticatorAttestationResponse or
- generate an authentication assertion in which case it is of type AuthenticatorAssertionResponse
authenticator_attachment: Option<AuthenticatorAttachment>This reports the modality of the communication between the client and authenticator.
client_extension_results: AuthenticationExtensionsClientOutputsThis object is a map containing extension identifier → client extension output entries produced by the extension’s client extension processing.