Skip to content

Commit

Permalink
[WebAuthn] Implement getClientCapabilities()
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=265710
rdar://119058559

Reviewed by Pascoe.

Implement PublicKeyCredentials.getClientCapabilities(). This function returns a Promise of
a String->bool maplike object which indicates support for various WebAuthn features. Most
of this patch is plumbing over to the UI process, which then calls into the platform to
get the list of features.

* Source/WebCore/CMakeLists.txt:
* Source/WebCore/DerivedSources-input.xcfilelist:
* Source/WebCore/DerivedSources-output.xcfilelist:
* Source/WebCore/DerivedSources.make:
* Source/WebCore/Modules/webauthn/AuthenticatorCoordinator.cpp:
(WebCore::AuthenticatorCoordinator::getClientCapabilities const):
* Source/WebCore/Modules/webauthn/AuthenticatorCoordinator.h:
* Source/WebCore/Modules/webauthn/AuthenticatorCoordinatorClient.h:
* Source/WebCore/Modules/webauthn/PublicKeyCredential.cpp:
(WebCore::PublicKeyCredential::getClientCapabilities):
* Source/WebCore/Modules/webauthn/PublicKeyCredential.h:
* Source/WebCore/Modules/webauthn/PublicKeyCredential.idl:
* Source/WebCore/Modules/webauthn/PublicKeyCredentialClientCapabilities.cpp: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.idl.
(WebCore::PublicKeyCredentialClientCapabilities::PublicKeyCredentialClientCapabilities):
(WebCore::PublicKeyCredentialClientCapabilities::initializeMapLike):
(WebCore::PublicKeyCredentialClientCapabilities::add):
* Source/WebCore/Modules/webauthn/PublicKeyCredentialClientCapabilities.h: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.idl.
(WebCore::PublicKeyCredentialClientCapabilities::create):
(WebCore::PublicKeyCredentialClientCapabilities::map const):
* Source/WebCore/Modules/webauthn/PublicKeyCredentialClientCapabilities.idl: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.idl.
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebKit/Platform/spi/Cocoa/AuthenticationServicesCoreSPI.h:
* Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm:
* Source/WebKit/UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.h:
* Source/WebKit/UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.messages.in:
* Source/WebKit/WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp:
(WebKit::WebAuthenticatorCoordinator::getClientCapabilities):
* Source/WebKit/WebProcess/WebAuthentication/WebAuthenticatorCoordinator.h:

Canonical link: https://commits.webkit.org/271584@main
  • Loading branch information
