[WebAuthN] Implement dummy WebAuthN IDLs
authorjiewen_tan@apple.com <jiewen_tan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Jan 2018 23:08:44 +0000 (23:08 +0000)
committerjiewen_tan@apple.com <jiewen_tan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Jan 2018 23:08:44 +0000 (23:08 +0000)
https://bugs.webkit.org/show_bug.cgi?id=181627
<rdar://problem/36459864>

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* web-platform-tests/credential-management/credentialscontainer-create-basics.https-expected.txt:

Source/WebCore:

This patch implements dummy WebAuthN IDLs and connect them with Credential Management as well.
All implementations in this patch are subject to change when real implementations land. The
purpose here on the other hand is to have IDLs, bindings and implementations connected. This
patch should handle all IDLs that we need.

No tests.

* CMakeLists.txt:
* DerivedSources.make:
* Modules/credentialmanagement/CredentialCreationOptions.h:
* Modules/credentialmanagement/CredentialCreationOptions.idl:
* Modules/credentialmanagement/CredentialRequestOptions.h:
* Modules/credentialmanagement/CredentialRequestOptions.idl:
* Modules/webauthn/AuthenticatorAssertionResponse.cpp: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.cpp.
(WebCore::AuthenticatorAssertionResponse::AuthenticatorAssertionResponse):
(WebCore::AuthenticatorAssertionResponse::~AuthenticatorAssertionResponse):
(WebCore::AuthenticatorAssertionResponse::authenticatorData):
(WebCore::AuthenticatorAssertionResponse::signature):
(WebCore::AuthenticatorAssertionResponse::userHandle):
* Modules/webauthn/AuthenticatorAssertionResponse.h: Copied from Source/WebCore/Modules/credentialmanagement/CredentialRequestOptions.h.
* Modules/webauthn/AuthenticatorAssertionResponse.idl: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.idl.
* Modules/webauthn/AuthenticatorAttestationResponse.cpp: Copied from Source/WebCore/Modules/credentialmanagement/CredentialCreationOptions.h.
(WebCore::AuthenticatorAttestationResponse::AuthenticatorAttestationResponse):
(WebCore::AuthenticatorAttestationResponse::~AuthenticatorAttestationResponse):
(WebCore::AuthenticatorAttestationResponse::attestationObject):
* Modules/webauthn/AuthenticatorAttestationResponse.h: Copied from Source/WebCore/Modules/credentialmanagement/CredentialRequestOptions.h.
* Modules/webauthn/AuthenticatorAttestationResponse.idl: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.idl.
* Modules/webauthn/AuthenticatorResponse.cpp: Copied from Source/WebCore/Modules/credentialmanagement/CredentialCreationOptions.h.
(WebCore::AuthenticatorResponse::AuthenticatorResponse):
(WebCore::AuthenticatorResponse::~AuthenticatorResponse):
(WebCore::AuthenticatorResponse::clientDataJSON):
* Modules/webauthn/AuthenticatorResponse.h: Copied from Source/WebCore/Modules/credentialmanagement/CredentialRequestOptions.h.
* Modules/webauthn/AuthenticatorResponse.idl: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.idl.
* Modules/webauthn/PublicKeyCredential.cpp:
(WebCore::PublicKeyCredential::rawId):
(WebCore::PublicKeyCredential::response):
(WebCore::PublicKeyCredential::getClientExtensionResults):
(WebCore::PublicKeyCredential::isUserVerifyingPlatformAuthenticatorAvailable):
* Modules/webauthn/PublicKeyCredential.h:
* Modules/webauthn/PublicKeyCredential.idl:
* Modules/webauthn/PublicKeyCredentialCreationOptions.h: Copied from Source/WebCore/Modules/credentialmanagement/CredentialRequestOptions.h.
* Modules/webauthn/PublicKeyCredentialCreationOptions.idl: Added.
* Modules/webauthn/PublicKeyCredentialDescriptor.h: Copied from Source/WebCore/Modules/credentialmanagement/CredentialCreationOptions.h.
* Modules/webauthn/PublicKeyCredentialDescriptor.idl: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.idl.
* Modules/webauthn/PublicKeyCredentialRequestOptions.h: Copied from Source/WebCore/Modules/credentialmanagement/CredentialCreationOptions.h.
* Modules/webauthn/PublicKeyCredentialRequestOptions.idl: Copied from Source/WebCore/Modules/credentialmanagement/CredentialRequestOptions.h.
* Modules/webauthn/PublicKeyCredentialType.h: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.idl.
* Modules/webauthn/PublicKeyCredentialType.idl: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.idl.
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/WebCoreBuiltinNames.h:

LayoutTests:

Modify some tests to reflect the update.

* http/wpt/credential-management/credentialscontainer-create-basics.https-expected.txt:
* http/wpt/credential-management/credentialscontainer-create-basics.https.html:
* http/wpt/credential-management/credentialscontainer-get-basics.https-expected.txt:
* http/wpt/credential-management/credentialscontainer-get-basics.https.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227007 268f45cc-cd09-0410-ab3c-d52691b4dbfc

37 files changed:
LayoutTests/ChangeLog
LayoutTests/http/wpt/credential-management/credentialscontainer-create-basics.https-expected.txt
LayoutTests/http/wpt/credential-management/credentialscontainer-create-basics.https.html
LayoutTests/http/wpt/credential-management/credentialscontainer-get-basics.https-expected.txt
LayoutTests/http/wpt/credential-management/credentialscontainer-get-basics.https.html
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/credential-management/credentialscontainer-create-basics.https-expected.txt
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/Modules/credentialmanagement/CredentialCreationOptions.h
Source/WebCore/Modules/credentialmanagement/CredentialCreationOptions.idl
Source/WebCore/Modules/credentialmanagement/CredentialRequestOptions.h
Source/WebCore/Modules/credentialmanagement/CredentialRequestOptions.idl
Source/WebCore/Modules/webauthn/AuthenticatorAssertionResponse.cpp [new file with mode: 0644]
Source/WebCore/Modules/webauthn/AuthenticatorAssertionResponse.h [new file with mode: 0644]
Source/WebCore/Modules/webauthn/AuthenticatorAssertionResponse.idl [new file with mode: 0644]
Source/WebCore/Modules/webauthn/AuthenticatorAttestationResponse.cpp [new file with mode: 0644]
Source/WebCore/Modules/webauthn/AuthenticatorAttestationResponse.h [new file with mode: 0644]
Source/WebCore/Modules/webauthn/AuthenticatorAttestationResponse.idl [new file with mode: 0644]
Source/WebCore/Modules/webauthn/AuthenticatorResponse.cpp [new file with mode: 0644]
Source/WebCore/Modules/webauthn/AuthenticatorResponse.h [new file with mode: 0644]
Source/WebCore/Modules/webauthn/AuthenticatorResponse.idl [new file with mode: 0644]
Source/WebCore/Modules/webauthn/PublicKeyCredential.cpp
Source/WebCore/Modules/webauthn/PublicKeyCredential.h
Source/WebCore/Modules/webauthn/PublicKeyCredential.idl
Source/WebCore/Modules/webauthn/PublicKeyCredentialCreationOptions.h [new file with mode: 0644]
Source/WebCore/Modules/webauthn/PublicKeyCredentialCreationOptions.idl [new file with mode: 0644]
Source/WebCore/Modules/webauthn/PublicKeyCredentialDescriptor.h [new file with mode: 0644]
Source/WebCore/Modules/webauthn/PublicKeyCredentialDescriptor.idl [new file with mode: 0644]
Source/WebCore/Modules/webauthn/PublicKeyCredentialRequestOptions.h [new file with mode: 0644]
Source/WebCore/Modules/webauthn/PublicKeyCredentialRequestOptions.idl [new file with mode: 0644]
Source/WebCore/Modules/webauthn/PublicKeyCredentialType.h [new file with mode: 0644]
Source/WebCore/Modules/webauthn/PublicKeyCredentialType.idl [new file with mode: 0644]
Source/WebCore/Sources.txt
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/WebCoreBuiltinNames.h

