From 50bdffbe084f01a26f6bc616950bf0ca0b650cfb Mon Sep 17 00:00:00 2001 From: Nick Zana Date: Wed, 17 May 2023 23:14:23 -0400 Subject: [PATCH] ctap2-proto: Derive Deserialize for authenticator::credential::make::Response --- crates/ctap2-proto/src/authenticator/credential/make.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/ctap2-proto/src/authenticator/credential/make.rs b/crates/ctap2-proto/src/authenticator/credential/make.rs index 7e3ed5d..8bf57a3 100644 --- a/crates/ctap2-proto/src/authenticator/credential/make.rs +++ b/crates/ctap2-proto/src/authenticator/credential/make.rs @@ -109,20 +109,27 @@ pub struct Request<'a> { pub enterprise_attestation: Option, } +#[cfg_attr(feature = "serde", derive(Deserialize))] #[derive(Debug)] pub struct Response { + #[cfg_attr(feature = "serde", serde(rename = 0x01))] pub format: fido_common::attestation::FormatIdentifier, + #[cfg_attr(feature = "serde", serde(rename = 0x02))] pub authenticator_data: authenticator::Data, + #[cfg_attr(feature = "serde", serde(rename = 0x03))] pub attestation_statement: Option, /// > Indicates whether an enterprise attestation was returned for this /// > credential. If `epAtt` is absent or present and set to false, then an /// > enterprise attestation was not returned. If `epAtt` is present and set /// > to true, then an enterprise attestation was returned. + #[cfg_attr(feature = "serde", serde(rename = 0x04))] pub enterprise_attestation: Option, /// > Contains the `largeBlobKey` for the credential, if requested with the /// > `largeBlobKey` extension. + #[cfg_attr(feature = "serde", serde(rename = 0x05))] pub large_blob_key: Option>, /// > A map, keyed by extension identifiers, to unsigned outputs of /// > extensions, if any. + #[cfg_attr(feature = "serde", serde(rename = 0x06))] pub unsigned_extension_outputs: Option>>, }