12021-01-14 Jiewen Tan <jiewen_tan@apple.com>
2
3 [WebAuthn] Polish the new WebAuthn UI
4 https://bugs.webkit.org/show_bug.cgi?id=220617
5 <rdar://problem/73185470>
6
7 Reviewed by NOBODY (OOPS!).
8
9 This patch does the following few things:
10 1. It updates the way how the PIN error for security keys is handled.
11 2. It uses the credential name to identify a credential that passed to the UI instead of the login choice object
12 as it turns out that the UI won't return the same object at all.
13 3. It delays to show the UI if the platform authenticator is involved given the platform authenticator might not contain
14 the requested credentials. If not, we should either show an error or just requesting the security key ones.
15
16 Covered by manual tests.
17
18 * Platform/spi/Cocoa/AuthenticationServicesCoreSPI.h:
19 (NS_ERROR_ENUM):
20 * UIProcess/WebAuthentication/Cocoa/AuthenticatorPresenterCoordinator.h:
21 * UIProcess/WebAuthentication/Cocoa/AuthenticatorPresenterCoordinator.mm:
22 (WebKit::AuthenticatorPresenterCoordinator::AuthenticatorPresenterCoordinator):
23 (WebKit::AuthenticatorPresenterCoordinator::updatePresenter):
24 (WebKit::AuthenticatorPresenterCoordinator::selectAssertionResponse):
25 (WebKit::AuthenticatorPresenterCoordinator::didSelectAssertionResponse):
26 * UIProcess/WebAuthentication/Cocoa/WKASCAuthorizationPresenterDelegate.mm:
27 (-[WKASCAuthorizationPresenterDelegate authorizationPresenter:credentialRequestedForLoginChoice:authenticatedContext:completionHandler:]):
28