index 6d2455b..78b250e 100644 (file)
@@ -1,3 +1,18 @@
+2018-01-12  Jiewen Tan  <jiewen_tan@apple.com>
+
+        [WebAuthN] Implement dummy WebAuthN IDLs
+        https://bugs.webkit.org/show_bug.cgi?id=181627
+        <rdar://problem/36459864>
+
+        Reviewed by Alex Christensen.
+
+        Modify some tests to reflect the update.
+
+        * http/wpt/credential-management/credentialscontainer-create-basics.https-expected.txt:
+        * http/wpt/credential-management/credentialscontainer-create-basics.https.html:
+        * http/wpt/credential-management/credentialscontainer-get-basics.https-expected.txt:
+        * http/wpt/credential-management/credentialscontainer-get-basics.https.html:
+
 2018-01-16  Ryan Haddad  <ryanhaddad@apple.com>
 
         Unreviewed, rolling out r226962.
index 3df2cb3..97db90b 100644 (file)
@@ -1,8 +1,7 @@
 
 PASS navigator.credentials.create() with no argument. 
 PASS navigator.credentials.create() with empty argument. 
-FAIL navigator.credentials.create() with bogus publicKey data assert_throws: function "function () { throw e }" threw object "NotSupportedError: The operation is not supported." ("NotSupportedError") expected object "TypeError" ("TypeError")
+PASS navigator.credentials.create() with bogus publicKey data 
 PASS navigator.credentials.create() with bogus data 
 PASS navigator.credentials.create() with abort signal set 
-PASS navigator.credentials.create() with faked data 
 
index 6c86ae5..815e5a8 100644 (file)
@@ -31,9 +31,4 @@ promise_test(function(t) {
     return promise_rejects(t, "AbortError",
         navigator.credentials.create(options));
 }, "navigator.credentials.create() with abort signal set");
-
-promise_test(function(t) {
-    return promise_rejects(t, "NotSupportedError",
-        navigator.credentials.create({publicKey: true}));
-}, "navigator.credentials.create() with faked data");
 </script>
index 8cc1684..1e65f94 100644 (file)
@@ -1,8 +1,7 @@
 
 PASS navigator.credentials.get() with no argument. 
 PASS navigator.credentials.get() with empty argument. 
-FAIL navigator.credentials.get() with bogus publicKey data assert_throws: function "function () { throw e }" threw object "NotSupportedError: The operation is not supported." ("NotSupportedError") expected object "TypeError" ("TypeError")
+PASS navigator.credentials.get() with bogus publicKey data 
 PASS navigator.credentials.get() with bogus data 
 PASS navigator.credentials.get() with abort signal set 
-PASS navigator.credentials.get() with faked data 
 
index ca6d634..68d3fbb 100644 (file)
@@ -31,9 +31,4 @@ promise_test(function(t) {
     return promise_rejects(t, "AbortError",
         navigator.credentials.get(options));
 }, "navigator.credentials.get() with abort signal set");
-
-promise_test(function(t) {
-    return promise_rejects(t, "NotSupportedError",
-        navigator.credentials.get({publicKey: true}));
-}, "navigator.credentials.get() with faked data");
 </script>
index f2d0fba..f4a17cc 100644 (file)
@@ -1,3 +1,13 @@
+2018-01-12  Jiewen Tan  <jiewen_tan@apple.com>
+
+        [WebAuthN] Implement dummy WebAuthN IDLs
+        https://bugs.webkit.org/show_bug.cgi?id=181627
+        <rdar://problem/36459864>
+
+        Reviewed by Alex Christensen.
+
+        * web-platform-tests/credential-management/credentialscontainer-create-basics.https-expected.txt:
+
 2018-01-11  Youenn Fablet  <youenn@apple.com>
 
         Redirected iframe loading with Request.redirect=follow should fail
index cdc9d62..cc6403a 100644 (file)
@@ -6,12 +6,12 @@ FAIL navigator.credentials.create() with valid HTMLFormElement promise_test: Unh
 FAIL navigator.credentials.create() with bogus password data assert_throws: function "function () { throw e }" threw object "NotSupportedError: The operation is not supported." ("NotSupportedError") expected object "TypeError" ("TypeError")
 FAIL navigator.credentials.create() with valid FederatedCredentialData promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
 FAIL navigator.credentials.create() with bogus federated data assert_throws: function "function () { throw e }" threw object "NotSupportedError: The operation is not supported." ("NotSupportedError") expected object "TypeError" ("TypeError")
-FAIL navigator.credentials.create() with bogus publicKey data assert_throws: function "function () { throw e }" threw object "NotSupportedError: The operation is not supported." ("NotSupportedError") expected object "TypeError" ("TypeError")
-FAIL navigator.credentials.create() returns PublicKeyCredential promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
+PASS navigator.credentials.create() with bogus publicKey data 
+FAIL navigator.credentials.create() returns PublicKeyCredential promise_test: Unhandled rejection with value: object "TypeError: Member PublicKeyCredentialCreationOptions.pubKeyCredParams is required and must be an instance of sequence"
 PASS navigator.credentials.create() with both PasswordCredentialData and FederatedCredentialData 
 FAIL navigator.credentials.create() with bogus password and federated data assert_throws: function "function () { throw e }" threw object "NotSupportedError: The operation is not supported." ("NotSupportedError") expected object "TypeError" ("TypeError")
-FAIL navigator.credentials.create() with bogus federated and publicKey data assert_throws: function "function () { throw e }" threw object "NotSupportedError: The operation is not supported." ("NotSupportedError") expected object "TypeError" ("TypeError")
-FAIL navigator.credentials.create() with bogus password and publicKey data assert_throws: function "function () { throw e }" threw object "NotSupportedError: The operation is not supported." ("NotSupportedError") expected object "TypeError" ("TypeError")
-FAIL navigator.credentials.create() with bogus password, federated, and publicKey data assert_throws: function "function () { throw e }" threw object "NotSupportedError: The operation is not supported." ("NotSupportedError") expected object "TypeError" ("TypeError")
+PASS navigator.credentials.create() with bogus federated and publicKey data 
+PASS navigator.credentials.create() with bogus password and publicKey data 
+PASS navigator.credentials.create() with bogus password, federated, and publicKey data 
 PASS navigator.credentials.create() with bogus data 
 
