Struct passkey_types::ctap2::AttestedCredentialData
source · pub struct AttestedCredentialData {
pub aaguid: Aaguid,
pub key: CoseKey,
/* private fields */
}
Expand description
Attested credential data is a variable-length byte array added to the authenticator data when generating an attestation object for a credential
Fields§
§aaguid: Aaguid
The AAGUID of the authenticator.
key: CoseKey
The credential public key encoded in COSE_Key format, as defined in Section 7 of RFC9052, using the CTAP2 canonical CBOR encoding form. The COSE_Key-encoded credential public key MUST contain the “alg” parameter and MUST NOT contain any other OPTIONAL parameters. The “alg” parameter MUST contain a coset::iana::Algorithm value. The encoded credential public key MUST also contain any additional REQUIRED parameters stipulated by the relevant key type specification, i.e. REQUIRED for the key type “kty” and algorithm “alg” (see Section 2 of RFC9053).
Implementations§
source§impl AttestedCredentialData
impl AttestedCredentialData
sourcepub fn new(
aaguid: Aaguid,
credential_id: Vec<u8>,
key: CoseKey
) -> Result<Self, TryFromIntError>
pub fn new( aaguid: Aaguid, credential_id: Vec<u8>, key: CoseKey ) -> Result<Self, TryFromIntError>
Create a new AttestedCredentialData
Error
Returns an error if the length of credential_id
cannot be represented by a u16.
sourcepub fn credential_id(&self) -> &[u8] ⓘ
pub fn credential_id(&self) -> &[u8] ⓘ
Get read access to the credential ID,
Trait Implementations§
source§impl Clone for AttestedCredentialData
impl Clone for AttestedCredentialData
source§fn clone(&self) -> AttestedCredentialData
fn clone(&self) -> AttestedCredentialData
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for AttestedCredentialData
impl Debug for AttestedCredentialData
source§impl PartialEq for AttestedCredentialData
impl PartialEq for AttestedCredentialData
source§fn eq(&self, other: &AttestedCredentialData) -> bool
fn eq(&self, other: &AttestedCredentialData) -> bool
self
and other
values to be equal, and is used
by ==
.