Skip to content

Commit

Permalink
Include this "Easily accessing credential data" fields in JSON.
Browse files Browse the repository at this point in the history
The WebAuthn API provides accessors to get the SPKI-formatted public key
and authenticator data without needing to parse CBOR or handle COSE.
However, the JSON structures, prior to this change, didn't include these
values giving users an unfortunate choice: either use the accessors and
do the JSON encoding yourself, or use the provided `toJSON` function.

But we can have both!
  • Loading branch information
agl committed May 4, 2023
1 parent dbd8df4 commit da01fde
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1617,8 +1617,21 @@ that are returned to the caller when a new credential is created, or a new asser

dictionary AuthenticatorAttestationResponseJSON {
required Base64URLString clientDataJSON;
required Base64URLString attestationObject;
required Base64URLString authenticatorData;
required long long publicKeyAlgorithm;
required sequence<DOMString> transports;

// This field is missing if pubKeyCredParams was used to negotiate
// a public-key algorithm that the user agent doesn't understand.
// (See section “Easily accessing credential data” for a list of
// which algorithms user agents must support.) If using such an
// algorithm then the public key must be parsed from
// attestationObject directly.
Base64URLString publicKey;

// This value contains copies of some of the fields above. See
// section “Easily accessing credential data”.
required Base64URLString attestationObject;
};

dictionary AuthenticationResponseJSON {
Expand Down

0 comments on commit da01fde

Please sign in to comment.