|
|
|
@ -73,31 +73,45 @@ pub struct Request<'a> {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// Response structure for [`Ctap2Device::get_assertion`] operation.
|
|
|
|
|
#[cfg_eval]
|
|
|
|
|
#[derive(Debug, Clone)]
|
|
|
|
|
#[cfg_attr(
|
|
|
|
|
feature = "serde",
|
|
|
|
|
serde_as,
|
|
|
|
|
skip_serializing_none,
|
|
|
|
|
derive(Deserialize)
|
|
|
|
|
)]
|
|
|
|
|
pub struct Response {
|
|
|
|
|
/// > PublicKeyCredentialDescriptor structure containing the credential
|
|
|
|
|
/// > identifier whose private key was used to generate the assertion.
|
|
|
|
|
#[serde(rename = 0x01)]
|
|
|
|
|
pub credential: public_key::Descriptor,
|
|
|
|
|
/// > The signed-over contextual bindings made by the authenticator, as
|
|
|
|
|
/// > specified in [WebAuthn].
|
|
|
|
|
#[cfg_attr(feature = "serde", serde_as(as = "Bytes"), serde(rename = 0x02))]
|
|
|
|
|
pub auth_data: Vec<u8>,
|
|
|
|
|
/// > The assertion signature produced by the authenticator, as
|
|
|
|
|
/// > specified in [WebAuthn].
|
|
|
|
|
#[cfg_attr(feature = "serde", serde_as(as = "Bytes"), serde(rename = 0x03))]
|
|
|
|
|
pub signature: Vec<u8>,
|
|
|
|
|
/// > [`public_key::UserEntity`] structure containing the user account
|
|
|
|
|
/// > information
|
|
|
|
|
#[serde(rename = 0x04)]
|
|
|
|
|
pub user: Option<public_key::UserEntity>,
|
|
|
|
|
/// > Total number of account credentials for the RP. Optional; defaults
|
|
|
|
|
/// > to one. This member is required when more than one credential is
|
|
|
|
|
/// > found for an RP, and the authenticator does not have a display or
|
|
|
|
|
/// > the UV & UP flags are false.
|
|
|
|
|
#[serde(rename = 0x05)]
|
|
|
|
|
pub number_of_credentials: Option<usize>,
|
|
|
|
|
/// > Indicates that a credential was selected by the user via
|
|
|
|
|
/// > interaction directly with the authenticator, and thus the platform
|
|
|
|
|
/// > does not need to confirm the credential.
|
|
|
|
|
#[serde(rename = 0x06)]
|
|
|
|
|
pub user_selected: Option<bool>,
|
|
|
|
|
/// > The contents of the associated `largeBlobKey` if present for the
|
|
|
|
|
/// > asserted credential, and if `largeBlobKey` was true in the
|
|
|
|
|
/// > extensions input.
|
|
|
|
|
#[cfg_attr(feature = "serde", serde_as(as = "Option<Bytes>"), serde(rename = 0x07))]
|
|
|
|
|
pub large_blob_key: Option<Vec<u8>>,
|
|
|
|
|
}
|
|
|
|
|