index dd06c14..d509301 100644 (file)
@@ -399,7 +399,14 @@ set(WebCore_NON_SVG_IDL_FILES
     Modules/webaudio/ScriptProcessorNode.idl
     Modules/webaudio/WaveShaperNode.idl
 
+    Modules/webauthn/AuthenticatorAssertionResponse.idl
+    Modules/webauthn/AuthenticatorAttestationResponse.idl
+    Modules/webauthn/AuthenticatorResponse.idl
     Modules/webauthn/PublicKeyCredential.idl
+    Modules/webauthn/PublicKeyCredentialCreationOptions.idl
+    Modules/webauthn/PublicKeyCredentialDescriptor.idl
+    Modules/webauthn/PublicKeyCredentialRequestOptions.idl
+    Modules/webauthn/PublicKeyCredentialType.idl
 
     Modules/webdatabase/DOMWindowWebDatabase.idl
     Modules/webdatabase/Database.idl
index 422198b..a4bd223 100644 (file)
@@ -1,3 +1,63 @@
+2018-01-12  Jiewen Tan  <jiewen_tan@apple.com>
+
+        [WebAuthN] Implement dummy WebAuthN IDLs
+        https://bugs.webkit.org/show_bug.cgi?id=181627
+        <rdar://problem/36459864>
+
+        Reviewed by Alex Christensen.
+
+        This patch implements dummy WebAuthN IDLs and connect them with Credential Management as well.
+        All implementations in this patch are subject to change when real implementations land. The
+        purpose here on the other hand is to have IDLs, bindings and implementations connected. This
+        patch should handle all IDLs that we need.
+
+        No tests.
+
+        * CMakeLists.txt:
+        * DerivedSources.make:
+        * Modules/credentialmanagement/CredentialCreationOptions.h:
+        * Modules/credentialmanagement/CredentialCreationOptions.idl:
+        * Modules/credentialmanagement/CredentialRequestOptions.h:
+        * Modules/credentialmanagement/CredentialRequestOptions.idl:
+        * Modules/webauthn/AuthenticatorAssertionResponse.cpp: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.cpp.
+        (WebCore::AuthenticatorAssertionResponse::AuthenticatorAssertionResponse):
+        (WebCore::AuthenticatorAssertionResponse::~AuthenticatorAssertionResponse):
+        (WebCore::AuthenticatorAssertionResponse::authenticatorData):
+        (WebCore::AuthenticatorAssertionResponse::signature):
+        (WebCore::AuthenticatorAssertionResponse::userHandle):
+        * Modules/webauthn/AuthenticatorAssertionResponse.h: Copied from Source/WebCore/Modules/credentialmanagement/CredentialRequestOptions.h.
+        * Modules/webauthn/AuthenticatorAssertionResponse.idl: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.idl.
+        * Modules/webauthn/AuthenticatorAttestationResponse.cpp: Copied from Source/WebCore/Modules/credentialmanagement/CredentialCreationOptions.h.
+        (WebCore::AuthenticatorAttestationResponse::AuthenticatorAttestationResponse):
+        (WebCore::AuthenticatorAttestationResponse::~AuthenticatorAttestationResponse):
+        (WebCore::AuthenticatorAttestationResponse::attestationObject):
+        * Modules/webauthn/AuthenticatorAttestationResponse.h: Copied from Source/WebCore/Modules/credentialmanagement/CredentialRequestOptions.h.
+        * Modules/webauthn/AuthenticatorAttestationResponse.idl: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.idl.
+        * Modules/webauthn/AuthenticatorResponse.cpp: Copied from Source/WebCore/Modules/credentialmanagement/CredentialCreationOptions.h.
+        (WebCore::AuthenticatorResponse::AuthenticatorResponse):
+        (WebCore::AuthenticatorResponse::~AuthenticatorResponse):
+        (WebCore::AuthenticatorResponse::clientDataJSON):
+        * Modules/webauthn/AuthenticatorResponse.h: Copied from Source/WebCore/Modules/credentialmanagement/CredentialRequestOptions.h.
+        * Modules/webauthn/AuthenticatorResponse.idl: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.idl.
+        * Modules/webauthn/PublicKeyCredential.cpp:
+        (WebCore::PublicKeyCredential::rawId):
+        (WebCore::PublicKeyCredential::response):
+        (WebCore::PublicKeyCredential::getClientExtensionResults):
+        (WebCore::PublicKeyCredential::isUserVerifyingPlatformAuthenticatorAvailable):
+        * Modules/webauthn/PublicKeyCredential.h:
+        * Modules/webauthn/PublicKeyCredential.idl:
+        * Modules/webauthn/PublicKeyCredentialCreationOptions.h: Copied from Source/WebCore/Modules/credentialmanagement/CredentialRequestOptions.h.
+        * Modules/webauthn/PublicKeyCredentialCreationOptions.idl: Added.
+        * Modules/webauthn/PublicKeyCredentialDescriptor.h: Copied from Source/WebCore/Modules/credentialmanagement/CredentialCreationOptions.h.
+        * Modules/webauthn/PublicKeyCredentialDescriptor.idl: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.idl.
+        * Modules/webauthn/PublicKeyCredentialRequestOptions.h: Copied from Source/WebCore/Modules/credentialmanagement/CredentialCreationOptions.h.
+        * Modules/webauthn/PublicKeyCredentialRequestOptions.idl: Copied from Source/WebCore/Modules/credentialmanagement/CredentialRequestOptions.h.
+        * Modules/webauthn/PublicKeyCredentialType.h: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.idl.
+        * Modules/webauthn/PublicKeyCredentialType.idl: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.idl.
+        * Sources.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/WebCoreBuiltinNames.h:
+
 2018-01-16  Zalan Bujtas  <zalan@apple.com>
 
         AX: Do not trigger layout in updateBackingStore() unless it is safe to do so
index bb155de..a5be474 100644 (file)
@@ -324,7 +324,14 @@ JS_BINDING_IDLS = \
     $(WebCore)/Modules/webaudio/PeriodicWave.idl \
     $(WebCore)/Modules/webaudio/ScriptProcessorNode.idl \
     $(WebCore)/Modules/webaudio/WaveShaperNode.idl \
+    $(WebCore)/Modules/webauthn/AuthenticatorAssertionResponse.idl \
+    $(WebCore)/Modules/webauthn/AuthenticatorAttestationResponse.idl \
+    $(WebCore)/Modules/webauthn/AuthenticatorResponse.idl \
     $(WebCore)/Modules/webauthn/PublicKeyCredential.idl \
+       $(WebCore)/Modules/webauthn/PublicKeyCredentialCreationOptions.idl \
+    $(WebCore)/Modules/webauthn/PublicKeyCredentialDescriptor.idl \
+       $(WebCore)/Modules/webauthn/PublicKeyCredentialRequestOptions.idl \
+    $(WebCore)/Modules/webauthn/PublicKeyCredentialType.idl \
     $(WebCore)/Modules/webdatabase/DOMWindowWebDatabase.idl \
     $(WebCore)/Modules/webdatabase/Database.idl \
     $(WebCore)/Modules/webdatabase/DatabaseCallback.idl \
index de989d1..1b401ef 100644 (file)
@@ -26,6 +26,8 @@
 
 #pragma once
 
+#include "AbortSignal.h"
+#include "PublicKeyCredentialCreationOptions.h"
 #include <wtf/RefCounted.h>
 
 namespace WebCore {
@@ -34,7 +36,7 @@ class AbortSignal;
 
 struct CredentialCreationOptions {
     RefPtr<AbortSignal> signal;
-    std::optional<bool> publicKey;
+    std::optional<PublicKeyCredentialCreationOptions> publicKey;
 };
 
 } // namespace WebCore
index 330f4ea..b2c0da4 100644 (file)
@@ -26,5 +26,5 @@
 
 dictionary CredentialCreationOptions {
     AbortSignal signal;
-    boolean publicKey; // fake for now
+    PublicKeyCredentialCreationOptions publicKey;
 };
index f5cdfa6..644e7dd 100644 (file)
@@ -26,6 +26,7 @@
 
 #pragma once
 
+#include "PublicKeyCredentialRequestOptions.h"
 #include <wtf/RefCounted.h>
 
 namespace WebCore {
@@ -37,7 +38,7 @@ struct CredentialRequestOptions {
 
     MediationRequirement mediation;
     RefPtr<AbortSignal> signal;
-    std::optional<bool> publicKey;
+    std::optional<PublicKeyCredentialRequestOptions> publicKey;
 };
 
 } // namespace WebCore
index aeeaf4a..ced1447 100644 (file)
@@ -33,5 +33,5 @@ enum CredentialMediationRequirement {
 dictionary CredentialRequestOptions {
     CredentialMediationRequirement mediation = "optional";
     AbortSignal signal;
-    boolean publicKey; // fake for now
+    PublicKeyCredentialRequestOptions publicKey;
 };
diff --git a/Source/WebCore/Modules/webauthn/AuthenticatorAssertionResponse.cpp b/Source/WebCore/Modules/webauthn/AuthenticatorAssertionResponse.cpp
new file mode 100644 (file)
index 0000000..5704f01
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "AuthenticatorAssertionResponse.h"
+
+namespace WebCore {
+
+AuthenticatorAssertionResponse::AuthenticatorAssertionResponse(RefPtr<ArrayBuffer>&& clientDataJSON, RefPtr<ArrayBuffer>&& authenticatorData, RefPtr<ArrayBuffer>&& signature, RefPtr<ArrayBuffer>&& userHandle)
+    : AuthenticatorResponse(WTFMove(clientDataJSON))
+    , m_authenticatorData(WTFMove(authenticatorData))
+    , m_signature(WTFMove(signature))
+    , m_userHandle(WTFMove(userHandle))
+{
+}
+
+AuthenticatorAssertionResponse::~AuthenticatorAssertionResponse()
+{
+}
+
+ArrayBuffer* AuthenticatorAssertionResponse::authenticatorData()
+{
+    return m_authenticatorData.get();
+}
+
+ArrayBuffer* AuthenticatorAssertionResponse::signature()
+{
+    return m_signature.get();
+}
+
+ArrayBuffer* AuthenticatorAssertionResponse::userHandle()
+{
+    return m_userHandle.get();
+}
+
+} // namespace WebCore
diff --git a/Source/WebCore/Modules/webauthn/AuthenticatorAssertionResponse.h b/Source/WebCore/Modules/webauthn/AuthenticatorAssertionResponse.h
new file mode 100644 (file)
index 0000000..97ab679
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "AuthenticatorResponse.h"
+
+namespace WebCore {
+
+class AuthenticatorAssertionResponse : public AuthenticatorResponse {
+public:
+    AuthenticatorAssertionResponse(RefPtr<ArrayBuffer>&& clientDataJSON, RefPtr<ArrayBuffer>&& authenticatorData, RefPtr<ArrayBuffer>&& signature, RefPtr<ArrayBuffer>&& userHandle);
+    virtual ~AuthenticatorAssertionResponse();
+
+    ArrayBuffer* authenticatorData();
+    ArrayBuffer* signature();
+    ArrayBuffer* userHandle();
+
+private:
+    RefPtr<ArrayBuffer> m_authenticatorData;
+    RefPtr<ArrayBuffer> m_signature;
+    RefPtr<ArrayBuffer> m_userHandle;
+};
+
+} // namespace WebCore
diff --git a/Source/WebCore/Modules/webauthn/AuthenticatorAssertionResponse.idl b/Source/WebCore/Modules/webauthn/AuthenticatorAssertionResponse.idl
new file mode 100644 (file)
index 0000000..a2e1b81
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+[
+    EnabledAtRuntime=WebAuthentication,
+    Exposed=Window,
+    SecureContext
+] interface AuthenticatorAssertionResponse : AuthenticatorResponse {
+    [SameObject] readonly attribute ArrayBuffer authenticatorData;
+    [SameObject] readonly attribute ArrayBuffer signature;
+    [SameObject] readonly attribute ArrayBuffer userHandle;
+};
diff --git a/Source/WebCore/Modules/webauthn/AuthenticatorAttestationResponse.cpp b/Source/WebCore/Modules/webauthn/AuthenticatorAttestationResponse.cpp
new file mode 100644 (file)
index 0000000..8196030
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "AuthenticatorAttestationResponse.h"
+
+namespace WebCore {
+
+AuthenticatorAttestationResponse::AuthenticatorAttestationResponse(RefPtr<ArrayBuffer>&& clientDataJSON, RefPtr<ArrayBuffer>&& attestationObject)
+    : AuthenticatorResponse(WTFMove(clientDataJSON))
+    , m_attestationObject(WTFMove(attestationObject))
+{
+}
+
+AuthenticatorAttestationResponse::~AuthenticatorAttestationResponse()
+{
+}
+
+ArrayBuffer* AuthenticatorAttestationResponse::attestationObject()
+{
+    return m_attestationObject.get();
+}
+
+} // namespace WebCore
diff --git a/Source/WebCore/Modules/webauthn/AuthenticatorAttestationResponse.h b/Source/WebCore/Modules/webauthn/AuthenticatorAttestationResponse.h
new file mode 100644 (file)
index 0000000..ba9bbcd
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "AuthenticatorResponse.h"
+
+namespace WebCore {
+
+class AuthenticatorAttestationResponse : public AuthenticatorResponse {
+public:
+    AuthenticatorAttestationResponse(RefPtr<ArrayBuffer>&& clientDataJSON, RefPtr<ArrayBuffer>&& attestationObject);
+    virtual ~AuthenticatorAttestationResponse();
+
+    ArrayBuffer* attestationObject();
+
+private:
+    RefPtr<ArrayBuffer> m_attestationObject;
+};
+
+} // namespace WebCore
diff --git a/Source/WebCore/Modules/webauthn/AuthenticatorAttestationResponse.idl b/Source/WebCore/Modules/webauthn/AuthenticatorAttestationResponse.idl
new file mode 100644 (file)
index 0000000..2f9b24b
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+[
+    EnabledAtRuntime=WebAuthentication,
+    Exposed=Window,
+    SecureContext
+] interface AuthenticatorAttestationResponse : AuthenticatorResponse {
+    [SameObject] readonly attribute ArrayBuffer attestationObject;
+};
diff --git a/Source/WebCore/Modules/webauthn/AuthenticatorResponse.cpp b/Source/WebCore/Modules/webauthn/AuthenticatorResponse.cpp
new file mode 100644 (file)
index 0000000..ddb18b3
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "AuthenticatorResponse.h"
+
+namespace WebCore {
+
+AuthenticatorResponse::AuthenticatorResponse(RefPtr<ArrayBuffer>&& clientDataJSON)
+    : m_clientDataJSON(WTFMove(clientDataJSON))
+{
+}
+
+AuthenticatorResponse::~AuthenticatorResponse()
+{
+}
+
+ArrayBuffer* AuthenticatorResponse::clientDataJSON()
+{
+    return m_clientDataJSON.get();
+}
+
+} // namespace WebCore
diff --git a/Source/WebCore/Modules/webauthn/AuthenticatorResponse.h b/Source/WebCore/Modules/webauthn/AuthenticatorResponse.h
new file mode 100644 (file)
index 0000000..a3a16b5
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include <runtime/ArrayBuffer.h>
+#include <wtf/ThreadSafeRefCounted.h>
+
+namespace WebCore {
+
+class AuthenticatorResponse : public ThreadSafeRefCounted<AuthenticatorResponse> {
+public:
+    explicit AuthenticatorResponse(RefPtr<ArrayBuffer>&&);
+    virtual ~AuthenticatorResponse();
+
+    ArrayBuffer* clientDataJSON();
+
+private:
+    RefPtr<ArrayBuffer> m_clientDataJSON;
+};
+
+} // namespace WebCore
diff --git a/Source/WebCore/Modules/webauthn/AuthenticatorResponse.idl b/Source/WebCore/Modules/webauthn/AuthenticatorResponse.idl
new file mode 100644 (file)
index 0000000..e5c4ddc
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+[
+    EnabledAtRuntime=WebAuthentication,
+    Exposed=Window,
+    SecureContext,
+] interface AuthenticatorResponse {
+    [SameObject] readonly attribute ArrayBuffer clientDataJSON;
+};
index d708137..17acb2f 100644 (file)
@@ -26,6 +26,8 @@
 #include "config.h"
 #include "PublicKeyCredential.h"
 
+#include "JSDOMPromiseDeferred.h"
+
 namespace WebCore {
 
 PublicKeyCredential::PublicKeyCredential(const String& id)
@@ -53,4 +55,24 @@ ExceptionOr<RefPtr<BasicCredential>> PublicKeyCredential::create(const Credentia
     return Exception { NotSupportedError };
 }
 
+ArrayBuffer* PublicKeyCredential::rawId()
+{
+    return m_rawId.get();
 }
+
+AuthenticatorResponse* PublicKeyCredential::response()
+{
+    return m_response.get();
+}
+
+ExceptionOr<bool> PublicKeyCredential::getClientExtensionResults()
+{
+    return Exception { NotSupportedError };
+}
+
+void PublicKeyCredential::isUserVerifyingPlatformAuthenticatorAvailable(Ref<DeferredPromise>&& promise)
+{
+    promise->reject(Exception { NotSupportedError });
+}
+
+} // namespace WebCore
index d5e801a..3c966bc 100644 (file)
 
 #include "BasicCredential.h"
 #include "ExceptionOr.h"
-#include <wtf/Vector.h>
+#include <runtime/ArrayBuffer.h>
+#include <wtf/Forward.h>
 
 namespace WebCore {
 
+class AuthenticatorResponse;
+class DeferredPromise;
+
 struct CredentialCreationOptions;
 struct CredentialRequestOptions;
 
@@ -46,8 +50,18 @@ public:
     static RefPtr<BasicCredential> store(RefPtr<BasicCredential>&&, bool);
     static ExceptionOr<RefPtr<BasicCredential>> create(const CredentialCreationOptions&, bool);
 
+    ArrayBuffer* rawId();
+    AuthenticatorResponse* response();
+    // Not support yet. Always throws.
+    ExceptionOr<bool> getClientExtensionResults();
+
+    static void isUserVerifyingPlatformAuthenticatorAvailable(Ref<DeferredPromise>&&);
+
 private:
     PublicKeyCredential(const String&);
+
+    RefPtr<ArrayBuffer> m_rawId;
+    RefPtr<AuthenticatorResponse> m_response;
 };
 
 } // namespace WebCore
index f9b2023..48ef9ff 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+typedef boolean AuthenticationExtensions;
+
 [
     EnabledAtRuntime=WebAuthentication,
     Exposed=Window,
     SecureContext,
 ] interface PublicKeyCredential {
-    // Dummy for now.
+    [SameObject] readonly attribute ArrayBuffer rawId;
+    [SameObject] readonly attribute AuthenticatorResponse response;
+    [MayThrowException] AuthenticationExtensions getClientExtensionResults();
+
+    static Promise<boolean> isUserVerifyingPlatformAuthenticatorAvailable();
 };
diff --git a/Source/WebCore/Modules/webauthn/PublicKeyCredentialCreationOptions.h b/Source/WebCore/Modules/webauthn/PublicKeyCredentialCreationOptions.h
new file mode 100644 (file)
index 0000000..8bafe30
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "BufferSource.h"
+#include "PublicKeyCredentialDescriptor.h"
+#include "PublicKeyCredentialType.h"
+#include <wtf/Forward.h>
+
+namespace WebCore {
+
+struct PublicKeyCredentialCreationOptions {
+    struct Entity {
+        String name;
+        String icon;
+    };
+
+    struct RpEntity : public Entity {
+        String id;
+    };
+
+    struct UserEntity : public Entity {
+        BufferSource id;
+        String displayName;
+    };
+
+    struct Parameters {
+        PublicKeyCredentialType type;
+        long alg { 0 };
+    };
+
+    RpEntity rp;
+    UserEntity user;
+
+    BufferSource challenge;
+    Vector<Parameters> pubKeyCredParams;
+
+    unsigned long timeout { 0 };
+    Vector<PublicKeyCredentialDescriptor> excludeCredentials;
+};
+
+} // namespace WebCore
diff --git a/Source/WebCore/Modules/webauthn/PublicKeyCredentialCreationOptions.idl b/Source/WebCore/Modules/webauthn/PublicKeyCredentialCreationOptions.idl
new file mode 100644 (file)
index 0000000..17f58b0
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+typedef long COSEAlgorithmIdentifier;
+
+dictionary PublicKeyCredentialCreationOptions {
+    required PublicKeyCredentialRpEntity rp;
+    required PublicKeyCredentialUserEntity user;
+
+    required BufferSource challenge;
+    required sequence<PublicKeyCredentialParameters> pubKeyCredParams;
+
+    unsigned long timeout;
+    sequence<PublicKeyCredentialDescriptor> excludeCredentials = [];
+    // We don't allow RPs to select authenticators at this stage.
+    // Hence, those options are always { "platform", true, "required" }.
+    // AuthenticatorSelectionCriteria authenticatorSelection;
+    // Always "direct" for us.
+    // AttestationConveyancePreference attestation = "none";
+    // Not support yet.
+    // AuthenticationExtensions extensions;
+};
+
+dictionary PublicKeyCredentialEntity {
+    required DOMString name;
+    USVString icon;
+};
+
+dictionary PublicKeyCredentialRpEntity : PublicKeyCredentialEntity {
+    DOMString id;
+};
+
+dictionary PublicKeyCredentialUserEntity : PublicKeyCredentialEntity {
+    required BufferSource id;
+    required DOMString displayName;
+};
+
+dictionary PublicKeyCredentialParameters {
+    required PublicKeyCredentialType type;
+    required COSEAlgorithmIdentifier alg;
+};
diff --git a/Source/WebCore/Modules/webauthn/PublicKeyCredentialDescriptor.h b/Source/WebCore/Modules/webauthn/PublicKeyCredentialDescriptor.h
new file mode 100644 (file)
index 0000000..73e4492
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "BufferSource.h"
+#include "PublicKeyCredentialType.h"
+
+namespace WebCore {
+
+struct PublicKeyCredentialDescriptor {
+    PublicKeyCredentialType type;
+    BufferSource id;
+};
+
+} // namespace WebCore
diff --git a/Source/WebCore/Modules/webauthn/PublicKeyCredentialDescriptor.idl b/Source/WebCore/Modules/webauthn/PublicKeyCredentialDescriptor.idl
new file mode 100644 (file)
index 0000000..e93f864
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+dictionary PublicKeyCredentialDescriptor {
+    required PublicKeyCredentialType type;
+    required BufferSource id;
+    // We only allow platform attachment at this stage.
+    // sequence<AuthenticatorTransport> transports;
+};
diff --git a/Source/WebCore/Modules/webauthn/PublicKeyCredentialRequestOptions.h b/Source/WebCore/Modules/webauthn/PublicKeyCredentialRequestOptions.h
new file mode 100644 (file)
index 0000000..e49e1c8
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "BufferSource.h"
+#include "PublicKeyCredentialDescriptor.h"
+#include <wtf/Forward.h>
+
+namespace WebCore {
+
+struct PublicKeyCredentialRequestOptions {
+    BufferSource challenge;
+    unsigned long timeout { 0 };
+    String rpId;
+    Vector<PublicKeyCredentialDescriptor> allowCredentials;
+};
+
+} // namespace WebCore
diff --git a/Source/WebCore/Modules/webauthn/PublicKeyCredentialRequestOptions.idl b/Source/WebCore/Modules/webauthn/PublicKeyCredentialRequestOptions.idl
new file mode 100644 (file)
index 0000000..931ebd3
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+dictionary PublicKeyCredentialRequestOptions {
+    required BufferSource challenge;
+    unsigned long timeout;
+    USVString rpId;
+    sequence<PublicKeyCredentialDescriptor> allowCredentials = [];
+    // Always "required" at this stage
+    // UserVerificationRequirement userVerification = "preferred";
+    // Not support yet.
+    // AuthenticationExtensions extensions;
+};
diff --git a/Source/WebCore/Modules/webauthn/PublicKeyCredentialType.h b/Source/WebCore/Modules/webauthn/PublicKeyCredentialType.h
new file mode 100644 (file)
index 0000000..f1a1fe9
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+namespace WebCore {
+
+enum class PublicKeyCredentialType {
+    PublicKey
+};
+
+} // namespace WebCore
diff --git a/Source/WebCore/Modules/webauthn/PublicKeyCredentialType.idl b/Source/WebCore/Modules/webauthn/PublicKeyCredentialType.idl
new file mode 100644 (file)
index 0000000..fa6c473
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+[
+    ImplementedAs=PublicKeyCredentialType
+] enum PublicKeyCredentialType {
+    "public-key"
+};
index 3751209..9c2b0a5 100644 (file)
@@ -244,6 +244,9 @@ Modules/webaudio/WaveShaperDSPKernel.cpp
 Modules/webaudio/WaveShaperNode.cpp
 Modules/webaudio/WaveShaperProcessor.cpp
 
+Modules/webauthn/AuthenticatorAssertionResponse.cpp
+Modules/webauthn/AuthenticatorAttestationResponse.cpp
+Modules/webauthn/AuthenticatorResponse.cpp
 Modules/webauthn/PublicKeyCredential.cpp
 Modules/webauthn/cbor/CBORReader.cpp
 Modules/webauthn/cbor/CBORValue.cpp
@@ -2325,6 +2328,9 @@ JSAudioListener.cpp
 JSAudioNode.cpp
 JSAudioParam.cpp
 JSAudioProcessingEvent.cpp
+JSAuthenticatorAssertionResponse.cpp
+JSAuthenticatorAttestationResponse.cpp
+JSAuthenticatorResponse.cpp
 JSBarProp.cpp
 JSBasicCredential.cpp
 JSBeforeLoadEvent.cpp
@@ -2743,6 +2749,10 @@ JSProcessingInstruction.cpp
 JSProgressEvent.cpp
 JSPromiseRejectionEvent.cpp
 JSPublicKeyCredential.cpp
+JSPublicKeyCredentialCreationOptions.cpp
+JSPublicKeyCredentialDescriptor.cpp
+JSPublicKeyCredentialRequestOptions.cpp
+JSPublicKeyCredentialType.cpp
 JSRTCAnswerOptions.cpp
 JSRTCConfiguration.cpp
 JSRTCDTMFSender.cpp
index 22ef680..21b9d16 100644 (file)
                57303BBA2006C6EE00355965 /* CBORWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = 57303BB52006C6ED00355965 /* CBORWriter.h */; settings = {ATTRIBUTES = (Private, ); }; };
                57303BBB2006C6EE00355965 /* CBORBinary.h in Headers */ = {isa = PBXBuildFile; fileRef = 57303BB62006C6ED00355965 /* CBORBinary.h */; };
                57303BC12006E00C00355965 /* CBORReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 57303BBF2006E00C00355965 /* CBORReader.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               57303BD220087A8300355965 /* AuthenticatorResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 57303BCF20087A8300355965 /* AuthenticatorResponse.h */; };
