Bug 1406456 - WebAuthn WebIDL Updates for WD-07 (part 3) r?ttaubert draft
authorJ.C. Jones <jjones@mozilla.com>
Mon, 09 Oct 2017 16:48:01 -0700
changeset 678741 52008b3a9dc3a241d74850118bc5c1090685d61e
parent 678740 0f1d7588f3e8cafb5e26f3f42dc08acf0d843b17
child 735424 3be92db8c7e7281faf57ce9c8fe51a4537332d4c
push id84026
push userbmo:jjones@mozilla.com
push dateWed, 11 Oct 2017 20:08:03 +0000
reviewersttaubert
bugs1406456
milestone58.0a1
Bug 1406456 - WebAuthn WebIDL Updates for WD-07 (part 3) r?ttaubert Reorder WebAuthentication.webidl to match the ordering of the IDL index in the Web Authentication spec. No normative changes. MozReview-Commit-ID: 7qPE60Qh7Ly
dom/webidl/WebAuthentication.webidl
--- a/dom/webidl/WebAuthentication.webidl
+++ b/dom/webidl/WebAuthentication.webidl
@@ -27,26 +27,28 @@ interface AuthenticatorResponse {
     [SameObject] readonly attribute ArrayBuffer clientDataJSON;
 };
 
 [SecureContext, Pref="security.webauth.webauthn"]
 interface AuthenticatorAttestationResponse : AuthenticatorResponse {
     [SameObject] readonly attribute ArrayBuffer attestationObject;
 };
 
+[SecureContext, Pref="security.webauth.webauthn"]
+interface AuthenticatorAssertionResponse : AuthenticatorResponse {
+    [SameObject] readonly attribute ArrayBuffer      authenticatorData;
+    [SameObject] readonly attribute ArrayBuffer      signature;
+    readonly attribute DOMString                     userId;
+};
+
 dictionary PublicKeyCredentialParameters {
     required PublicKeyCredentialType  type;
     required WebAuthnAlgorithmID      alg; // Switch to COSE in Bug 1381190
 };
 
-dictionary PublicKeyCredentialUserEntity : PublicKeyCredentialEntity {
-    BufferSource   id;
-    DOMString      displayName;
-};
-
 dictionary MakePublicKeyCredentialOptions {
     required PublicKeyCredentialRpEntity   rp;
     required PublicKeyCredentialUserEntity user;
 
     required BufferSource                            challenge;
     required sequence<PublicKeyCredentialParameters> pubKeyCredParams;
 
     unsigned long                                timeout;
@@ -60,16 +62,21 @@ dictionary PublicKeyCredentialEntity {
     DOMString      name;
     USVString      icon;
 };
 
 dictionary PublicKeyCredentialRpEntity : PublicKeyCredentialEntity {
     DOMString      id;
 };
 
+dictionary PublicKeyCredentialUserEntity : PublicKeyCredentialEntity {
+    BufferSource   id;
+    DOMString      displayName;
+};
+
 dictionary AuthenticatorSelectionCriteria {
     AuthenticatorAttachment      authenticatorAttachment;
     boolean                      requireResidentKey = false;
     boolean                      requireUserVerification = false;
 };
 
 enum AuthenticatorAttachment {
     "platform",       // Platform attachment
@@ -102,28 +109,21 @@ enum PublicKeyCredentialType {
 };
 
 dictionary PublicKeyCredentialDescriptor {
     required PublicKeyCredentialType type;
     required BufferSource id;
     sequence<AuthenticatorTransport>   transports;
 };
 
-typedef (boolean or DOMString) WebAuthnAlgorithmID; // Switch to COSE in Bug 1381190
-
-[SecureContext, Pref="security.webauth.webauthn"]
-interface AuthenticatorAssertionResponse : AuthenticatorResponse {
-    [SameObject] readonly attribute ArrayBuffer      authenticatorData;
-    [SameObject] readonly attribute ArrayBuffer      signature;
-    readonly attribute DOMString                     userId;
-};
-
 enum AuthenticatorTransport {
     "usb",
     "nfc",
     "ble"
 };
 
 typedef long COSEAlgorithmIdentifier;
 
 typedef sequence<AAGUID>      AuthenticatorSelectionList;
 
 typedef BufferSource      AAGUID;
+
+typedef (boolean or DOMString) WebAuthnAlgorithmID; // Switch to COSE in Bug 1381190