[WebAuthN] Implement authenticatorMakeCredential
[WebKit-https.git] / Source / WebCore / platform / cocoa / LocalAuthenticationSoftLink.h
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#import "config.h"
-#import "WebCredentialsMessengerProxy.h"
-
-#if ENABLE(WEB_AUTHN)
+#pragma once
 
 #import <LocalAuthentication/LocalAuthentication.h>
-#import <WebCore/NotImplemented.h>
-#import <wtf/RetainPtr.h>
 #import <wtf/SoftLinking.h>
 
-SOFT_LINK_FRAMEWORK(LocalAuthentication)
-SOFT_LINK_CLASS(LocalAuthentication, LAContext);
-
-namespace WebKit {
-
-void WebCredentialsMessengerProxy::platformIsUserVerifyingPlatformAuthenticatorAvailable(uint64_t messageId)
-{
-#if defined(__i386__)
-    ASSERT_UNUSED(messageId, messageId);
-    notImplemented();
-#else
-    auto context = adoptNS([allocLAContextInstance() init]);
-    NSError *error = nil;
-
-    if ([context canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&error])
-        isUserVerifyingPlatformAuthenticatorAvailableReply(messageId, true);
-    else {
-        LOG_ERROR("Couldn't evaluate authentication with biometrics policy: %@", error);
-        isUserVerifyingPlatformAuthenticatorAvailableReply(messageId, false);
-    }
-#endif // defined(__i386__)
-}
-
-} // namespace WebKit
+SOFT_LINK_FRAMEWORK_FOR_HEADER(WebCore, LocalAuthentication)
 
-#endif // ENABLE(WEB_AUTHN)
+SOFT_LINK_CLASS_FOR_HEADER(WebCore, LocalAuthentication, LAContext)