+               57303BE120095D6100355965 /* JSAuthenticatorResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 57303BDD20095B2600355965 /* JSAuthenticatorResponse.h */; };
+               57303BE92009748D00355965 /* PublicKeyCredentialCreationOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 57303BE62009747A00355965 /* PublicKeyCredentialCreationOptions.h */; };
+               57303BEB20097F4000355965 /* PublicKeyCredentialType.h in Headers */ = {isa = PBXBuildFile; fileRef = 57303BEA20097F4000355965 /* PublicKeyCredentialType.h */; };
+               57303BEF200980C600355965 /* PublicKeyCredentialDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = 57303BEC200980BF00355965 /* PublicKeyCredentialDescriptor.h */; };
+               57303BF42009904600355965 /* JSPublicKeyCredentialDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = 57303BF22009904500355965 /* JSPublicKeyCredentialDescriptor.h */; };
+               57303C002009951C00355965 /* JSPublicKeyCredentialType.h in Headers */ = {isa = PBXBuildFile; fileRef = 57303BF92009913400355965 /* JSPublicKeyCredentialType.h */; };
+               57303C0A20099BAD00355965 /* PublicKeyCredentialRequestOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 57303C06200998F800355965 /* PublicKeyCredentialRequestOptions.h */; };
+               57303C1120099CB100355965 /* JSPublicKeyCredentialRequestOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 57303C0C20099C7500355965 /* JSPublicKeyCredentialRequestOptions.h */; };
+               57303C192009A2F300355965 /* JSPublicKeyCredentialCreationOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 57303C132009A25700355965 /* JSPublicKeyCredentialCreationOptions.h */; };
+               57303C1F2009AB4200355965 /* AuthenticatorAttestationResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 57303C1B2009A98600355965 /* AuthenticatorAttestationResponse.h */; };
+               57303C222009AF0300355965 /* JSAuthenticatorAttestationResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 57303C212009AEF600355965 /* JSAuthenticatorAttestationResponse.h */; };
+               57303C2C2009B4A800355965 /* AuthenticatorAssertionResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 57303C272009B2FC00355965 /* AuthenticatorAssertionResponse.h */; };
+               57303C2F2009B7E100355965 /* JSAuthenticatorAssertionResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 57303C2D2009B7D900355965 /* JSAuthenticatorAssertionResponse.h */; };
                573489391DAC6B6E00DC0667 /* CryptoAlgorithmParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 573489381DAC6B6D00DC0667 /* CryptoAlgorithmParameters.h */; };
                5739E12F1DAC7F7800E14383 /* JSCryptoAlgorithmParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 5739E12E1DAC7F7800E14383 /* JSCryptoAlgorithmParameters.h */; };
                5750A9751E68D00000705C4A /* CryptoKeyEC.h in Headers */ = {isa = PBXBuildFile; fileRef = 5750A9731E68D00000705C4A /* CryptoKeyEC.h */; };
                57303BB82006C6ED00355965 /* CBORWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CBORWriter.cpp; sourceTree = "<group>"; };
                57303BBE2006E00400355965 /* CBORReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CBORReader.cpp; sourceTree = "<group>"; };
                57303BBF2006E00C00355965 /* CBORReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CBORReader.h; sourceTree = "<group>"; };
+               57303BCF20087A8300355965 /* AuthenticatorResponse.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AuthenticatorResponse.h; sourceTree = "<group>"; };
+               57303BD020087A8300355965 /* AuthenticatorResponse.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AuthenticatorResponse.cpp; sourceTree = "<group>"; };
+               57303BD120087A8300355965 /* AuthenticatorResponse.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = AuthenticatorResponse.idl; sourceTree = "<group>"; };
+               57303BDD20095B2600355965 /* JSAuthenticatorResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAuthenticatorResponse.h; sourceTree = "<group>"; };
+               57303BDE20095B2700355965 /* JSAuthenticatorResponse.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAuthenticatorResponse.cpp; sourceTree = "<group>"; };
+               57303BE62009747A00355965 /* PublicKeyCredentialCreationOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PublicKeyCredentialCreationOptions.h; sourceTree = "<group>"; };
+               57303BE82009747A00355965 /* PublicKeyCredentialCreationOptions.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = PublicKeyCredentialCreationOptions.idl; sourceTree = "<group>"; };
+               57303BEA20097F4000355965 /* PublicKeyCredentialType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PublicKeyCredentialType.h; sourceTree = "<group>"; };
+               57303BEC200980BF00355965 /* PublicKeyCredentialDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PublicKeyCredentialDescriptor.h; sourceTree = "<group>"; };
+               57303BEE200980BF00355965 /* PublicKeyCredentialDescriptor.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = PublicKeyCredentialDescriptor.idl; sourceTree = "<group>"; };
+               57303BF02009846100355965 /* PublicKeyCredentialType.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = PublicKeyCredentialType.idl; sourceTree = "<group>"; };
+               57303BF12009904500355965 /* JSPublicKeyCredentialDescriptor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPublicKeyCredentialDescriptor.cpp; sourceTree = "<group>"; };
+               57303BF22009904500355965 /* JSPublicKeyCredentialDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPublicKeyCredentialDescriptor.h; sourceTree = "<group>"; };
+               57303BF92009913400355965 /* JSPublicKeyCredentialType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPublicKeyCredentialType.h; sourceTree = "<group>"; };
+               57303BFA2009913500355965 /* JSPublicKeyCredentialType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPublicKeyCredentialType.cpp; sourceTree = "<group>"; };
+               57303C06200998F800355965 /* PublicKeyCredentialRequestOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PublicKeyCredentialRequestOptions.h; sourceTree = "<group>"; };
+               57303C08200998F800355965 /* PublicKeyCredentialRequestOptions.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = PublicKeyCredentialRequestOptions.idl; sourceTree = "<group>"; };
+               57303C0B20099C7400355965 /* JSPublicKeyCredentialRequestOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPublicKeyCredentialRequestOptions.cpp; sourceTree = "<group>"; };
+               57303C0C20099C7500355965 /* JSPublicKeyCredentialRequestOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPublicKeyCredentialRequestOptions.h; sourceTree = "<group>"; };
+               57303C132009A25700355965 /* JSPublicKeyCredentialCreationOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPublicKeyCredentialCreationOptions.h; sourceTree = "<group>"; };
+               57303C142009A25700355965 /* JSPublicKeyCredentialCreationOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPublicKeyCredentialCreationOptions.cpp; sourceTree = "<group>"; };
+               57303C1B2009A98600355965 /* AuthenticatorAttestationResponse.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AuthenticatorAttestationResponse.h; sourceTree = "<group>"; };
+               57303C1C2009A98600355965 /* AuthenticatorAttestationResponse.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AuthenticatorAttestationResponse.cpp; sourceTree = "<group>"; };
+               57303C1D2009A98600355965 /* AuthenticatorAttestationResponse.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = AuthenticatorAttestationResponse.idl; sourceTree = "<group>"; };
+               57303C202009AEF500355965 /* JSAuthenticatorAttestationResponse.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAuthenticatorAttestationResponse.cpp; sourceTree = "<group>"; };
+               57303C212009AEF600355965 /* JSAuthenticatorAttestationResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAuthenticatorAttestationResponse.h; sourceTree = "<group>"; };
+               57303C272009B2FC00355965 /* AuthenticatorAssertionResponse.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AuthenticatorAssertionResponse.h; sourceTree = "<group>"; };
+               57303C282009B2FC00355965 /* AuthenticatorAssertionResponse.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AuthenticatorAssertionResponse.cpp; sourceTree = "<group>"; };
+               57303C292009B2FC00355965 /* AuthenticatorAssertionResponse.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = AuthenticatorAssertionResponse.idl; sourceTree = "<group>"; };
+               57303C2D2009B7D900355965 /* JSAuthenticatorAssertionResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAuthenticatorAssertionResponse.h; sourceTree = "<group>"; };
+               57303C2E2009B7DA00355965 /* JSAuthenticatorAssertionResponse.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAuthenticatorAssertionResponse.cpp; sourceTree = "<group>"; };
                573489381DAC6B6D00DC0667 /* CryptoAlgorithmParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CryptoAlgorithmParameters.h; sourceTree = "<group>"; };
                5739E12E1DAC7F7800E14383 /* JSCryptoAlgorithmParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCryptoAlgorithmParameters.h; sourceTree = "<group>"; };
                5739E1301DAC7FD100E14383 /* JSCryptoAlgorithmParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCryptoAlgorithmParameters.cpp; sourceTree = "<group>"; };
                        isa = PBXGroup;
                        children = (
                                57303BB32006C6ED00355965 /* cbor */,
