Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change make_credential::Response order to follow CTAP2.1 #44

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -144,9 +144,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
Loading