Bug 1406456 - WebAuthn WebIDL Updates for WD-07 (part 3) r=qdot,ttaubert
authorJ.C. Jones <jjones@mozilla.com>
Mon, 09 Oct 2017 16:48:01 -0700
changeset 428367 12c5e82b0240f8f0c7909b690ab99b94bd1022ad
parent 428366 dd5ff0119c3f20f9b887c23774890e64d15a7f28
child 428368 310eff6bb091017d6125610d2148926d4b8e2cd7
push id97
push userfmarier@mozilla.com
push dateSat, 14 Oct 2017 01:12:59 +0000
reviewersqdot, ttaubert
bugs1406456
milestone58.0a1
Bug 1406456 - WebAuthn WebIDL Updates for WD-07 (part 3) r=qdot,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