+                               57303C282009B2FC00355965 /* AuthenticatorAssertionResponse.cpp */,
+                               57303C272009B2FC00355965 /* AuthenticatorAssertionResponse.h */,
+                               57303C292009B2FC00355965 /* AuthenticatorAssertionResponse.idl */,
+                               57303C1C2009A98600355965 /* AuthenticatorAttestationResponse.cpp */,
+                               57303C1B2009A98600355965 /* AuthenticatorAttestationResponse.h */,
+                               57303C1D2009A98600355965 /* AuthenticatorAttestationResponse.idl */,
+                               57303BD020087A8300355965 /* AuthenticatorResponse.cpp */,
+                               57303BCF20087A8300355965 /* AuthenticatorResponse.h */,
+                               57303BD120087A8300355965 /* AuthenticatorResponse.idl */,
                                57D8462C1FEAF68F00CA3682 /* PublicKeyCredential.cpp */,
                                57D8462B1FEAF68F00CA3682 /* PublicKeyCredential.h */,
                                57D8462D1FEAF68F00CA3682 /* PublicKeyCredential.idl */,
+                               57303BE62009747A00355965 /* PublicKeyCredentialCreationOptions.h */,
+                               57303BE82009747A00355965 /* PublicKeyCredentialCreationOptions.idl */,
+                               57303BEC200980BF00355965 /* PublicKeyCredentialDescriptor.h */,
+                               57303BEE200980BF00355965 /* PublicKeyCredentialDescriptor.idl */,
+                               57303C06200998F800355965 /* PublicKeyCredentialRequestOptions.h */,
+                               57303C08200998F800355965 /* PublicKeyCredentialRequestOptions.idl */,
+                               57303BEA20097F4000355965 /* PublicKeyCredentialType.h */,
+                               57303BF02009846100355965 /* PublicKeyCredentialType.idl */,
                        );
                        path = webauthn;
                        sourceTree = "<group>";
                57D8462F1FEAFB0500CA3682 /* WebAuthN */ = {
                        isa = PBXGroup;
                        children = (
+                               57303C2E2009B7DA00355965 /* JSAuthenticatorAssertionResponse.cpp */,
+                               57303C2D2009B7D900355965 /* JSAuthenticatorAssertionResponse.h */,
+                               57303C202009AEF500355965 /* JSAuthenticatorAttestationResponse.cpp */,
+                               57303C212009AEF600355965 /* JSAuthenticatorAttestationResponse.h */,
+                               57303BDE20095B2700355965 /* JSAuthenticatorResponse.cpp */,
+                               57303BDD20095B2600355965 /* JSAuthenticatorResponse.h */,
                                57D846311FEAFC2F00CA3682 /* JSPublicKeyCredential.cpp */,
                                57D846301FEAFC2F00CA3682 /* JSPublicKeyCredential.h */,
+                               57303C142009A25700355965 /* JSPublicKeyCredentialCreationOptions.cpp */,
+                               57303C132009A25700355965 /* JSPublicKeyCredentialCreationOptions.h */,
+                               57303BF12009904500355965 /* JSPublicKeyCredentialDescriptor.cpp */,
+                               57303BF22009904500355965 /* JSPublicKeyCredentialDescriptor.h */,
+                               57303C0B20099C7400355965 /* JSPublicKeyCredentialRequestOptions.cpp */,
+                               57303C0C20099C7500355965 /* JSPublicKeyCredentialRequestOptions.h */,
+                               57303BFA2009913500355965 /* JSPublicKeyCredentialType.cpp */,
+                               57303BF92009913400355965 /* JSPublicKeyCredentialType.h */,
                        );
                        name = WebAuthN;
                        sourceTree = "<group>";
                                934F713A0D5A6F1000018D69 /* AuthenticationChallengeBase.h in Headers */,
                                E124748410AA161D00B79493 /* AuthenticationClient.h in Headers */,
                                514C764C0CE9234E007EF3CD /* AuthenticationMac.h in Headers */,
+                               57303C2C2009B4A800355965 /* AuthenticatorAssertionResponse.h in Headers */,
+                               57303C1F2009AB4200355965 /* AuthenticatorAttestationResponse.h in Headers */,
+                               57303BD220087A8300355965 /* AuthenticatorResponse.h in Headers */,
                                A501920E132EBF2E008BFE55 /* Autocapitalize.h in Headers */,
                                A5A7AA43132F0ECC00D3A3C2 /* AutocapitalizeTypes.h in Headers */,
                                7C1843FE1C8B7283002EB973 /* Autofill.h in Headers */,
                                FDA15EB612B03EE1003A583A /* JSAudioProcessingEvent.h in Headers */,
                                BE8EF043171C8FF9009B48C3 /* JSAudioTrack.h in Headers */,
                                BE8EF045171C8FF9009B48C3 /* JSAudioTrackList.h in Headers */,
+                               57303C2F2009B7E100355965 /* JSAuthenticatorAssertionResponse.h in Headers */,
+                               57303C222009AF0300355965 /* JSAuthenticatorAttestationResponse.h in Headers */,
+                               57303BE120095D6100355965 /* JSAuthenticatorResponse.h in Headers */,
                                BC124F000C26447A009E2349 /* JSBarProp.h in Headers */,
                                57C7A69F1E57917800C67D71 /* JSBasicCredential.h in Headers */,
                                BC946348107A936600857193 /* JSBeforeLoadEvent.h in Headers */,
                                E44613EE0CD681BB00FADA75 /* JSProgressEvent.h in Headers */,
                                A578F43C1DE01423003DFC6A /* JSPromiseRejectionEvent.h in Headers */,
                                57D846351FEAFCD300CA3682 /* JSPublicKeyCredential.h in Headers */,
+                               57303C192009A2F300355965 /* JSPublicKeyCredentialCreationOptions.h in Headers */,
+                               57303BF42009904600355965 /* JSPublicKeyCredentialDescriptor.h in Headers */,
+                               57303C1120099CB100355965 /* JSPublicKeyCredentialRequestOptions.h in Headers */,
+                               57303C002009951C00355965 /* JSPublicKeyCredentialType.h in Headers */,
                                077664FD183E6B5C00133B92 /* JSQuickTimePluginReplacement.h in Headers */,
                                B658FFA21522EF3A00DD5595 /* JSRadioNodeList.h in Headers */,
                                65DF320209D1CC60000BE325 /* JSRange.h in Headers */,
                                1AF8E11A1256592600230FF7 /* ProxyServer.h in Headers */,
                                FF945ECC161F7F3600971BC8 /* PseudoElement.h in Headers */,
                                57D8462E1FEAF69900CA3682 /* PublicKeyCredential.h in Headers */,
+                               57303BE92009748D00355965 /* PublicKeyCredentialCreationOptions.h in Headers */,
+                               57303BEF200980C600355965 /* PublicKeyCredentialDescriptor.h in Headers */,
+                               57303C0A20099BAD00355965 /* PublicKeyCredentialRequestOptions.h in Headers */,
+                               57303BEB20097F4000355965 /* PublicKeyCredentialType.h in Headers */,
                                0081FF0016B0A2D3008AAA7A /* PublicSuffix.h in Headers */,
                                10FB084B14E15C7E00A3DB98 /* PublicURLManager.h in Headers */,
                                550A0BCA085F6039007353D6 /* QualifiedName.h in Headers */,
index 66c850f..3134851 100644 (file)
@@ -40,6 +40,9 @@ namespace WebCore {
     macro(ApplePaySession) \
     macro(AttachmentElement) \
     macro(Audio) \
+    macro(AuthenticatorAssertionResponse) \
+    macro(AuthenticatorAttestationResponse) \
+    macro(AuthenticatorResponse) \
     macro(Cache) \
     macro(CacheStorage) \
     macro(Client) \