Changeset 287002 in webkit
- Timestamp:
- Dec 13, 2021, 6:42:38 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 18 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/http/wpt/webauthn/public-key-credential-same-origin-with-ancestors.https-expected.txt (modified) (1 diff)
-
LayoutTests/http/wpt/webauthn/public-key-credential-same-origin-with-ancestors.https.html (modified) (1 diff)
-
LayoutTests/http/wpt/webauthn/resources/samesite-iframe.html (deleted)
-
LayoutTests/http/wpt/webauthn/resources/util.js (modified) (2 diffs)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/Modules/credentialmanagement/CredentialsContainer.cpp (modified) (4 diffs)
-
Source/WebCore/Modules/credentialmanagement/CredentialsContainer.h (modified) (2 diffs)
-
Source/WebCore/Modules/webauthn/AuthenticatorCoordinator.cpp (modified) (7 diffs)
-
Source/WebCore/Modules/webauthn/AuthenticatorCoordinator.h (modified) (2 diffs)
-
Source/WebCore/Modules/webauthn/WebAuthenticationConstants.h (modified) (1 diff)
-
Source/WebCore/Modules/webauthn/WebAuthenticationUtils.cpp (modified) (2 diffs)
-
Source/WebCore/Modules/webauthn/WebAuthenticationUtils.h (modified) (1 diff)
-
Source/WebCore/html/FeaturePolicy.cpp (modified) (5 diffs)
-
Source/WebCore/html/FeaturePolicy.h (modified) (2 diffs)
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/Platform/spi/Cocoa/AuthenticationServicesCoreSPI.h (modified) (2 diffs)
-
Source/WebKit/UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm (modified) (1 diff)
-
Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r287000 r287002 1 2021-12-13 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, reverting r286993. 4 https://bugs.webkit.org/show_bug.cgi?id=234283 5 6 7 Reverted changeset: 8 9 "[WebAuthn] Allow same-site, cross-origin iframe get()" 10 https://bugs.webkit.org/show_bug.cgi?id=234180 11 https://commits.webkit.org/r286993 12 1 13 2021-12-13 Christopher Reid <chris.reid@sony.com> 2 14 -
trunk/LayoutTests/http/wpt/webauthn/public-key-credential-same-origin-with-ancestors.https-expected.txt
r286993 r287002 3 3 PASS Tests that a frame that doesn't share the same origin with all its ancestors could not access the API. 4 4 PASS Tests that a frame that doesn't share the same origin with all its ancestors could not access the API. 2 5 PASS Tests that a frame that is same-site, cross-origin without publickey-credentials-get feature policy cannot use get().6 PASS Tests that a frame that is same-site, cross-origin with publickey-credentials-get feature policy can use get().7 PASS Tests that a frame that is cross-origin, NOT same-site with publickey-credentials-get feature policy cannot use get().8 5 -
trunk/LayoutTests/http/wpt/webauthn/public-key-credential-same-origin-with-ancestors.https.html
r286993 r287002 23 23 }); 24 24 }, "Tests that a frame that doesn't share the same origin with all its ancestors could not access the API. 2"); 25 26 promise_test(t => {27 return withSameSiteIframe("samesite-iframe.html").then((message) => {28 assert_equals(message.data, "Throw NotAllowedError: The origin of the document is not the same as its ancestors.");29 });30 }, "Tests that a frame that is same-site, cross-origin without publickey-credentials-get feature policy cannot use get().");31 32 promise_test(t => {33 return withSameSiteIframe("samesite-iframe.html", "publickey-credentials-get").then((message) => {34 assert_equals(message.data, "PASS!");35 });36 }, "Tests that a frame that is same-site, cross-origin with publickey-credentials-get feature policy can use get().");37 38 promise_test(t => {39 return withCrossOriginIframe("samesite-iframe.html", "publickey-credentials-get").then((message) => {40 assert_equals(message.data, "Throw NotAllowedError: The origin of the document is not the same as its ancestors.");41 });42 }, "Tests that a frame that is cross-origin, NOT same-site with publickey-credentials-get feature policy cannot use get().");43 25 </script> 44 26 </body> -
trunk/LayoutTests/http/wpt/webauthn/resources/util.js
r286993 r287002 305 305 } 306 306 307 function withCrossOriginIframe(resourceFile , allow = "")307 function withCrossOriginIframe(resourceFile) 308 308 { 309 309 return new Promise((resolve) => { … … 312 312 }); 313 313 const frame = document.createElement("iframe"); 314 frame.allow = allow;315 314 frame.src = get_host_info().HTTPS_REMOTE_ORIGIN + RESOURCES_DIR + resourceFile; 316 315 document.body.appendChild(frame); 317 });318 }319 320 function withSameSiteIframe(resourceFile, allow = "")321 {322 return new Promise((resolve) => {323 waitForLoad().then((message) => {324 resolve(message);325 });326 const frame = document.createElement("iframe");327 const host = get_host_info();328 frame.allow = allow;329 frame.src = "https://" + host.ORIGINAL_HOST + ":" + host.HTTPS_PORT2 + RESOURCES_DIR + resourceFile;330 document.body.appendChild(frame);331 316 }); 332 317 } -
trunk/Source/WebCore/ChangeLog
r287000 r287002 1 2021-12-13 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, reverting r286993. 4 https://bugs.webkit.org/show_bug.cgi?id=234283 5 6 7 Reverted changeset: 8 9 "[WebAuthn] Allow same-site, cross-origin iframe get()" 10 https://bugs.webkit.org/show_bug.cgi?id=234180 11 https://commits.webkit.org/r286993 12 1 13 2021-12-13 Christopher Reid <chris.reid@sony.com> 2 14 -
trunk/Source/WebCore/Modules/credentialmanagement/CredentialsContainer.cpp
r286993 r287002 38 38 #include "Page.h" 39 39 #include "SecurityOrigin.h" 40 #include "WebAuthenticationConstants.h"41 40 42 41 namespace WebCore { … … 47 46 } 48 47 49 WebAuthn::Scope CredentialsContainer::scope()48 bool CredentialsContainer::doesHaveSameOriginAsItsAncestors() 50 49 { 50 // The following implements https://w3c.github.io/webappsec-credential-management/#same-origin-with-its-ancestors 51 // as of 14 November 2017. 51 52 if (!m_document) 52 return WebAuthn::Scope::CrossOrigin; 53 54 bool isSameOrigin = true; 55 bool isSameSite = true; 53 return false; 54 56 55 auto& origin = m_document->securityOrigin(); 57 auto& url = m_document->url();58 56 for (auto* document = m_document->parentDocument(); document; document = document->parentDocument()) { 59 if (!origin.isSameOriginDomain(document->securityOrigin()) && !areRegistrableDomainsEqual(url, document->url()))60 isSameSite = false;61 57 if (!origin.isSameOriginAs(document->securityOrigin())) 62 isSameOrigin =false;58 return false; 63 59 } 64 65 if (isSameOrigin) 66 return WebAuthn::Scope::SameOrigin; 67 if (isSameSite) 68 return WebAuthn::Scope::SameSite; 69 return WebAuthn::Scope::CrossOrigin; 60 return true; 70 61 } 71 62 … … 99 90 } 100 91 101 m_document->page()->authenticatorCoordinator().discoverFromExternalSource(*m_document, options.publicKey.value(), scope(), WTFMove(options.signal), WTFMove(promise));92 m_document->page()->authenticatorCoordinator().discoverFromExternalSource(*m_document, options.publicKey.value(), doesHaveSameOriginAsItsAncestors(), WTFMove(options.signal), WTFMove(promise)); 102 93 } 103 94 … … 134 125 } 135 126 136 m_document->page()->authenticatorCoordinator().create(*m_document, options.publicKey.value(), scope(), WTFMove(options.signal), WTFMove(promise));127 m_document->page()->authenticatorCoordinator().create(*m_document, options.publicKey.value(), doesHaveSameOriginAsItsAncestors(), WTFMove(options.signal), WTFMove(promise)); 137 128 } 138 129 -
trunk/Source/WebCore/Modules/credentialmanagement/CredentialsContainer.h
r286993 r287002 33 33 #include <wtf/WeakPtr.h> 34 34 35 namespace WebAuthn {36 enum class Scope;37 }38 39 35 namespace WebCore { 40 36 … … 59 55 CredentialsContainer(WeakPtr<Document>&&); 60 56 61 WebAuthn::Scope scope();57 bool doesHaveSameOriginAsItsAncestors(); 62 58 63 59 WeakPtr<Document> m_document; -
trunk/Source/WebCore/Modules/webauthn/AuthenticatorCoordinator.cpp
r286993 r287002 35 35 #include "AuthenticatorResponseData.h" 36 36 #include "Document.h" 37 #include "FeaturePolicy.h"38 37 #include "JSBasicCredential.h" 39 38 #include "JSDOMPromiseDeferred.h" … … 106 105 } 107 106 108 void AuthenticatorCoordinator::create(const Document& document, const PublicKeyCredentialCreationOptions& options, WebAuthn::Scope scope, RefPtr<AbortSignal>&& abortSignal, CredentialPromise&& promise) const107 void AuthenticatorCoordinator::create(const Document& document, const PublicKeyCredentialCreationOptions& options, bool sameOriginWithAncestors, RefPtr<AbortSignal>&& abortSignal, CredentialPromise&& promise) const 109 108 { 110 109 using namespace AuthenticatorCoordinatorInternal; … … 116 115 // Step 1, 3, 16 are handled by the caller. 117 116 // Step 2. 118 if ( scope != WebAuthn::Scope::SameOrigin) {117 if (!sameOriginWithAncestors) { 119 118 promise.reject(Exception { NotAllowedError, "The origin of the document is not the same as its ancestors."_s }); 120 119 return; … … 150 149 151 150 // Step 13-15. 152 auto clientDataJson = buildClientDataJson(ClientDataType::Create, options.challenge, callerOrigin , scope);151 auto clientDataJson = buildClientDataJson(ClientDataType::Create, options.challenge, callerOrigin); 153 152 auto clientDataJsonHash = buildClientDataJsonHash(clientDataJson); 154 153 … … 177 176 } 178 177 179 void AuthenticatorCoordinator::discoverFromExternalSource(const Document& document, const PublicKeyCredentialRequestOptions& options, WebAuthn::Scope scope, RefPtr<AbortSignal>&& abortSignal, CredentialPromise&& promise) const178 void AuthenticatorCoordinator::discoverFromExternalSource(const Document& document, const PublicKeyCredentialRequestOptions& options, bool sameOriginWithAncestors, RefPtr<AbortSignal>&& abortSignal, CredentialPromise&& promise) const 180 179 { 181 180 using namespace AuthenticatorCoordinatorInternal; … … 187 186 // Step 1, 3, 13 are handled by the caller. 188 187 // Step 2. 189 // This implements https://www.w3.org/TR/webauthn-2/#sctn-permissions-policy except only same-site, cross-origin is permitted. 190 if (scope != WebAuthn::Scope::SameOrigin && !(scope == WebAuthn::Scope::SameSite && isFeaturePolicyAllowedByDocumentAndAllOwners(FeaturePolicy::Type::PublickeyCredentialsGetRule, document, LogFeaturePolicyFailure::No))) { 188 if (!sameOriginWithAncestors) { 191 189 promise.reject(Exception { NotAllowedError, "The origin of the document is not the same as its ancestors."_s }); 192 190 return; … … 222 220 223 221 // Step 10-12. 224 auto clientDataJson = buildClientDataJson(ClientDataType::Get, options.challenge, callerOrigin , scope);222 auto clientDataJson = buildClientDataJson(ClientDataType::Get, options.challenge, callerOrigin); 225 223 auto clientDataJsonHash = buildClientDataJsonHash(clientDataJson); 226 224 -
trunk/Source/WebCore/Modules/webauthn/AuthenticatorCoordinator.h
r286993 r287002 32 32 #include <wtf/Noncopyable.h> 33 33 34 namespace WebAuthn {35 enum class Scope;36 }37 38 34 namespace WebCore { 39 35 … … 58 54 59 55 // The following methods implement static methods of PublicKeyCredential. 60 void create(const Document&, const PublicKeyCredentialCreationOptions&, WebAuthn::Scope, RefPtr<AbortSignal>&&, CredentialPromise&&) const;61 void discoverFromExternalSource(const Document&, const PublicKeyCredentialRequestOptions&, WebAuthn::Scope, RefPtr<AbortSignal>&&, CredentialPromise&&) const;56 void create(const Document&, const PublicKeyCredentialCreationOptions&, bool sameOriginWithAncestors, RefPtr<AbortSignal>&&, CredentialPromise&&) const; 57 void discoverFromExternalSource(const Document&, const PublicKeyCredentialRequestOptions&, bool sameOriginWithAncestors, RefPtr<AbortSignal>&&, CredentialPromise&&) const; 62 58 void isUserVerifyingPlatformAuthenticatorAvailable(DOMPromiseDeferred<IDLBoolean>&&) const; 63 59 -
trunk/Source/WebCore/Modules/webauthn/WebAuthenticationConstants.h
r286993 r287002 81 81 82 82 } // namespace WebCore 83 84 namespace WebAuthn {85 86 enum class Scope {87 CrossOrigin,88 SameOrigin,89 SameSite90 };91 92 } // namespace WebAuthn -
trunk/Source/WebCore/Modules/webauthn/WebAuthenticationUtils.cpp
r286993 r287002 135 135 136 136 // FIXME(181948): Add token binding ID. 137 Ref<ArrayBuffer> buildClientDataJson(ClientDataType type, const BufferSource& challenge, const SecurityOrigin& origin , WebAuthn::Scope scope)137 Ref<ArrayBuffer> buildClientDataJson(ClientDataType type, const BufferSource& challenge, const SecurityOrigin& origin) 138 138 { 139 139 auto object = JSON::Object::create(); … … 148 148 object->setString("challenge"_s, base64URLEncodeToString(challenge.data(), challenge.length())); 149 149 object->setString("origin"_s, origin.toRawString()); 150 if (scope != WebAuthn::Scope::SameOrigin)151 object->setBoolean("crossOrigin"_s, scope != WebAuthn::Scope::SameOrigin);152 150 153 151 auto utf8JSONString = object->toJSONString().utf8(); -
trunk/Source/WebCore/Modules/webauthn/WebAuthenticationUtils.h
r286993 r287002 53 53 WEBCORE_EXPORT Vector<uint8_t> buildAttestationObject(Vector<uint8_t>&& authData, String&& format, cbor::CBORValue::MapValue&& statementMap, const AttestationConveyancePreference&); 54 54 55 WEBCORE_EXPORT Ref<ArrayBuffer> buildClientDataJson(ClientDataType /*type*/, const BufferSource& challenge, const SecurityOrigin& /*origin*/ , WebAuthn::Scope);55 WEBCORE_EXPORT Ref<ArrayBuffer> buildClientDataJson(ClientDataType /*type*/, const BufferSource& challenge, const SecurityOrigin& /*origin*/); 56 56 57 57 WEBCORE_EXPORT Vector<uint8_t> buildClientDataJsonHash(const ArrayBuffer& clientDataJson); -
trunk/Source/WebCore/html/FeaturePolicy.cpp
r286993 r287002 68 68 return "Magnetometer"; 69 69 #endif 70 #if ENABLE(WEB_AUTHN)71 case FeaturePolicy::Type::PublickeyCredentialsGetRule:72 return "PublickeyCredentialsGet";73 #endif74 70 #if ENABLE(WEBXR) 75 71 case FeaturePolicy::Type::XRSpatialTracking: … … 189 185 bool isMagnetometerInitialized = false; 190 186 #endif 191 #if ENABLE(WEB_AUTHN)192 bool isPublickeyCredentialsGetInitialized = false;193 #endif194 187 #if ENABLE(WEBXR) 195 188 bool isXRSpatialTrackingInitialized = false; … … 256 249 isMagnetometerInitialized = true; 257 250 updateList(document, policy.m_magnetometerRule, item.substring(13)); 258 continue;259 }260 #endif261 #if ENABLE(WEB_AUTHN)262 if (item.startsWith("publickey-credentials-get")) {263 isPublickeyCredentialsGetInitialized = true;264 updateList(document, policy.m_publickeyCredentialsGetRule, item.substring(26));265 251 continue; 266 252 } … … 297 283 if (!isMagnetometerInitialized) 298 284 policy.m_magnetometerRule.allowedList.add(document.securityOrigin().data()); 299 #endif300 #if ENABLE(WEB_AUTHN)301 if (!isPublickeyCredentialsGetInitialized)302 policy.m_publickeyCredentialsGetRule.allowedList.add(document.securityOrigin().data());303 285 #endif 304 286 #if ENABLE(WEBXR) … … 357 339 return isAllowedByFeaturePolicy(m_magnetometerRule, origin); 358 340 #endif 359 #if ENABLE(WEB_AUTHN)360 case Type::PublickeyCredentialsGetRule:361 return isAllowedByFeaturePolicy(m_publickeyCredentialsGetRule, origin);362 #endif363 341 #if ENABLE(WEBXR) 364 342 case Type::XRSpatialTracking: -
trunk/Source/WebCore/html/FeaturePolicy.h
r286993 r287002 54 54 Magnetometer, 55 55 #endif 56 #if ENABLE(WEB_AUTHN)57 PublickeyCredentialsGetRule,58 #endif59 56 #if ENABLE(WEBXR) 60 57 XRSpatialTracking, … … 85 82 AllowRule m_magnetometerRule; 86 83 #endif 87 #if ENABLE(WEB_AUTHN)88 AllowRule m_publickeyCredentialsGetRule;89 #endif90 84 #if ENABLE(WEBXR) 91 85 AllowRule m_xrSpatialTrackingRule; -
trunk/Source/WebKit/ChangeLog
r286999 r287002 1 2021-12-13 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, reverting r286993. 4 https://bugs.webkit.org/show_bug.cgi?id=234283 5 6 7 Reverted changeset: 8 9 "[WebAuthn] Allow same-site, cross-origin iframe get()" 10 https://bugs.webkit.org/show_bug.cgi?id=234180 11 https://commits.webkit.org/r286993 12 1 13 2021-12-13 Tim Horton <timothy_horton@apple.com> 2 14 -
trunk/Source/WebKit/Platform/spi/Cocoa/AuthenticationServicesCoreSPI.h
r286993 r287002 108 108 @interface ASCPublicKeyCredentialCreationOptions : NSObject <NSSecureCoding> 109 109 110 @property (nonatomic, nullable, copy) NSData *challenge; 111 @property (nonatomic, nullable, copy) NSData *clientDataHash; 110 @property (nonatomic, copy) NSData *challenge; 112 111 @property (nonatomic, copy) NSString *relyingPartyIdentifier; 113 112 @property (nonatomic, copy) NSString *userName; … … 118 117 @property (nonatomic) BOOL shouldRequireResidentKey; 119 118 120 @end121 122 @interface ASCPublicKeyCredentialAssertionOptions : NSObject <NSSecureCoding>123 @property (nonatomic, copy, readonly) NSString *relyingPartyIdentifier;124 @property (nonatomic, nullable, copy, readonly) NSData *challenge;125 @property (nonatomic, nullable, copy) NSData *clientDataHash;126 @property (nonatomic, nullable, readonly, copy) NSString *userVerificationPreference;127 119 @end 128 120 -
trunk/Source/WebKit/UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm
r286993 r287002 88 88 auto securityOrigin = WebCore::SecurityOrigin::createFromString(origin); 89 89 90 auto clientDataJson = buildClientDataJson(clientDataType, WebCore::BufferSource(challengeBuffer), securityOrigin , WebAuthn::Scope::SameOrigin);90 auto clientDataJson = buildClientDataJson(clientDataType, WebCore::BufferSource(challengeBuffer), securityOrigin); 91 91 return adoptNS([[NSData alloc] initWithBytes:clientDataJson->data() length:clientDataJson->byteLength()]); 92 92 } -
trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm
r286993 r287002 146 146 } 147 147 148 static RetainPtr<ASCCredentialRequestContext> configureRegistrationRequestContext(const PublicKeyCredentialCreationOptions& options , NSData *hash)148 static RetainPtr<ASCCredentialRequestContext> configureRegistrationRequestContext(const PublicKeyCredentialCreationOptions& options) 149 149 { 150 150 ASCCredentialRequestTypes requestTypes = ASCCredentialRequestTypePlatformPublicKeyRegistration | ASCCredentialRequestTypeSecurityKeyPublicKeyRegistration; … … 170 170 auto credentialCreationOptions = adoptNS([allocASCPublicKeyCredentialCreationOptionsInstance() init]); 171 171 172 if ([credentialCreationOptions respondsToSelector:@selector(setClientDataHash:)]) 173 [credentialCreationOptions setClientDataHash:toNSData(hash).get()]; 174 else 175 [credentialCreationOptions setChallenge:WebCore::toNSData(options.challenge).get()]; 172 [credentialCreationOptions setChallenge:WebCore::toNSData(options.challenge).get()]; 176 173 [credentialCreationOptions setRelyingPartyIdentifier:options.rp.id]; 177 174 [credentialCreationOptions setUserName:options.user.name]; … … 206 203 } 207 204 208 static RetainPtr<ASCCredentialRequestContext> configurationAssertionRequestContext(const PublicKeyCredentialRequestOptions& options , Vector<uint_8> hash)205 static RetainPtr<ASCCredentialRequestContext> configurationAssertionRequestContext(const PublicKeyCredentialRequestOptions& options) 209 206 { 210 207 ASCCredentialRequestTypes requestTypes = ASCCredentialRequestTypePlatformPublicKeyAssertion | ASCCredentialRequestTypeSecurityKeyPublicKeyAssertion; … … 231 228 [requestContext setRelyingPartyIdentifier:options.rpId]; 232 229 233 if (requestTypes & ASCCredentialRequestTypePlatformPublicKeyAssertion) { 234 auto assertionOptions = adoptNS(allocASCPublicKeyCredentialAssertionOptionsInstance()); 235 if ([assertionOptions respondsToSelector:@selector(initWithKind:relyingPartyIdentifier:clientDataHash:userVerificationPreference:allowedCredentials:)]) { 236 auto nsHash = toNSData(hash); 237 [assertionOptions initWithKind:ASCPublicKeyCredentialKindPlatform relyingPartyIdentifier:options.rpId clientDataHash:nsHash userVerificationPreference:userVerification.get() allowedCredentials:allowedCredentials.get()] 238 } else { 239 auto challenge = WebCore::toNSData(options.challenge); 240 [assertionOptions initWithKind:ASCPublicKeyCredentialKindPlatform relyingPartyIdentifier:options.rpId challenge:challenge.get() userVerificationPreference:userVerification.get() allowedCredentials:allowedCredentials.get()] 241 } 242 243 [requestContext setPlatformKeyCredentialAssertionOptions:assertionOptions.get()]; 244 } 245 246 if (requestTypes & ASCCredentialRequestTypeSecurityKeyPublicKeyAssertion) { 247 auto assertionOptions = adoptNS(allocASCPublicKeyCredentialAssertionOptionsInstance()); 248 if ([assertionOptions respondsToSelector:@selector(initWithKind:relyingPartyIdentifier:clientDataHash:userVerificationPreference:allowedCredentials:)]) { 249 auto nsHash = toNSData(hash); 250 [assertionOptions initWithKind:ASCPublicKeyCredentialKindSecurityKey relyingPartyIdentifier:options.rpId clientDataHash:nsHash userVerificationPreference:userVerification.get() allowedCredentials:allowedCredentials.get()]]; 251 } else { 252 auto challenge = WebCore::toNSData(options.challenge); 253 [assertionOptions initWithKind:ASCPublicKeyCredentialKindSecurityKey relyingPartyIdentifier:options.rpId challenge:challenge.get() userVerificationPreference:userVerification.get() allowedCredentials:allowedCredentials.get()]]; 254 } 255 [requestContext setSecurityKeyCredentialAssertionOptions:assertionOptions.get()]; 256 } 230 auto challenge = WebCore::toNSData(options.challenge); 231 232 if (requestTypes & ASCCredentialRequestTypePlatformPublicKeyAssertion) 233 [requestContext setPlatformKeyCredentialAssertionOptions:[allocASCPublicKeyCredentialAssertionOptionsInstance() initWithKind:ASCPublicKeyCredentialKindPlatform relyingPartyIdentifier:options.rpId challenge:challenge.get() userVerificationPreference:userVerification.get() allowedCredentials:allowedCredentials.get()]]; 234 235 if (requestTypes & ASCCredentialRequestTypeSecurityKeyPublicKeyAssertion) 236 [requestContext setSecurityKeyCredentialAssertionOptions:[allocASCPublicKeyCredentialAssertionOptionsInstance() initWithKind:ASCPublicKeyCredentialKindSecurityKey relyingPartyIdentifier:options.rpId challenge:challenge.get() userVerificationPreference:userVerification.get() allowedCredentials:allowedCredentials.get()]]; 257 237 258 238 return requestContext; … … 263 243 RetainPtr<ASCCredentialRequestContext> result; 264 244 WTF::switchOn(requestData.options, [&](const PublicKeyCredentialCreationOptions& options) { 265 result = configureRegistrationRequestContext(options , requestData.hash);245 result = configureRegistrationRequestContext(options); 266 246 }, [&](const PublicKeyCredentialRequestOptions& options) { 267 result = configurationAssertionRequestContext(options , requestData.hash);247 result = configurationAssertionRequestContext(options); 268 248 }); 269 249 return result;
Note:
See TracChangeset
for help on using the changeset viewer.