Skip to content

Commit

Permalink
Merge pull request #44 from 1Password/progdrasil/fix-ctap2-make-crede…
Browse files Browse the repository at this point in the history
…ntial-response-order

Change make_credential::Response order to follow CTAP2.1
  • Loading branch information
Progdrasil committed Aug 5, 2024
2 parents 005e1b3 + 33a7501 commit 80ef0aa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions passkey-authenticator/src/authenticator/make_credential.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ where
.set_make_credential_extensions(extensions.signed)?;

let response = Response {
auth_data,
fmt: "None".into(),
att_stmt: vec![0xa0].into(), // CBOR equivalent to empty map
auth_data,
att_stmt: coset::cbor::value::Value::Map(vec![]),
ep_att: None,
large_blob_key: None,
unsigned_extension_outputs: extensions.unsigned,
Expand Down
8 changes: 4 additions & 4 deletions passkey-types/src/ctap2/make_credential.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,13 +258,13 @@ serde_workaround! {
/// Upon successful creation of a credential, the authenticator returns an attestation object.
#[derive(Debug)]
pub struct Response {
/// The authenticator data object
/// The attestation statement format identifier
#[serde(rename = 0x01)]
pub auth_data: AuthenticatorData,
pub fmt: String,

/// The attestation statement format identifier
/// The authenticator data object
#[serde(rename = 0x02)]
pub fmt: String,
pub auth_data: AuthenticatorData,

/// The attestation statement, whose format is identified by the "fmt" object member.
/// The client treats it as an opaque object.
Expand Down

0 comments on commit 80ef0aa

Please sign in to comment.