| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src=../resources/testharness.js></script> | 2 <script src=../resources/testharness.js></script> |
| 3 <script src=../resources/testharnessreport.js></script> | 3 <script src=../resources/testharnessreport.js></script> |
| 4 <script src=../resources/WebIDLParser.js></script> | 4 <script src=../resources/WebIDLParser.js></script> |
| 5 <script src=../resources/idlharness.js></script> | 5 <script src=../resources/idlharness.js></script> |
| 6 <script type="text/plain" id="tested"> | 6 <script type="text/plain" id="tested"> |
| 7 [SecureContext] | 7 [SecureContext] |
| 8 interface ScopedCredentialInfo { | 8 interface PublicKeyCredential : Credential { |
| 9 readonly attribute ArrayBuffer clientData; | 9 [SameObject] readonly attribute ArrayBuffer rawId; |
| 10 readonly attribute ArrayBuffer attestation; | 10 [SameObject] readonly attribute AuthenticatorResponse response; |
| 11 }; | 11 }; |
| 12 | 12 |
| 13 dictionary RelyingPartyAccount { | 13 partial dictionary CredentialCreationOptions { |
| 14 required DOMString rpDisplayName; | 14 MakeCredentialOptions? publicKey; |
| 15 required DOMString displayName; | |
| 16 required DOMString id; | |
| 17 DOMString name; | |
| 18 DOMString imageURL; | |
| 19 }; | 15 }; |
| 20 | 16 |
| 21 dictionary ScopedCredentialParameters { | 17 partial dictionary CredentialRequestOptions { |
| 22 required ScopedCredentialType type; | 18 PublicKeyCredentialRequestOptions? publicKey; |
| 19 }; |
| 20 |
| 21 [SecureContext] |
| 22 interface AuthenticatorResponse { |
| 23 [SameObject] readonly attribute ArrayBuffer clientDataJSON; |
| 24 }; |
| 25 |
| 26 [SecureContext] |
| 27 interface AuthenticatorAttestationResponse : AuthenticatorResponse { |
| 28 [SameObject] readonly attribute ArrayBuffer attestationObject; |
| 29 }; |
| 30 |
| 31 [SecureContext] |
| 32 interface AuthenticatorAssertionResponse : AuthenticatorResponse { |
| 33 [SameObject] readonly attribute ArrayBuffer authenticatorData; |
| 34 [SameObject] readonly attribute ArrayBuffer signature; |
| 35 }; |
| 36 |
| 37 dictionary PublicKeyCredentialParameters { |
| 38 required PublicKeyCredentialType type; |
| 23 required AlgorithmIdentifier algorithm; | 39 required AlgorithmIdentifier algorithm; |
| 24 }; | 40 }; |
| 25 | 41 |
| 26 dictionary ScopedCredentialOptions { | 42 dictionary MakeCredentialOptions { |
| 27 unsigned long timeoutSeconds; | 43 required PublicKeyCredentialEntity rp; |
| 28 USVString rpId; | 44 required PublicKeyCredentialUserEntity user; |
| 29 sequence < ScopedCredentialDescriptor > excludeList; | 45 |
| 30 AuthenticationExtension extensions; | 46 required BufferSource challenge; |
| 47 required sequence<PublicKeyCredentialParameters> parameters; |
| 48 |
| 49 unsigned long timeout; |
| 50 sequence<PublicKeyCredentialDescriptor> excludeCredentials = []; |
| 51 AuthenticatorSelectionCriteria authenticatorSelection; |
| 31 }; | 52 }; |
| 32 | 53 |
| 33 [SecureContext] | 54 dictionary PublicKeyCredentialEntity { |
| 34 interface AuthenticationAssertion { | 55 DOMString id; |
| 35 readonly attribute ScopedCredential credential; | 56 DOMString name; |
| 36 readonly attribute ArrayBuffer clientData; | 57 USVString icon; |
| 37 readonly attribute ArrayBuffer authenticatorData; | |
| 38 readonly attribute ArrayBuffer signature; | |
| 39 }; | 58 }; |
| 40 | 59 |
| 41 dictionary AssertionOptions { | 60 dictionary PublicKeyCredentialUserEntity : PublicKeyCredentialEntity { |
| 42 unsigned long timeoutSeconds; | 61 DOMString displayName; |
| 43 USVString rpId; | |
| 44 sequence < ScopedCredentialDescriptor > allowList; | |
| 45 AuthenticationExtension extensions; | |
| 46 }; | 62 }; |
| 47 | 63 |
| 48 dictionary AuthenticationExtension { | 64 dictionary AuthenticatorSelectionCriteria { |
| 65 AuthenticatorAttachment attachment; |
| 66 boolean requireResidentKey = false; |
| 49 }; | 67 }; |
| 50 | 68 |
| 51 dictionary AuthenticationClientData { | 69 enum AuthenticatorAttachment { |
| 70 "platform", |
| 71 "cross-platform" |
| 72 }; |
| 73 |
| 74 dictionary PublicKeyCredentialRequestOptions { |
| 75 required BufferSource challenge; |
| 76 unsigned long timeout; |
| 77 USVString rpId; |
| 78 sequence<PublicKeyCredentialDescriptor> allowCredentials = []; |
| 79 }; |
| 80 |
| 81 dictionary CollectedClientData { |
| 52 required DOMString challenge; | 82 required DOMString challenge; |
| 53 required DOMString origin; | 83 required DOMString origin; |
| 54 required AlgorithmIdentifier hashAlg; | 84 required DOMString hashAlgorithm; |
| 55 DOMString tokenBinding; | 85 DOMString tokenBindingId; |
| 56 AuthenticationExtension extensions; | |
| 57 }; | 86 }; |
| 58 | 87 |
| 59 enum ScopedCredentialType { | 88 enum PublicKeyCredentialType { |
| 60 "ScopedCred" | 89 "public-key" |
| 61 }; | 90 }; |
| 62 | 91 |
| 63 [SecureContext] | 92 dictionary PublicKeyCredentialDescriptor { |
| 64 interface ScopedCredential { | 93 required PublicKeyCredentialType type; |
| 65 readonly attribute ScopedCredentialType type; | 94 required BufferSource id; |
| 66 readonly attribute ArrayBuffer id; | 95 sequence<Transport> transports; |
| 67 }; | |
| 68 | |
| 69 dictionary ScopedCredentialDescriptor { | |
| 70 required ScopedCredentialType type; | |
| 71 required BufferSource id; | |
| 72 sequence <Transport> transports; | |
| 73 }; | 96 }; |
| 74 | 97 |
| 75 enum Transport { | 98 enum Transport { |
| 76 "usb", | 99 "usb", |
| 77 "nfc", | 100 "nfc", |
| 78 "ble" | 101 "ble" |
| 79 }; | 102 }; |
| 80 [SecureContext] | 103 |
| 81 interface WebAuthentication { | 104 interface WebAuthentication { |
| 82 Promise <ScopedCredentialInfo> makeCredential ( | 105 Promise<AuthenticatorAttestationResponse> makeCredential ( |
| 83 Account accountInformation, | 106 MakeCredentialOptions» publicKey |
| 84 sequence < ScopedCredentialParameters > cryptoParameters, | |
| 85 BufferSource attestationChallenge, | |
| 86 optional ScopedCredentialOptions options | |
| 87 ); | 107 ); |
| 88 | 108 |
| 89 Promise <AuthenticationAssertion> getAssertion ( | 109 Promise<AuthenticatorAssertionResponse> getAssertion ( |
| 90 BufferSource assertionChallenge, | 110 PublicKeyCredentialRequestOptions publicKey |
| 91 optional AssertionOptions options | |
| 92 ); | 111 ); |
| 93 }; | 112 }; |
| 113 |
| 94 </script> | 114 </script> |
| 95 <script> | 115 <script> |
| 96 (function() { | 116 (function() { |
| 97 "use strict"; | 117 "use strict"; |
| 98 var idl_array = new IdlArray(); | 118 var idl_array = new IdlArray(); |
| 99 idl_array.add_idls(document.querySelector('#tested').textContent); | 119 idl_array.add_idls(document.querySelector('#tested').textContent); |
| 100 idl_array.add_objects({ | 120 idl_array.add_objects({ |
| 101 WebAuthentication: ['navigator.authentication'] | 121 WebAuthentication: ['navigator.authentication'] |
| 102 }); | 122 }); |
| 103 idl_array.test(); | 123 idl_array.test(); |
| 104 })(); | 124 })(); |
| 105 </script> | 125 </script> |
| OLD | NEW |