Changeset 259680 in webkit
- Timestamp:
- Apr 7, 2020 4:01:20 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r259678 r259680 1 2020-04-07 Jiewen Tan <jiewen_tan@apple.com> 2 3 [WebAuthn] Cancel WebAuthn requests when users cancel LocalAuthentication prompts 4 https://bugs.webkit.org/show_bug.cgi?id=209923 5 <rdar://problem/61223713> 6 7 Reviewed by Brent Fulgham. 8 9 Adds a new test for the change and modifies existing tests to accommodate changes in MockWebAuthenticationConfiguration.idl. 10 11 * http/wpt/webauthn/public-key-credential-create-failure-local-silent.https.html: 12 * http/wpt/webauthn/public-key-credential-create-failure-local.https-expected.txt: 13 * http/wpt/webauthn/public-key-credential-create-failure-local.https.html: 14 * http/wpt/webauthn/public-key-credential-create-success-local.https.html: 15 * http/wpt/webauthn/public-key-credential-get-failure-local-silent.https.html: 16 * http/wpt/webauthn/public-key-credential-get-failure-local.https.html: 17 * http/wpt/webauthn/public-key-credential-get-success-local.https.html: 18 1 19 2020-04-07 Jacob Uphoff <jacob_uphoff@apple.com> 2 20 -
trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-local-silent.https.html
r258293 r259680 7 7 // Default mock configuration. Tests need to override if they need different configuration. 8 8 if (window.internals) 9 internals.setMockWebAuthenticationConfiguration({ silentFailure: true, local: { acceptAuthentication: false, acceptAttestation: false } });9 internals.setMockWebAuthenticationConfiguration({ silentFailure: true, local: { userVerification: "no", acceptAttestation: false } }); 10 10 11 11 promise_test(t => { … … 127 127 }; 128 128 if (window.internals) 129 internals.setMockWebAuthenticationConfiguration({ silentFailure: true, local: { acceptAuthentication: true, acceptAttestation: false } });129 internals.setMockWebAuthenticationConfiguration({ silentFailure: true, local: { userVerification: "yes", acceptAttestation: false } }); 130 130 return promiseRejects(t, "NotAllowedError", navigator.credentials.create(options), "Operation timed out."); 131 131 }, "PublicKeyCredential's [[create]] without private keys in a mock local authenticator."); … … 153 153 }; 154 154 if (window.internals) 155 internals.setMockWebAuthenticationConfiguration({ silentFailure: true, local: { acceptAuthentication: true, acceptAttestation: false, privateKeyBase64: privateKeyBase64 } });155 internals.setMockWebAuthenticationConfiguration({ silentFailure: true, local: { userVerification: "yes", acceptAttestation: false, privateKeyBase64: privateKeyBase64 } }); 156 156 return promiseRejects(t, "NotAllowedError", navigator.credentials.create(options), "Operation timed out.").then(() => { 157 157 if (window.testRunner) -
trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-local.https-expected.txt
r258293 r259680 8 8 PASS PublicKeyCredential's [[create]] not deleting old credential in a mock local authenticator. 9 9 PASS PublicKeyCredential's [[create]] with timeout in a mock local authenticator. 10 PASS PublicKeyCredential's [[create]] with user cancel in a mock local authenticator. 10 11 -
trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-local.https.html
r258293 r259680 7 7 // Default mock configuration. Tests need to override if they need different configuration. 8 8 if (window.internals) 9 internals.setMockWebAuthenticationConfiguration({ local: { acceptAuthentication: false, acceptAttestation: false } });9 internals.setMockWebAuthenticationConfiguration({ local: { userVerification: "no", acceptAttestation: false } }); 10 10 11 11 promise_test(t => { … … 122 122 }; 123 123 if (window.internals) 124 internals.setMockWebAuthenticationConfiguration({ local: { acceptAuthentication: true, acceptAttestation: false } });124 internals.setMockWebAuthenticationConfiguration({ local: { userVerification: "yes", acceptAttestation: false } }); 125 125 return promiseRejects(t, "UnknownError", navigator.credentials.create(options), "Couldn't create private key."); 126 126 }, "PublicKeyCredential's [[create]] without private keys in a mock local authenticator."); … … 147 147 }; 148 148 if (window.internals) 149 internals.setMockWebAuthenticationConfiguration({ local: { acceptAuthentication: true, acceptAttestation: false, privateKeyBase64: privateKeyBase64 } });149 internals.setMockWebAuthenticationConfiguration({ local: { userVerification: "yes", acceptAttestation: false, privateKeyBase64: privateKeyBase64 } }); 150 150 return promiseRejects(t, "UnknownError", navigator.credentials.create(options), "Couldn't attest: The operation couldn't complete.").then(() => { 151 151 if (window.testRunner) … … 174 174 }; 175 175 if (window.internals) { 176 internals.setMockWebAuthenticationConfiguration({ local: { acceptAuthentication: true, acceptAttestation: false } });176 internals.setMockWebAuthenticationConfiguration({ local: { userVerification: "yes", acceptAttestation: false } }); 177 177 testRunner.addTestKeyToKeychain(privateKeyBase64, testRpId, testUserEntityBundleBase64); 178 178 } … … 203 203 204 204 if (window.internals) 205 internals.setMockWebAuthenticationConfiguration({ local: { acceptAuthentication: false, acceptAttestation: false } });205 internals.setMockWebAuthenticationConfiguration({ local: { userVerification: "no", acceptAttestation: false } }); 206 206 return promiseRejects(t, "NotAllowedError", navigator.credentials.create(options), "Operation timed out."); 207 207 }, "PublicKeyCredential's [[create]] with timeout in a mock local authenticator."); 208 209 promise_test(function(t) { 210 const options = { 211 publicKey: { 212 rp: { 213 name: "example.com" 214 }, 215 user: { 216 name: "John Appleseed", 217 id: asciiToUint8Array("123456"), 218 displayName: "John", 219 }, 220 challenge: asciiToUint8Array("123456"), 221 pubKeyCredParams: [{ type: "public-key", alg: -7 }], 222 } 223 }; 224 225 if (window.internals) 226 internals.setMockWebAuthenticationConfiguration({ local: { userVerification: "cancel", acceptAttestation: false } }); 227 return promiseRejects(t, "NotAllowedError", navigator.credentials.create(options), "This request has been cancelled by the user."); 228 }, "PublicKeyCredential's [[create]] with user cancel in a mock local authenticator."); 229 208 230 </script> -
trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-success-local.https.html
r258293 r259680 53 53 internals.setMockWebAuthenticationConfiguration({ 54 54 local: { 55 acceptAuthentication: true,55 userVerification: "yes", 56 56 acceptAttestation: false, 57 57 privateKeyBase64: privateKeyBase64, … … 86 86 internals.setMockWebAuthenticationConfiguration({ 87 87 local: { 88 acceptAuthentication: true,88 userVerification: "yes", 89 89 acceptAttestation: false, 90 90 privateKeyBase64: privateKeyBase64, … … 120 120 internals.setMockWebAuthenticationConfiguration({ 121 121 local: { 122 acceptAuthentication: true,122 userVerification: "yes", 123 123 acceptAttestation: false, 124 124 privateKeyBase64: privateKeyBase64, … … 164 164 internals.setMockWebAuthenticationConfiguration({ 165 165 local: { 166 acceptAuthentication: true,166 userVerification: "yes", 167 167 acceptAttestation: false, 168 168 privateKeyBase64: privateKeyBase64, … … 198 198 internals.setMockWebAuthenticationConfiguration({ 199 199 local: { 200 acceptAuthentication: true,200 userVerification: "yes", 201 201 acceptAttestation: true, 202 202 privateKeyBase64: privateKeyBase64, … … 234 234 internals.setMockWebAuthenticationConfiguration({ 235 235 local: { 236 acceptAuthentication: true,236 userVerification: "yes", 237 237 acceptAttestation: true, 238 238 privateKeyBase64: privateKeyBase64, … … 270 270 internals.setMockWebAuthenticationConfiguration({ 271 271 local: { 272 acceptAuthentication: true,272 userVerification: "yes", 273 273 acceptAttestation: false, 274 274 privateKeyBase64: privateKeyBase64, … … 309 309 internals.setMockWebAuthenticationConfiguration({ 310 310 local: { 311 acceptAuthentication: true,311 userVerification: "yes", 312 312 acceptAttestation: true, 313 313 privateKeyBase64: privateKeyBase64, -
trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-failure-local-silent.https.html
r258293 r259680 7 7 promise_test(t => { 8 8 if (window.internals) 9 internals.setMockWebAuthenticationConfiguration({ silentFailure: true, local: { acceptAuthentication: false, acceptAttestation: false } });9 internals.setMockWebAuthenticationConfiguration({ silentFailure: true, local: { userVerification: "no", acceptAttestation: false } }); 10 10 11 11 const options = { … … 31 31 // Default mock configuration. Tests need to override if they need different configuration. 32 32 if (window.internals) 33 internals.setMockWebAuthenticationConfiguration({ silentFailure: true, local: { acceptAuthentication: false, acceptAttestation: false, preferredCredentialIdBase64: credentialIDBase64 } });33 internals.setMockWebAuthenticationConfiguration({ silentFailure: true, local: { userVerification: "no", acceptAttestation: false, preferredCredentialIdBase64: credentialIDBase64 } }); 34 34 35 35 const options = { … … 57 57 // Default mock configuration. Tests need to override if they need different configuration. 58 58 if (window.internals) 59 internals.setMockWebAuthenticationConfiguration({ silentFailure: true, local: { acceptAuthentication: false, acceptAttestation: false, preferredCredentialIdBase64: credentialIDBase64 } });59 internals.setMockWebAuthenticationConfiguration({ silentFailure: true, local: { userVerification: "no", acceptAttestation: false, preferredCredentialIdBase64: credentialIDBase64 } }); 60 60 61 61 const options = { -
trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-failure-local.https.html
r258293 r259680 7 7 promise_test(t => { 8 8 if (window.internals) 9 internals.setMockWebAuthenticationConfiguration({ local: { acceptAuthentication: false, acceptAttestation: false } });9 internals.setMockWebAuthenticationConfiguration({ local: { userVerification: "no", acceptAttestation: false } }); 10 10 11 11 const options = { … … 30 30 // Default mock configuration. Tests need to override if they need different configuration. 31 31 if (window.internals) 32 internals.setMockWebAuthenticationConfiguration({ local: { acceptAuthentication: false, acceptAttestation: false, preferredCredentialIdBase64: credentialIDBase64 } });32 internals.setMockWebAuthenticationConfiguration({ local: { userVerification: "no", acceptAttestation: false, preferredCredentialIdBase64: credentialIDBase64 } }); 33 33 34 34 const options = { … … 55 55 // Default mock configuration. Tests need to override if they need different configuration. 56 56 if (window.internals) 57 internals.setMockWebAuthenticationConfiguration({ local: { acceptAuthentication: false, acceptAttestation: false, preferredCredentialIdBase64: credentialIDBase64 } });57 internals.setMockWebAuthenticationConfiguration({ local: { userVerification: "no", acceptAttestation: false, preferredCredentialIdBase64: credentialIDBase64 } }); 58 58 59 59 const options = { -
trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-success-local.https.html
r258293 r259680 42 42 // Default mock configuration. Tests need to override if they need different configuration. 43 43 if (window.internals) 44 internals.setMockWebAuthenticationConfiguration({ local: { acceptAuthentication: true, acceptAttestation: false, preferredCredentialIdBase64: credentialIDBase64 } });44 internals.setMockWebAuthenticationConfiguration({ local: { userVerification: "yes", acceptAttestation: false, preferredCredentialIdBase64: credentialIDBase64 } }); 45 45 46 46 const options = { … … 63 63 // Default mock configuration. Tests need to override if they need different configuration. 64 64 if (window.internals) 65 internals.setMockWebAuthenticationConfiguration({ local: { acceptAuthentication: true, acceptAttestation: false, preferredCredentialIdBase64: credentialIDBase64 } });65 internals.setMockWebAuthenticationConfiguration({ local: { userVerification: "yes", acceptAttestation: false, preferredCredentialIdBase64: credentialIDBase64 } }); 66 66 67 67 const options = { -
trunk/Source/WebCore/ChangeLog
r259676 r259680 1 2020-04-07 Jiewen Tan <jiewen_tan@apple.com> 2 3 [WebAuthn] Cancel WebAuthn requests when users cancel LocalAuthentication prompts 4 https://bugs.webkit.org/show_bug.cgi?id=209923 5 <rdar://problem/61223713> 6 7 Reviewed by Brent Fulgham. 8 9 Covered by new tests within existing test files. 10 11 * testing/MockWebAuthenticationConfiguration.h: 12 (WebCore::MockWebAuthenticationConfiguration::LocalConfiguration::encode const): 13 (WebCore::MockWebAuthenticationConfiguration::LocalConfiguration::decode): 14 * testing/MockWebAuthenticationConfiguration.idl: 15 Adds a new parameter to reflect user cancellations on LocalAuthentication UI. 16 1 17 2020-04-07 Tadeu Zagallo <tzagallo@apple.com> 2 18 -
trunk/Source/WebCore/testing/MockWebAuthenticationConfiguration.h
r258293 r259680 62 62 }; 63 63 64 enum class UserVerification : uint8_t { 65 No, 66 Yes, 67 Cancel 68 }; 69 64 70 struct LocalConfiguration { 65 bool acceptAuthentication { false};71 UserVerification userVerification { UserVerification::No }; 66 72 bool acceptAttestation { false }; 67 73 String privateKeyBase64; … … 113 119 void MockWebAuthenticationConfiguration::LocalConfiguration::encode(Encoder& encoder) const 114 120 { 115 encoder << acceptAuthentication << acceptAttestation << privateKeyBase64 << userCertificateBase64 << intermediateCACertificateBase64 << preferredCredentialIdBase64;121 encoder << userVerification << acceptAttestation << privateKeyBase64 << userCertificateBase64 << intermediateCACertificateBase64 << preferredCredentialIdBase64; 116 122 } 117 123 … … 121 127 MockWebAuthenticationConfiguration::LocalConfiguration result; 122 128 123 Optional< bool> acceptAuthentication;124 decoder >> acceptAuthentication;125 if (! acceptAuthentication)126 return WTF::nullopt; 127 result. acceptAuthentication = *acceptAuthentication;129 Optional<UserVerification> userVerification; 130 decoder >> userVerification; 131 if (!userVerification) 132 return WTF::nullopt; 133 result.userVerification = *userVerification; 128 134 129 135 Optional<bool> acceptAttestation; … … 298 304 }; 299 305 306 template<> struct EnumTraits<WebCore::MockWebAuthenticationConfiguration::UserVerification> { 307 using values = EnumValues< 308 WebCore::MockWebAuthenticationConfiguration::UserVerification, 309 WebCore::MockWebAuthenticationConfiguration::UserVerification::No, 310 WebCore::MockWebAuthenticationConfiguration::UserVerification::Yes, 311 WebCore::MockWebAuthenticationConfiguration::UserVerification::Cancel 312 >; 313 }; 314 300 315 } // namespace WTF 301 316 -
trunk/Source/WebCore/testing/MockWebAuthenticationConfiguration.idl
r258293 r259680 62 62 [ 63 63 Conditional=WEB_AUTHN, 64 ] enum UserVerification { 65 "no", 66 "yes", 67 "cancel" 68 }; 69 70 [ 71 Conditional=WEB_AUTHN, 64 72 ] dictionary MockWebAuthenticationConfiguration { 65 73 boolean silentFailure = false; … … 72 80 Conditional=WEB_AUTHN, 73 81 ] dictionary MockLocalConfiguration { 74 boolean acceptAuthentication = false;82 UserVerification userVerification = "no"; 75 83 boolean acceptAttestation = false; 76 84 DOMString privateKeyBase64; -
trunk/Source/WebKit/ChangeLog
r259679 r259680 1 2020-04-07 Jiewen Tan <jiewen_tan@apple.com> 2 3 [WebAuthn] Cancel WebAuthn requests when users cancel LocalAuthentication prompts 4 https://bugs.webkit.org/show_bug.cgi?id=209923 5 <rdar://problem/61223713> 6 7 Reviewed by Brent Fulgham. 8 9 This patch intents to streamline WebAuthn local authenticator UX a bit more. Here, we should treat user 10 cancellation of the LocalAuthentication UI as if it were being done on the UI Client's WebAuthn UI. 11 12 * UIProcess/WebAuthentication/Authenticator.h: 13 * UIProcess/WebAuthentication/AuthenticatorManager.cpp: 14 (WebKit::AuthenticatorManager::cancelRequest): 15 * UIProcess/WebAuthentication/AuthenticatorManager.h: 16 * UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.h: 17 * UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm: 18 (WebKit::LocalAuthenticator::continueMakeCredentialAfterUserVerification): 19 (WebKit::LocalAuthenticator::continueGetAssertionAfterUserVerification): 20 (WebKit::LocalAuthenticator::validateUserVerification const): 21 * UIProcess/WebAuthentication/Cocoa/LocalConnection.h: 22 * UIProcess/WebAuthentication/Cocoa/LocalConnection.mm: 23 (WebKit::LocalConnection::verifyUser const): 24 * UIProcess/WebAuthentication/Mock/MockLocalConnection.mm: 25 (WebKit::MockLocalConnection::MockLocalConnection): 26 (WebKit::MockLocalConnection::verifyUser const): 27 (WebKit::MockLocalConnection::filterResponses const): 28 * WebKit.xcodeproj/project.pbxproj: 29 1 30 2020-04-07 Sihui Liu <sihui_liu@hotmail.com> 2 31 -
trunk/Source/WebKit/UIProcess/WebAuthentication/Authenticator.h
r257954 r259680 58 58 virtual void selectAssertionResponse(const HashSet<Ref<WebCore::AuthenticatorAssertionResponse>>&, WebAuthenticationSource, CompletionHandler<void(WebCore::AuthenticatorAssertionResponse*)>&&) = 0; 59 59 virtual void decidePolicyForLocalAuthenticator(CompletionHandler<void(LocalAuthenticatorPolicy)>&&) = 0; 60 virtual void cancelRequest() = 0; 60 61 }; 61 62 -
trunk/Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp
r258961 r259680 180 180 return; 181 181 } 182 invokePendingCompletionHandler(ExceptionData { NotAllowedError, "Operation timed out."_s }); 183 clearState(); 184 m_requestTimeOutTimer.stop(); 182 cancelRequest(); 185 183 } 186 184 … … 193 191 if (!m_pendingCompletionHandler || m_pendingRequestData.panel.get() != &panel) 194 192 return; 195 invokePendingCompletionHandler(ExceptionData { NotAllowedError, "This request has been cancelled by the user."_s }); 196 clearState(); 197 m_requestTimeOutTimer.stop(); 193 cancelRequest(); 198 194 } 199 195 … … 294 290 panel.client().decidePolicyForLocalAuthenticator(WTFMove(completionHandler)); 295 291 }); 292 } 293 294 void AuthenticatorManager::cancelRequest() 295 { 296 invokePendingCompletionHandler(ExceptionData { NotAllowedError, "This request has been cancelled by the user."_s }); 297 clearState(); 298 m_requestTimeOutTimer.stop(); 296 299 } 297 300 -
trunk/Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.h
r257954 r259680 85 85 void selectAssertionResponse(const HashSet<Ref<WebCore::AuthenticatorAssertionResponse>>&, WebAuthenticationSource, CompletionHandler<void(WebCore::AuthenticatorAssertionResponse*)>&&) final; 86 86 void decidePolicyForLocalAuthenticator(CompletionHandler<void(LocalAuthenticatorPolicy)>&&) final; 87 void cancelRequest() final; 87 88 88 89 // Overriden by MockAuthenticatorManager. -
trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.h
r258293 r259680 69 69 void receiveException(WebCore::ExceptionData&&, WebAuthenticationStatus = WebAuthenticationStatus::LAError) const; 70 70 void deleteDuplicateCredential() const; 71 bool validateUserVerification(LocalConnection::UserVerification) const; 71 72 72 73 State m_state { State::Init }; -
trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm
r258961 r259680 275 275 auto& creationOptions = WTF::get<PublicKeyCredentialCreationOptions>(requestData().options); 276 276 277 if (verification == LocalConnection::UserVerification::No) { 278 receiveException({ NotAllowedError, "Couldn't verify user."_s }); 279 return; 280 } 277 if (!validateUserVerification(verification)) 278 return; 281 279 282 280 // Here is the keychain schema. … … 501 499 m_state = State::UserVerified; 502 500 503 if (verification == LocalConnection::UserVerification::No) { 504 receiveException({ NotAllowedError, "Couldn't verify user."_s }); 505 return; 506 } 501 if (!validateUserVerification(verification)) 502 return; 507 503 508 504 // Step 10. … … 589 585 } 590 586 587 bool LocalAuthenticator::validateUserVerification(LocalConnection::UserVerification verification) const 588 { 589 if (verification == LocalConnection::UserVerification::Cancel) { 590 if (auto* observer = this->observer()) 591 observer->cancelRequest(); 592 return false; 593 } 594 595 if (verification == LocalConnection::UserVerification::No) { 596 receiveException({ NotAllowedError, "Couldn't verify user."_s }); 597 return false; 598 } 599 600 return true; 601 } 602 591 603 } // namespace WebKit 592 604 -
trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalConnection.h
r258961 r259680 52 52 WTF_MAKE_NONCOPYABLE(LocalConnection); 53 53 public: 54 enum class UserVerification : bool{54 enum class UserVerification : uint8_t { 55 55 No, 56 Yes 56 Yes, 57 Cancel 57 58 }; 58 59 -
trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalConnection.mm
r258961 r259680 84 84 LOG_ERROR("Couldn't authenticate with biometrics: %@", error); 85 85 verification = UserVerification::No; 86 if (error.code == LAErrorUserCancel) 87 verification = UserVerification::Cancel; 86 88 } 87 89 RunLoop::main().dispatch([completionHandler = WTFMove(completionHandler), verification, context = WTFMove(context)] () mutable { -
trunk/Source/WebKit/UIProcess/WebAuthentication/Mock/MockLocalConnection.mm
r258961 r259680 39 39 40 40 namespace WebKit { 41 using namespace WebCore; 41 42 42 MockLocalConnection::MockLocalConnection(const WebCore::MockWebAuthenticationConfiguration& configuration)43 MockLocalConnection::MockLocalConnection(const MockWebAuthenticationConfiguration& configuration) 43 44 : m_configuration(configuration) 44 45 { 45 46 } 46 47 47 void MockLocalConnection::verifyUser(const String&, WebCore::ClientDataType, SecAccessControlRef, UserVerificationCallback&& callback) const48 void MockLocalConnection::verifyUser(const String&, ClientDataType, SecAccessControlRef, UserVerificationCallback&& callback) const 48 49 { 49 50 // Mock async operations. 50 51 RunLoop::main().dispatch([configuration = m_configuration, callback = WTFMove(callback)]() mutable { 51 52 ASSERT(configuration.local); 52 if (!configuration.local->acceptAuthentication) { 53 callback(UserVerification::No, nil); 54 return; 53 54 UserVerification userVerification = UserVerification::No; 55 switch (configuration.local->userVerification) { 56 case MockWebAuthenticationConfiguration::UserVerification::No: 57 break; 58 case MockWebAuthenticationConfiguration::UserVerification::Yes: 59 userVerification = UserVerification::Yes; 60 break; 61 case MockWebAuthenticationConfiguration::UserVerification::Cancel: 62 userVerification = UserVerification::Cancel; 55 63 } 56 callback(UserVerification::Yes, adoptNS([allocLAContextInstance() init]).get()); 64 65 callback(userVerification, adoptNS([allocLAContextInstance() init]).get()); 57 66 }); 58 67 } … … 114 123 } 115 124 116 void MockLocalConnection::filterResponses(HashSet<Ref< WebCore::AuthenticatorAssertionResponse>>& responses) const125 void MockLocalConnection::filterResponses(HashSet<Ref<AuthenticatorAssertionResponse>>& responses) const 117 126 { 118 127 const auto& preferredCredentialIdBase64 = m_configuration.local->preferredCredentialIdBase64; -
trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj
r259674 r259680 3903 3903 57B8E3D62355864A00D5C5D1 /* FidoAuthenticator.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = FidoAuthenticator.cpp; sourceTree = "<group>"; }; 3904 3904 57BBEA6C22BC0BFE00273995 /* SOAuthorizationLoadPolicy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SOAuthorizationLoadPolicy.h; sourceTree = "<group>"; }; 3905 57C3E8AC242490D5001E2209 /* WebAuthenticationRequestData.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebAuthenticationRequestData.cpp; sourceTree = "<group>"; }; 3905 3906 57C6244A234679A400383FE7 /* WebAuthenticationFlags.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebAuthenticationFlags.h; sourceTree = "<group>"; }; 3906 3907 57DCED6A2142EAE20016B847 /* WebAuthenticatorCoordinatorMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebAuthenticatorCoordinatorMessages.h; path = DerivedSources/WebKit2/WebAuthenticatorCoordinatorMessages.h; sourceTree = BUILT_PRODUCTS_DIR; }; … … 8066 8067 57DCED8A214853130016B847 /* AuthenticatorTransportService.h */, 8067 8068 57C6244A234679A400383FE7 /* WebAuthenticationFlags.h */, 8069 57C3E8AC242490D5001E2209 /* WebAuthenticationRequestData.cpp */, 8068 8070 57DCEDA62149F9DA0016B847 /* WebAuthenticationRequestData.h */, 8069 8071 57608296202BD8BA00116678 /* WebAuthenticatorCoordinatorProxy.cpp */, -
trunk/Tools/ChangeLog
r259675 r259680 1 2020-04-07 Jiewen Tan <jiewen_tan@apple.com> 2 3 [WebAuthn] Cancel WebAuthn requests when users cancel LocalAuthentication prompts 4 https://bugs.webkit.org/show_bug.cgi?id=209923 5 <rdar://problem/61223713> 6 7 Reviewed by Brent Fulgham. 8 9 Modifies existing tests to accommodate changes in MockWebAuthenticationConfiguration.idl. 10 11 * TestWebKitAPI/Tests/WebKitCocoa/web-authentication-get-assertion-la.html: 12 * TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-la-duplicate-credential.html: 13 * TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-la-error.html: 14 * TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-la.html: 15 1 16 2020-04-07 Ryan Haddad <ryanhaddad@apple.com> 2 17 -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/web-authentication-get-assertion-la.html
r257954 r259680 2 2 <script> 3 3 if (window.internals) { 4 internals.setMockWebAuthenticationConfiguration({ local: { acceptAuthentication: true, acceptAttestation: false } });4 internals.setMockWebAuthenticationConfiguration({ local: { userVerification: "yes", acceptAttestation: false } }); 5 5 internals.withUserGesture(() => { input.focus(); }); 6 6 } -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-la-duplicate-credential.html
r257269 r259680 19 19 20 20 if (window.internals) { 21 internals.setMockWebAuthenticationConfiguration({ local: { acceptAuthentication: false, acceptAttestation: false } });21 internals.setMockWebAuthenticationConfiguration({ local: { userVerification: "no", acceptAttestation: false } }); 22 22 internals.withUserGesture(() => { input.focus(); }); 23 23 } -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-la-error.html
r257269 r259680 2 2 <script> 3 3 if (window.internals) { 4 internals.setMockWebAuthenticationConfiguration({ local: { acceptAuthentication: false, acceptAttestation: false } });4 internals.setMockWebAuthenticationConfiguration({ local: { userVerification: "no", acceptAttestation: false } }); 5 5 internals.withUserGesture(() => { input.focus(); }); 6 6 } -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-la.html
r257269 r259680 33 33 internals.setMockWebAuthenticationConfiguration({ 34 34 local: { 35 acceptAuthentication: true,35 userVerification: "yes", 36 36 acceptAttestation: true, 37 37 privateKeyBase64: testES256PrivateKeyBase64,
Note: See TracChangeset
for help on using the changeset viewer.