WebAuthenticatorCoordinatorProxy.h [plain text]
#pragma once
#if ENABLE(WEB_AUTHN)
#include "MessageReceiver.h"
#include <WebCore/FrameIdentifier.h>
#include <wtf/Forward.h>
#include <wtf/Noncopyable.h>
namespace WebCore {
struct ExceptionData;
struct PublicKeyCredentialCreationOptions;
struct AuthenticatorResponseData;
struct PublicKeyCredentialRequestOptions;
struct SecurityOriginData;
}
namespace WebKit {
class WebPageProxy;
struct FrameInfoData;
struct WebAuthenticationRequestData;
class WebAuthenticatorCoordinatorProxy : private IPC::MessageReceiver {
WTF_MAKE_FAST_ALLOCATED;
WTF_MAKE_NONCOPYABLE(WebAuthenticatorCoordinatorProxy);
public:
explicit WebAuthenticatorCoordinatorProxy(WebPageProxy&);
~WebAuthenticatorCoordinatorProxy();
private:
using RequestCompletionHandler = CompletionHandler<void(const WebCore::AuthenticatorResponseData&, const WebCore::ExceptionData&)>;
using QueryCompletionHandler = CompletionHandler<void(bool)>;
void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override;
void makeCredential(WebCore::FrameIdentifier, FrameInfoData&&, Vector<uint8_t>&& hash, WebCore::PublicKeyCredentialCreationOptions&&, bool processingUserGesture, RequestCompletionHandler&&);
void getAssertion(WebCore::FrameIdentifier, FrameInfoData&&, Vector<uint8_t>&& hash, WebCore::PublicKeyCredentialRequestOptions&&, bool processingUserGesture, RequestCompletionHandler&&);
void isUserVerifyingPlatformAuthenticatorAvailable(QueryCompletionHandler&&);
void handleRequest(WebAuthenticationRequestData&&, RequestCompletionHandler&&);
WebPageProxy& m_webPageProxy;
};
}
#endif // ENABLE(WEB_AUTHN)