Garrett Davidson authored and Pascoe committed Dec 6, 2023
1 parent 6497b16 commit 8496854
Show file tree
Hide file tree
Showing 21 changed files with 225 additions and 0 deletions.
1 change: 1 addition & 0 deletions Source/WebCore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,7 @@ set(WebCore_NON_SVG_IDL_FILES
Modules/webauthn/AuthenticatorResponse.idl
Modules/webauthn/AuthenticatorTransport.idl
Modules/webauthn/PublicKeyCredential.idl
Modules/webauthn/PublicKeyCredentialClientCapabilities.idl
Modules/webauthn/PublicKeyCredentialCreationOptions.idl
Modules/webauthn/PublicKeyCredentialDescriptor.idl
Modules/webauthn/PublicKeyCredentialRequestOptions.idl
Expand Down
1 change: 1 addition & 0 deletions Source/WebCore/DerivedSources-input.xcfilelist
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,7 @@ $(PROJECT_DIR)/Modules/webauthn/AuthenticatorAttestationResponse.idl
$(PROJECT_DIR)/Modules/webauthn/AuthenticatorResponse.idl
$(PROJECT_DIR)/Modules/webauthn/AuthenticatorTransport.idl
$(PROJECT_DIR)/Modules/webauthn/PublicKeyCredential.idl
$(PROJECT_DIR)/Modules/webauthn/PublicKeyCredentialClientCapabilities.idl
$(PROJECT_DIR)/Modules/webauthn/PublicKeyCredentialCreationOptions.idl
$(PROJECT_DIR)/Modules/webauthn/PublicKeyCredentialDescriptor.idl
$(PROJECT_DIR)/Modules/webauthn/PublicKeyCredentialRequestOptions.idl
Expand Down
2 changes: 2 additions & 0 deletions Source/WebCore/DerivedSources-output.xcfilelist
Original file line number Diff line number Diff line change
Expand Up @@ -2228,6 +2228,8 @@ $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSPromiseRejectionEvent.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSPromiseRejectionEvent.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSPublicKeyCredential.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSPublicKeyCredential.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSPublicKeyCredentialClientCapabilities.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSPublicKeyCredentialClientCapabilities.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSPublicKeyCredentialCreationOptions.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSPublicKeyCredentialCreationOptions.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSPublicKeyCredentialDescriptor.cpp
Expand Down
1 change: 1 addition & 0 deletions Source/WebCore/DerivedSources.make
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,7 @@ JS_BINDING_IDLS := \
$(WebCore)/Modules/webauthn/AuthenticatorResponse.idl \
$(WebCore)/Modules/webauthn/AuthenticatorTransport.idl \
$(WebCore)/Modules/webauthn/PublicKeyCredential.idl \
$(WebCore)/Modules/webauthn/PublicKeyCredentialClientCapabilities.idl \
$(WebCore)/Modules/webauthn/PublicKeyCredentialCreationOptions.idl \
$(WebCore)/Modules/webauthn/PublicKeyCredentialDescriptor.idl \
$(WebCore)/Modules/webauthn/PublicKeyCredentialRequestOptions.idl \
Expand Down
16 changes: 16 additions & 0 deletions Source/WebCore/Modules/webauthn/AuthenticatorCoordinator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include "JSCredentialCreationOptions.h"
#include "JSCredentialRequestOptions.h"
#include "JSDOMPromiseDeferred.h"
#include "JSPublicKeyCredentialClientCapabilities.h"
#include "PublicKeyCredential.h"
#include "PublicKeyCredentialCreationOptions.h"
#include "PublicKeyCredentialRequestOptions.h"
Expand Down Expand Up @@ -314,6 +315,21 @@ void AuthenticatorCoordinator::isConditionalMediationAvailable(const Document& d
m_client->isConditionalMediationAvailable(document.securityOrigin(), WTFMove(completionHandler));
}

void AuthenticatorCoordinator::getClientCapabilities(const Document& document, DOMPromiseDeferred<IDLInterface<PublicKeyCredentialClientCapabilities>>&& promise) const
{
if (!m_client) {
promise.reject(Exception { ExceptionCode::UnknownError, "Unknown internal error."_s });
return;
}

auto completionHandler = [promise = WTFMove(promise)] (HashMap<String, bool>&& resultMap) mutable {
auto result = PublicKeyCredentialClientCapabilities::create(WTFMove(resultMap));
promise.resolve(result);
};

m_client->getClientCapabilities(document.securityOrigin(), WTFMove(completionHandler));
}

void AuthenticatorCoordinator::resetUserGestureRequirement()
{
m_client->resetUserGestureRequirement();
Expand Down
3 changes: 3 additions & 0 deletions Source/WebCore/Modules/webauthn/AuthenticatorCoordinator.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class AbortSignal;
class AuthenticatorCoordinatorClient;
class BasicCredential;
class Document;
class PublicKeyCredentialClientCapabilities;

struct PublicKeyCredentialCreationOptions;
struct PublicKeyCredentialRequestOptions;
Expand All @@ -67,6 +68,8 @@ class AuthenticatorCoordinator final : public CanMakeWeakPtr<AuthenticatorCoordi
void isUserVerifyingPlatformAuthenticatorAvailable(const Document&, DOMPromiseDeferred<IDLBoolean>&&) const;
void isConditionalMediationAvailable(const Document&, DOMPromiseDeferred<IDLBoolean>&&) const;

void getClientCapabilities(const Document&, DOMPromiseDeferred<IDLInterface<PublicKeyCredentialClientCapabilities>>&&) const;

WEBCORE_EXPORT void resetUserGestureRequirement();

private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ struct PublicKeyCredentialCreationOptions;
struct PublicKeyCredentialRequestOptions;
class SecurityOriginData;

using CapabilitiesCompletionHandler = CompletionHandler<void(HashMap<String, bool>&&)>;
using RequestCompletionHandler = CompletionHandler<void(WebCore::AuthenticatorResponseData&&, WebCore::AuthenticatorAttachment, WebCore::ExceptionData&&)>;
using QueryCompletionHandler = CompletionHandler<void(bool)>;

Expand All @@ -64,6 +65,7 @@ class AuthenticatorCoordinatorClient : public CanMakeWeakPtr<AuthenticatorCoordi
virtual void getAssertion(const LocalFrame&, const SecurityOrigin&, const Vector<uint8_t>&, const PublicKeyCredentialRequestOptions&, MediationRequirement, const ScopeAndCrossOriginParent&, RequestCompletionHandler&&) = 0;
virtual void isConditionalMediationAvailable(const SecurityOrigin&, QueryCompletionHandler&&) = 0;
virtual void isUserVerifyingPlatformAuthenticatorAvailable(const SecurityOrigin&, QueryCompletionHandler&&) = 0;
virtual void getClientCapabilities(const SecurityOrigin&, CapabilitiesCompletionHandler&&) = 0;
virtual void cancel() = 0;

virtual void resetUserGestureRequirement() { }
Expand Down
6 changes: 6 additions & 0 deletions Source/WebCore/Modules/webauthn/PublicKeyCredential.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ void PublicKeyCredential::isUserVerifyingPlatformAuthenticatorAvailable(Document
page->authenticatorCoordinator().isUserVerifyingPlatformAuthenticatorAvailable(document, WTFMove(promise));
}

void PublicKeyCredential::getClientCapabilities(Document& document, DOMPromiseDeferred<IDLInterface<PublicKeyCredentialClientCapabilities>>&& promise)
{
if (auto* page = document.page())
page->authenticatorCoordinator().getClientCapabilities(document, WTFMove(promise));
}

} // namespace WebCore

#endif // ENABLE(WEB_AUTHN)
3 changes: 3 additions & 0 deletions Source/WebCore/Modules/webauthn/PublicKeyCredential.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ namespace WebCore {
enum class AuthenticatorAttachment : uint8_t;
class AuthenticatorResponse;
class Document;
class PublicKeyCredentialClientCapabilities;

struct AuthenticationExtensionsClientOutputs;

Expand All @@ -52,6 +53,8 @@ class PublicKeyCredential final : public BasicCredential {

static void isUserVerifyingPlatformAuthenticatorAvailable(Document&, DOMPromiseDeferred<IDLBoolean>&&);

static void getClientCapabilities(Document&, DOMPromiseDeferred<IDLInterface<PublicKeyCredentialClientCapabilities>>&&);

private:
PublicKeyCredential(Ref<AuthenticatorResponse>&&);

Expand Down
1 change: 1 addition & 0 deletions Source/WebCore/Modules/webauthn/PublicKeyCredential.idl
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@
AuthenticationExtensionsClientOutputs getClientExtensionResults();

[CallWith=CurrentDocument] static Promise<boolean> isUserVerifyingPlatformAuthenticatorAvailable();
[CallWith=CurrentDocument] static Promise<PublicKeyCredentialClientCapabilities> getClientCapabilities();
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/*
* Copyright (C) 2023 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.
*/

#if ENABLE(WEB_AUTHN)

#include "config.h"
#include "PublicKeyCredentialClientCapabilities.h"

#include "JSDOMMapLike.h"

namespace WebCore {

PublicKeyCredentialClientCapabilities::~PublicKeyCredentialClientCapabilities() = default;

PublicKeyCredentialClientCapabilities::PublicKeyCredentialClientCapabilities(HashMap<String, bool>&& map)
: m_map(WTFMove(map))
{
}

void PublicKeyCredentialClientCapabilities::initializeMapLike(DOMMapAdapter& map)
{
for (auto& keyValue : m_map)
map.set<IDLDOMString, IDLBoolean>(keyValue.key, keyValue.value);
}

void PublicKeyCredentialClientCapabilities::add(const String& name, bool support)
{
m_map.add(name, support);
}

} // namespace WebCore

#endif // ENABLE(WEB_AUTHN)
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
* Copyright (C) 2023 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

#if ENABLE(WEB_AUTHN)
#include <wtf/HashMap.h>
#include <wtf/RefCounted.h>

namespace WebCore {

class DOMMapAdapter;

class PublicKeyCredentialClientCapabilities : public RefCounted<PublicKeyCredentialClientCapabilities> {
public:
static Ref<PublicKeyCredentialClientCapabilities> create(HashMap<String, bool>&& map)
{
return adoptRef(*new PublicKeyCredentialClientCapabilities(WTFMove(map)));
}
~PublicKeyCredentialClientCapabilities();

void initializeMapLike(DOMMapAdapter&);
void add(const String&, bool);

const HashMap<String, bool>& map() const { return m_map; }

private:
PublicKeyCredentialClientCapabilities(HashMap<String, bool>&&);

HashMap<String, bool> m_map;
};

} // namespace WebCore

#endif // ENABLE(WEB_AUTHN)
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Copyright (C) 2023 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.
*/

[
Conditional=WEB_AUTHN,
Exposed=Window,
JSGenerateToJSObject,
] interface PublicKeyCredentialClientCapabilities {
readonly maplike<DOMString, boolean>;
};
2 changes: 2 additions & 0 deletions Source/WebCore/Sources.txt
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ Modules/webauthn/AuthenticatorAttestationResponse.cpp
Modules/webauthn/AuthenticatorCoordinator.cpp
Modules/webauthn/AuthenticatorResponse.cpp
Modules/webauthn/PublicKeyCredential.cpp
Modules/webauthn/PublicKeyCredentialClientCapabilities.cpp
Modules/webauthn/WebAuthenticationUtils.cpp
Modules/webauthn/apdu/ApduCommand.cpp
Modules/webauthn/apdu/ApduResponse.cpp
Expand Down Expand Up @@ -4007,6 +4008,7 @@ JSProcessingInstruction.cpp
JSProgressEvent.cpp
JSPromiseRejectionEvent.cpp
JSPublicKeyCredential.cpp
JSPublicKeyCredentialClientCapabilities.cpp
JSPublicKeyCredentialCreationOptions.cpp
JSPublicKeyCredentialDescriptor.cpp
JSPublicKeyCredentialRequestOptions.cpp
Expand Down
14 changes: 14 additions & 0 deletions Source/WebCore/WebCore.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,8 @@
0C45342810CDBBFA00869157 /* JSWebGLUniformLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 0C45342610CDBBFA00869157 /* JSWebGLUniformLocation.h */; };
0D44C33E2ABA1B9F0017FB5D /* ThermalMitigationNotifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D8EF8122A9D511F000118F8 /* ThermalMitigationNotifier.h */; settings = {ATTRIBUTES = (Private, ); }; };
0DFB86682B16CC98009A0A0D /* JSCredentialMediationRequirement.h in Headers */ = {isa = PBXBuildFile; fileRef = 0DFB86642B16CC1E009A0A0D /* JSCredentialMediationRequirement.h */; };
0DFB86792B1A42CB009A0A0D /* JSPublicKeyCredentialClientCapabilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 0DFB86742B1A4237009A0A0D /* JSPublicKeyCredentialClientCapabilities.h */; };
0DFB867A2B1A7130009A0A0D /* PublicKeyCredentialClientCapabilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 0DFB866C2B17F4B6009A0A0D /* PublicKeyCredentialClientCapabilities.h */; settings = {ATTRIBUTES = (Private, ); }; };
0E7058F41BC5CEDA0045A507 /* SearchPopupMenuCocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = 0E7058F31BC5CCD70045A507 /* SearchPopupMenuCocoa.h */; settings = {ATTRIBUTES = (Private, ); }; };
0E9C1157291C18A400A2C2F2 /* ScreenDataOverrides.h in Headers */ = {isa = PBXBuildFile; fileRef = 0E9C1155291BF3CC00A2C2F2 /* ScreenDataOverrides.h */; settings = {ATTRIBUTES = (Private, ); }; };
0F03C0741884695E00A5F8CA /* SystemMemory.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F03C0731884695E00A5F8CA /* SystemMemory.h */; };
Expand Down Expand Up @@ -7040,6 +7042,11 @@
0DD1F6F0291433EB00B79355 /* GPUCanvasContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GPUCanvasContext.h; sourceTree = "<group>"; };
0DFB86632B16CC1E009A0A0D /* JSCredentialMediationRequirement.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSCredentialMediationRequirement.cpp; sourceTree = "<group>"; };
0DFB86642B16CC1E009A0A0D /* JSCredentialMediationRequirement.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSCredentialMediationRequirement.h; sourceTree = "<group>"; };
0DFB866C2B17F4B6009A0A0D /* PublicKeyCredentialClientCapabilities.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PublicKeyCredentialClientCapabilities.h; sourceTree = "<group>"; };
0DFB866D2B17F4C7009A0A0D /* PublicKeyCredentialClientCapabilities.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = PublicKeyCredentialClientCapabilities.idl; sourceTree = "<group>"; };
0DFB866E2B1953A1009A0A0D /* PublicKeyCredentialClientCapabilities.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = PublicKeyCredentialClientCapabilities.cpp; sourceTree = "<group>"; };
0DFB86742B1A4237009A0A0D /* JSPublicKeyCredentialClientCapabilities.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSPublicKeyCredentialClientCapabilities.h; sourceTree = "<group>"; };
0DFB86752B1A4237009A0A0D /* JSPublicKeyCredentialClientCapabilities.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSPublicKeyCredentialClientCapabilities.cpp; sourceTree = "<group>"; };
0E7058ED1BC5BC190045A507 /* SearchPopupMenuCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SearchPopupMenuCocoa.mm; sourceTree = "<group>"; };
0E7058F31BC5CCD70045A507 /* SearchPopupMenuCocoa.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SearchPopupMenuCocoa.h; sourceTree = "<group>"; };
0E9C1155291BF3CC00A2C2F2 /* ScreenDataOverrides.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ScreenDataOverrides.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -26234,6 +26241,9 @@
57D8462C1FEAF68F00CA3682 /* PublicKeyCredential.cpp */,
57D8462B1FEAF68F00CA3682 /* PublicKeyCredential.h */,
57D8462D1FEAF68F00CA3682 /* PublicKeyCredential.idl */,
0DFB866E2B1953A1009A0A0D /* PublicKeyCredentialClientCapabilities.cpp */,
0DFB866C2B17F4B6009A0A0D /* PublicKeyCredentialClientCapabilities.h */,
0DFB866D2B17F4C7009A0A0D /* PublicKeyCredentialClientCapabilities.idl */,
57303BE62009747A00355965 /* PublicKeyCredentialCreationOptions.h */,
57303BE82009747A00355965 /* PublicKeyCredentialCreationOptions.idl */,
57303BEC200980BF00355965 /* PublicKeyCredentialDescriptor.h */,
Expand Down Expand Up @@ -26274,6 +26284,8 @@
57DCED92214880C60016B847 /* JSAuthenticatorTransport.h */,
57D846311FEAFC2F00CA3682 /* JSPublicKeyCredential.cpp */,
57D846301FEAFC2F00CA3682 /* JSPublicKeyCredential.h */,
0DFB86752B1A4237009A0A0D /* JSPublicKeyCredentialClientCapabilities.cpp */,
0DFB86742B1A4237009A0A0D /* JSPublicKeyCredentialClientCapabilities.h */,
57303C142009A25700355965 /* JSPublicKeyCredentialCreationOptions.cpp */,
57303C132009A25700355965 /* JSPublicKeyCredentialCreationOptions.h */,
57303BF12009904500355965 /* JSPublicKeyCredentialDescriptor.cpp */,
Expand Down Expand Up @@ -39906,6 +39918,7 @@
E44613EE0CD681BB00FADA75 /* JSProgressEvent.h in Headers */,
A578F43C1DE01423003DFC6A /* JSPromiseRejectionEvent.h in Headers */,
57D846351FEAFCD300CA3682 /* JSPublicKeyCredential.h in Headers */,
0DFB86792B1A42CB009A0A0D /* JSPublicKeyCredentialClientCapabilities.h in Headers */,
57303C192009A2F300355965 /* JSPublicKeyCredentialCreationOptions.h in Headers */,
57303BF42009904600355965 /* JSPublicKeyCredentialDescriptor.h in Headers */,
57303C1120099CB100355965 /* JSPublicKeyCredentialRequestOptions.h in Headers */,
Expand Down Expand Up @@ -41056,6 +41069,7 @@
E45A6C772417BA59006E4CD5 /* PseudoClassChangeInvalidation.h in Headers */,
FF945ECC161F7F3600971BC8 /* PseudoElement.h in Headers */,
57D8462E1FEAF69900CA3682 /* PublicKeyCredential.h in Headers */,
0DFB867A2B1A7130009A0A0D /* PublicKeyCredentialClientCapabilities.h in Headers */,
57303BE92009748D00355965 /* PublicKeyCredentialCreationOptions.h in Headers */,
57303BEF200980C600355965 /* PublicKeyCredentialDescriptor.h in Headers */,
57303C0A20099BAD00355965 /* PublicKeyCredentialRequestOptions.h in Headers */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
@property (class, nonatomic) BOOL shouldUseAlternateCredentialStore;
+ (BOOL)arePasskeysDisallowedForRelyingParty:(nonnull NSString *)relyingParty;
+ (BOOL)canCurrentProcessAccessPasskeysForRelyingParty:(nonnull NSString *)relyingParty;
+ (void)getClientCapabilitiesForRelyingParty:(nonnull NSString *)relyingParty withCompletionHandler:(void (^ _Nonnull)(NSDictionary<NSString *, NSNumber *> * _Nonnull))completionHandler;
@end

// FIXME: Most of the forward declarations below should be behind a non-Apple-internal SDK compile-time flag.
Expand Down
Loading

0 comments on commit 8496854

Please sign in to comment.