Changeset 234912 in webkit
- Timestamp:
- Aug 15, 2018 10:38:39 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 37 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r234901 r234912 1 2018-08-15 Ansh Shukla <ansh_shukla@apple.com> 2 3 NSURLAuthenticationMethodOAuth challenges are surfaced to clients in -didReceiveAuthenticationChallenge as NSURLAuthenticationMethodDefault 4 https://bugs.webkit.org/show_bug.cgi?id=186870 5 6 Reviewed by Alex Christensen. 7 8 Ensure the exposed authentication type to clients is OAuth. 9 10 * http/tests/loading/oauth-expected.txt: Added. 11 * http/tests/loading/oauth.html: Added. 12 * http/tests/loading/resources/oauth-subresource.php: Added. 13 1 14 2018-08-15 Christopher Reid <chris.reid@sony.com> 2 15 -
trunk/LayoutTests/http/tests/cache/disk-cache/speculative-validation/http-auth-expected.txt
r234897 r234912 1 127.0.0.1:8000 - didReceiveAuthenticationChallenge - Responding with testUsername:testPassword2 127.0.0.1:8000 - didReceiveAuthenticationChallenge - Simulating cancelled authentication sheet1 127.0.0.1:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Responding with testUsername:testPassword 2 127.0.0.1:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Simulating cancelled authentication sheet 3 3 Tests speculative revalidation of authenticated resources. 4 4 -
trunk/LayoutTests/platform/mac-wk2/http/tests/inspector/network/resource-request-headers-expected.txt
r234897 r234912 1 127.0.0.1:8000 - didReceiveAuthenticationChallenge - Simulating cancelled authentication sheet2 127.0.0.1:8000 - didReceiveAuthenticationChallenge - Simulating cancelled authentication sheet1 127.0.0.1:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Simulating cancelled authentication sheet 2 127.0.0.1:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Simulating cancelled authentication sheet 3 3 Test for Resource request headers which may not have been immediately available but eventually are (Cookie, Authorization). 4 4 -
trunk/LayoutTests/platform/wk2/http/tests/loading/authentication-after-redirect-stores-wrong-credentials/authentication-after-redirect-stores-wrong-credentials-expected.txt
r234897 r234912 4 4 frame "<!--frame1-->" - didStartProvisionalLoadForFrame 5 5 frame "<!--frame1-->" - didReceiveServerRedirectForProvisionalLoadForFrame 6 127.0.0.1:8000 - didReceiveAuthenticationChallenge - Responding with httpUsername:httpPassword6 127.0.0.1:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Responding with httpUsername:httpPassword 7 7 frame "<!--frame1-->" - didCommitLoadForFrame 8 8 frame "<!--frame1-->" - didFinishDocumentLoadForFrame -
trunk/LayoutTests/platform/wk2/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes-expected.txt
r231456 r234912 3 3 main frame - didFinishDocumentLoadForFrame 4 4 frame "<!--frame1-->" - didStartProvisionalLoadForFrame 5 127.0.0.1:8000 - didReceiveAuthenticationChallenge - Responding with webkit:rocks5 127.0.0.1:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Responding with webkit:rocks 6 6 frame "<!--frame1-->" - didCommitLoadForFrame 7 7 frame "<!--frame1-->" - didFinishDocumentLoadForFrame -
trunk/LayoutTests/platform/wk2/http/tests/loading/basic-auth-resend-wrong-credentials-expected.txt
r234897 r234912 5 5 main frame - didFinishLoadForFrame 6 6 frame "<!--frame1-->" - didStartProvisionalLoadForFrame 7 127.0.0.1:8000 - didReceiveAuthenticationChallenge - Responding with wrongusername:wrongpassword7 127.0.0.1:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Responding with wrongusername:wrongpassword 8 8 frame "<!--frame1-->" - didCommitLoadForFrame 9 9 frame "<!--frame1-->" - didFinishDocumentLoadForFrame … … 11 11 frame "<!--frame1-->" - didFinishLoadForFrame 12 12 frame "<!--frame2-->" - didStartProvisionalLoadForFrame 13 127.0.0.1:8000 - didReceiveAuthenticationChallenge - Responding with correctusername:correctpassword13 127.0.0.1:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Responding with correctusername:correctpassword 14 14 frame "<!--frame2-->" - didCommitLoadForFrame 15 15 frame "<!--frame2-->" - didFinishDocumentLoadForFrame -
trunk/LayoutTests/platform/wk2/http/tests/loading/basic-credentials-sent-automatically-expected.txt
r234897 r234912 5 5 main frame - didFinishLoadForFrame 6 6 frame "<!--frame1-->" - didStartProvisionalLoadForFrame 7 127.0.0.1:8000 - didReceiveAuthenticationChallenge - Responding with first:first-pw7 127.0.0.1:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Responding with first:first-pw 8 8 frame "<!--frame1-->" - didCommitLoadForFrame 9 9 frame "<!--frame1-->" - didFinishDocumentLoadForFrame … … 11 11 frame "<!--frame1-->" - didFinishLoadForFrame 12 12 frame "<!--frame2-->" - didStartProvisionalLoadForFrame 13 127.0.0.1:8000 - didReceiveAuthenticationChallenge - Responding with second:second-pw13 127.0.0.1:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Responding with second:second-pw 14 14 frame "<!--frame2-->" - didCommitLoadForFrame 15 15 frame "<!--frame2-->" - didFinishDocumentLoadForFrame -
trunk/LayoutTests/platform/wk2/http/tests/media/video-auth-expected.txt
r234897 r234912 1 127.0.0.1:8000 - didReceiveAuthenticationChallenge - Responding with username:password1 127.0.0.1:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Responding with username:password 2 2 3 3 Tests that the media player sends authorization credentials when requesting a media file. -
trunk/LayoutTests/platform/wk2/http/tests/media/video-auth-with-allowCrossOriginSubresourcesToAskForCredentials-expected.txt
r234897 r234912 1 127.0.0.1:8000 - didReceiveAuthenticationChallenge - Responding with username:password2 localhost:8000 - didReceiveAuthenticationChallenge - Responding with username:password1 127.0.0.1:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Responding with username:password 2 localhost:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Responding with username:password 3 3 4 4 Tests that the media player sends authorization credentials when requesting a media file. -
trunk/LayoutTests/platform/wk2/http/tests/misc/401-alternative-content-expected.txt
r234897 r234912 1 127.0.0.1:8000 - didReceiveAuthenticationChallenge - Simulating cancelled authentication sheet1 127.0.0.1:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Simulating cancelled authentication sheet 2 2 PASS -
trunk/LayoutTests/platform/wk2/http/tests/misc/authentication-redirect-1/authentication-sent-to-redirect-cross-origin-expected.txt
r234897 r234912 1 localhost:8000 - didReceiveAuthenticationChallenge - Responding with testUser:testPassword1 localhost:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Responding with testUser:testPassword 2 2 https://bugs.webkit.org/show_bug.cgi?id=40138 3 3 You should load this page at 127.0.0.1:8000 so localhost:8000 is considered a different security origin. -
trunk/LayoutTests/platform/wk2/http/tests/misc/authentication-redirect-2/authentication-sent-to-redirect-same-origin-expected.txt
r234897 r234912 1 127.0.0.1:8000 - didReceiveAuthenticationChallenge - Responding with testUser:testPassword1 127.0.0.1:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Responding with testUser:testPassword 2 2 https://bugs.webkit.org/show_bug.cgi?id=66354 3 3 You should load this page at 127.0.0.1:8000 because the test relies on redirects within the 127.0.0.1:8000 security origin. -
trunk/LayoutTests/platform/wk2/http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials-expected.txt
r234897 r234912 1 127.0.0.1:8000 - didReceiveAuthenticationChallenge - Responding with testUser:testPassword1 127.0.0.1:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Responding with testUser:testPassword 2 2 https://bugs.webkit.org/show_bug.cgi?id=66354 3 3 You should load this page at 127.0.0.1:8000 because the test relies on redirects within the 127.0.0.1:8000 security origin. -
trunk/LayoutTests/platform/wk2/http/tests/misc/authentication-redirect-4/authentication-sent-to-redirect-same-origin-url-expected.txt
r234897 r234912 1 127.0.0.1:8000 - didReceiveAuthenticationChallenge - Responding with testUser:testPassword1 127.0.0.1:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Responding with testUser:testPassword 2 2 https://bugs.webkit.org/show_bug.cgi?id=105190 3 3 You should load this page at 127.0.0.1:8000 because the test relies on redirects within the 127.0.0.1:8000 security origin. -
trunk/LayoutTests/platform/wk2/http/tests/security/401-logout/401-logout-expected.txt
r234897 r234912 1 127.0.0.1:8000 - didReceiveAuthenticationChallenge - Responding with username:password2 127.0.0.1:8000 - didReceiveAuthenticationChallenge - Simulating cancelled authentication sheet1 127.0.0.1:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Responding with username:password 2 127.0.0.1:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Simulating cancelled authentication sheet 3 3 PASS -
trunk/LayoutTests/platform/wk2/http/tests/security/basic-auth-subresource-expected.txt
r234897 r234912 1 127.0.0.1:8000 - didReceiveAuthenticationChallenge - Responding with testUser:testPassword1 127.0.0.1:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Responding with testUser:testPassword 2 2 CONSOLE MESSAGE: Blocked http://localhost:8000/security/resources/subresource1/protected-image.php from asking for credentials because it is a cross-origin request. 3 3 CONSOLE MESSAGE: Blocked https://localhost:8443/security/resources/subresource1/protected-image.php from asking for credentials because it is a cross-origin request. 4 4 CONSOLE MESSAGE: Blocked http://localhost:8000/security/resources/subresource2/protected-image.php from asking for credentials because it is a cross-origin request. 5 127.0.0.1:8000 - didReceiveAuthenticationChallenge - Responding with testUser:testPassword5 127.0.0.1:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Responding with testUser:testPassword 6 6 CONSOLE MESSAGE: Blocked https://127.0.0.1:8443/security/resources/subresource2/protected-image.php from asking for credentials because it is a cross-origin request. 7 7 CONSOLE MESSAGE: Blocked https://localhost:8443/security/resources/subresource2/protected-image.php from asking for credentials because it is a cross-origin request. -
trunk/LayoutTests/platform/wk2/http/tests/security/credentials-iframes-allowCrossOriginSubresourcesToAskForCredentials-expected.txt
r234897 r234912 1 1 ALERT: parent host: 127.0.0.1 iframe host: 127.0.0.1 credentials:User: same-domain-user, password: same-domain-password. 2 127.0.0.1:8000 - didReceiveAuthenticationChallenge - Simulating cancelled authentication sheet2 127.0.0.1:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Simulating cancelled authentication sheet 3 3 ALERT: parent host: localhost iframe host: 127.0.0.1 credentials:Authentication canceled 4 4 -
trunk/LayoutTests/platform/wk2/http/tests/security/mixedContent/insecure-basic-auth-image-allowCrossOriginSubresourcesToAskForCredentials.https-expected.txt
r234897 r234912 1 1 CONSOLE MESSAGE: line 33: The page at https://127.0.0.1:8443/security/mixedContent/insecure-basic-auth-image-allowCrossOriginSubresourcesToAskForCredentials.https.html was allowed to display insecure content from http://localhost:8000/security/mixedContent/resources/subresource2/protected-image.php. 2 2 3 localhost:8000 - didReceiveAuthenticationChallenge - Responding with testUser:testPassword3 localhost:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Responding with testUser:testPassword 4 4 Tests that we do not ask for credentials when loading an insecure image that requires basic authentication. 5 5 -
trunk/LayoutTests/platform/wk2/http/tests/security/mixedContent/insecure-image-redirects-to-basic-auth-secure-image-allowCrossOriginSubresourcesToAskForCredentials-expected.txt
r234897 r234912 1 1 CONSOLE MESSAGE: line 18: The page at https://127.0.0.1:8443/security/mixedContent/resources/frame-with-insecure-image-redirects-to-basic-auth-secure-image.html?allowCrossOriginSubresourcesToAskForCredentials=1 was allowed to display insecure content from http://127.0.0.1:8080/resources/redirect.php?url=https://localhost:8443/security/mixedContent/resources/subresource/protected-image.php. 2 2 3 localhost:8443 - didReceiveAuthenticationChallenge - Responding with testUser:testPassword3 localhost:8443 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Responding with testUser:testPassword 4 4 This test opens a new window to a secure page that loads an insecure image that redirects to a secure image guarded by basic authentication. The image should load. 5 5 -
trunk/LayoutTests/platform/wk2/http/tests/security/mixedContent/secure-page-navigates-to-basic-auth-insecure-page.https-expected.txt
r234897 r234912 1 127.0.0.1:8000 - didReceiveAuthenticationChallenge - Responding with testUser:testPassword1 127.0.0.1:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Responding with testUser:testPassword 2 2 Authenticated with username testUser. -
trunk/LayoutTests/platform/wk2/http/tests/security/mixedContent/secure-page-navigates-to-basic-auth-secure-page-via-insecure-redirect.https-expected.txt
r234897 r234912 1 127.0.0.1:8443 - didReceiveAuthenticationChallenge - Responding with testUser:testPassword1 127.0.0.1:8443 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Responding with testUser:testPassword 2 2 Authenticated with username testUser. -
trunk/LayoutTests/platform/wk2/http/tests/security/mixedContent/secure-redirect-to-insecure-redirect-to-basic-auth-secure-image-allowCrossOriginSubresourcesToAskForCredentials.https-expected.txt
r234897 r234912 1 1 CONSOLE MESSAGE: The page at https://127.0.0.1:8443/security/mixedContent/secure-redirect-to-insecure-redirect-to-basic-auth-secure-image-allowCrossOriginSubresourcesToAskForCredentials.https.html was allowed to display insecure content from http://127.0.0.1:8080/resources/redirect.php?url=https://localhost:8443/security/mixedContent/resources/subresource/protected-image.php. 2 2 3 localhost:8443 - didReceiveAuthenticationChallenge - Responding with testUser:testPassword3 localhost:8443 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Responding with testUser:testPassword 4 4 This test loads a secure image that redirects to an insecure image that redirects to a secure image guarded by basic authentication. The image should load. 5 5 -
trunk/LayoutTests/platform/wk2/http/tests/security/mixedContent/secure-redirect-to-secure-redirect-to-basic-auth-insecure-image-allowCrossOriginSubresourcesToAskForCredentials.https-expected.txt
r234897 r234912 1 1 CONSOLE MESSAGE: The page at https://127.0.0.1:8443/security/mixedContent/secure-redirect-to-secure-redirect-to-basic-auth-insecure-image-allowCrossOriginSubresourcesToAskForCredentials.https.html was allowed to display insecure content from http://localhost:8080/security/mixedContent/resources/subresource/protected-image.php. 2 2 3 localhost:8080 - didReceiveAuthenticationChallenge - Responding with testUser:testPassword3 localhost:8080 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Responding with testUser:testPassword 4 4 This test loads a secure image that redirects to an secure image that redirects to an insecure image guarded by basic authentication. The image should load. 5 5 -
trunk/LayoutTests/platform/wk2/http/tests/security/mixedContent/secure-redirect-to-secure-redirect-to-basic-auth-secure-image-allowCrossOriginSubresourcesToAskForCredentials.https-expected.txt
r234897 r234912 1 localhost:8443 - didReceiveAuthenticationChallenge - Responding with testUser:testPassword1 localhost:8443 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Responding with testUser:testPassword 2 2 This test loads a secure image that redirects to a secure image that redirects to a secure image guarded by basic authentication. The secure image should load. 3 3 -
trunk/LayoutTests/platform/wk2/http/tests/xmlhttprequest/failed-auth-expected.txt
r234897 r234912 1 127.0.0.1:8000 - didReceiveAuthenticationChallenge - Simulating cancelled authentication sheet2 127.0.0.1:8000 - didReceiveAuthenticationChallenge - Simulating cancelled authentication sheet1 127.0.0.1:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Simulating cancelled authentication sheet 2 127.0.0.1:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Simulating cancelled authentication sheet 3 3 Test for bug 13075: XMLHttpRequest with failed authentication should set status to 401. 4 4 -
trunk/LayoutTests/platform/wk2/http/tests/xmlhttprequest/remember-bad-password-expected.txt
r234897 r234912 1 127.0.0.1:8000 - didReceiveAuthenticationChallenge - Simulating cancelled authentication sheet2 127.0.0.1:8000 - didReceiveAuthenticationChallenge - Simulating cancelled authentication sheet1 127.0.0.1:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Simulating cancelled authentication sheet 2 127.0.0.1:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Simulating cancelled authentication sheet 3 3 rdar://problem/7062824 A wrong password entered for site or proxy auth remains in WebCore credential storage, and is sent with subsequent requests. 4 4 -
trunk/Source/WebCore/ChangeLog
r234910 r234912 1 2018-08-15 Ansh Shukla <ansh_shukla@apple.com> 2 3 NSURLAuthenticationMethodOAuth challenges are surfaced to clients in -didReceiveAuthenticationChallenge as NSURLAuthenticationMethodDefault 4 https://bugs.webkit.org/show_bug.cgi?id=186870 5 <rdar://problem/41314410> 6 7 Reviewed by Alex Christensen. 8 9 Add the ProtectionSpaceAuthenticationSchemeOAuth type. 10 11 * platform/network/ProtectionSpaceBase.cpp: 12 (WebCore::ProtectionSpaceBase::isPasswordBased const): Return yes because the oauth challenge 13 expects a token in return. 14 * platform/network/ProtectionSpaceBase.h: 15 * platform/network/cocoa/ProtectionSpaceCocoa.mm: 16 (WebCore::scheme): 17 (WebCore::ProtectionSpace::nsSpace const): 18 1 19 2018-08-15 Ben Richards <benton_richards@apple.com> 2 20 -
trunk/Source/WebCore/PAL/ChangeLog
r234898 r234912 1 2018-08-15 Ansh Shukla <ansh_shukla@apple.com> 2 3 NSURLAuthenticationMethodOAuth challenges are surfaced to clients in -didReceiveAuthenticationChallenge as NSURLAuthenticationMethodDefault 4 https://bugs.webkit.org/show_bug.cgi?id=186870 5 <rdar://problem/41314410> 6 7 Reviewed by Alex Christensen. 8 9 * pal/spi/cf/CFNetworkSPI.h: Declare OAuth string when not building against the 10 internal SDK. 11 1 12 2018-08-15 Aditya Keerthi <akeerthi@apple.com> 2 13 -
trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h
r234897 r234912 178 178 #endif 179 179 @end 180 181 extern NSString * const NSURLAuthenticationMethodOAuth; 180 182 181 183 #endif // defined(__OBJC__) -
trunk/Source/WebCore/platform/network/ProtectionSpaceBase.cpp
r234897 r234912 109 109 case ProtectionSpaceAuthenticationSchemeNTLM: 110 110 case ProtectionSpaceAuthenticationSchemeNegotiate: 111 case ProtectionSpaceAuthenticationSchemeOAuth: 111 112 return true; 112 113 case ProtectionSpaceAuthenticationSchemeClientCertificateRequested: -
trunk/Source/WebCore/platform/network/ProtectionSpaceBase.h
r234897 r234912 53 53 ProtectionSpaceAuthenticationSchemeClientCertificateRequested = 7, 54 54 ProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested = 8, 55 ProtectionSpaceAuthenticationSchemeOAuth = 9, 55 56 ProtectionSpaceAuthenticationSchemeUnknown = 100 56 57 }; -
trunk/Source/WebCore/platform/network/cocoa/ProtectionSpaceCocoa.mm
r234897 r234912 26 26 #import "config.h" 27 27 #import "ProtectionSpaceCocoa.h" 28 29 #import <pal/spi/cf/CFNetworkSPI.h> 28 30 29 31 namespace WebCore { … … 81 83 return ProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested; 82 84 #endif 85 if ([method isEqualToString:NSURLAuthenticationMethodOAuth]) 86 return ProtectionSpaceAuthenticationSchemeOAuth; 83 87 84 88 ASSERT_NOT_REACHED(); … … 156 160 break; 157 161 #endif 162 case ProtectionSpaceAuthenticationSchemeOAuth: 163 method = NSURLAuthenticationMethodOAuth; 164 break; 158 165 default: 159 166 ASSERT_NOT_REACHED(); -
trunk/Source/WebKit/ChangeLog
r234910 r234912 1 2018-08-15 Ansh Shukla <ansh_shukla@apple.com> 2 3 NSURLAuthenticationMethodOAuth challenges are surfaced to clients in -didReceiveAuthenticationChallenge as NSURLAuthenticationMethodDefault 4 https://bugs.webkit.org/show_bug.cgi?id=186870 5 <rdar://problem/41314410> 6 7 Reviewed by Alex Christensen. 8 9 Correctly expose the OAuth protection space type in API. 10 11 * UIProcess/API/C/WKAPICast.h: 12 (WebKit::toAPI): 13 * UIProcess/API/C/WKProtectionSpaceTypes.h: 14 1 15 2018-08-15 Ben Richards <benton_richards@apple.com> 2 16 -
trunk/Source/WebKit/UIProcess/API/C/WKAPICast.h
r234897 r234912 365 365 case WebCore::ProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested: 366 366 return kWKProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested; 367 case WebCore::ProtectionSpaceAuthenticationSchemeOAuth: 368 return kWKProtectionSpaceAuthenticationSchemeOAuth; 367 369 default: 368 370 return kWKProtectionSpaceAuthenticationSchemeUnknown; -
trunk/Source/WebKit/UIProcess/API/C/WKProtectionSpaceTypes.h
r234897 r234912 54 54 kWKProtectionSpaceAuthenticationSchemeClientCertificateRequested, 55 55 kWKProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested, 56 kWKProtectionSpaceAuthenticationSchemeOAuth, 56 57 kWKProtectionSpaceAuthenticationSchemeUnknown = 100, 57 58 }; -
trunk/Tools/ChangeLog
r234910 r234912 1 2018-08-15 Ansh Shukla <ansh_shukla@apple.com> 2 3 NSURLAuthenticationMethodOAuth challenges are surfaced to clients in -didReceiveAuthenticationChallenge as NSURLAuthenticationMethodDefault 4 https://bugs.webkit.org/show_bug.cgi?id=186870 5 <rdar://problem/41314410> 6 7 Reviewed by Alex Christensen. 8 9 * WebKitTestRunner/TestController.cpp: 10 (WTR::toString): 11 (WTR::TestController::canAuthenticateAgainstProtectionSpace): Expose type of authentication challenge so we can test OAuth. 12 (WTR::TestController::didReceiveAuthenticationChallenge): 13 1 14 2018-08-15 Ben Richards <benton_richards@apple.com> 2 15 -
trunk/Tools/WebKitTestRunner/TestController.cpp
r234897 r234912 1810 1810 } 1811 1811 1812 static const char* toString(WKProtectionSpaceAuthenticationScheme scheme) 1813 { 1814 switch (scheme) { 1815 case kWKProtectionSpaceAuthenticationSchemeDefault: 1816 return "ProtectionSpaceAuthenticationSchemeDefault"; 1817 case kWKProtectionSpaceAuthenticationSchemeHTTPBasic: 1818 return "ProtectionSpaceAuthenticationSchemeHTTPBasic"; 1819 case kWKProtectionSpaceAuthenticationSchemeHTMLForm: 1820 return "ProtectionSpaceAuthenticationSchemeHTMLForm"; 1821 case kWKProtectionSpaceAuthenticationSchemeNTLM: 1822 return "ProtectionSpaceAuthenticationSchemeNTLM"; 1823 case kWKProtectionSpaceAuthenticationSchemeNegotiate: 1824 return "ProtectionSpaceAuthenticationSchemeNegotiate"; 1825 case kWKProtectionSpaceAuthenticationSchemeClientCertificateRequested: 1826 return "ProtectionSpaceAuthenticationSchemeClientCertificateRequested"; 1827 case kWKProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested: 1828 return "ProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested"; 1829 case kWKProtectionSpaceAuthenticationSchemeOAuth: 1830 return "ProtectionSpaceAuthenticationSchemeOAuth"; 1831 case kWKProtectionSpaceAuthenticationSchemeUnknown: 1832 return "ProtectionSpaceAuthenticationSchemeUnknown"; 1833 } 1834 ASSERT_NOT_REACHED(); 1835 return "ProtectionSpaceAuthenticationSchemeUnknown"; 1836 } 1837 1812 1838 bool TestController::canAuthenticateAgainstProtectionSpace(WKPageRef page, WKProtectionSpaceRef protectionSpace) 1813 1839 { … … 1821 1847 } 1822 1848 1823 return authenticationScheme <= kWKProtectionSpaceAuthenticationSchemeHTTPDigest ;1849 return authenticationScheme <= kWKProtectionSpaceAuthenticationSchemeHTTPDigest || authenticationScheme == kWKProtectionSpaceAuthenticationSchemeOAuth; 1824 1850 } 1825 1851 … … 1841 1867 WKProtectionSpaceRef protectionSpace = WKAuthenticationChallengeGetProtectionSpace(authenticationChallenge); 1842 1868 WKAuthenticationDecisionListenerRef decisionListener = WKAuthenticationChallengeGetDecisionListener(authenticationChallenge); 1843 1844 if (WKProtectionSpaceGetAuthenticationScheme(protectionSpace) == kWKProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested) { 1869 WKProtectionSpaceAuthenticationScheme authenticationScheme = WKProtectionSpaceGetAuthenticationScheme(protectionSpace); 1870 1871 if (authenticationScheme == kWKProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested) { 1845 1872 // Any non-empty credential signals to accept the server trust. Since the cross-platform API 1846 1873 // doesn't expose a way to create a credential from server trust, we use a password credential. … … 1859 1886 std::string host = toSTD(adoptWK(WKProtectionSpaceCopyHost(protectionSpace)).get()); 1860 1887 int port = WKProtectionSpaceGetPort(protectionSpace); 1861 String message = String::format("%s:%d - didReceiveAuthenticationChallenge - ", host.c_str(), port);1888 String message = String::format("%s:%d - didReceiveAuthenticationChallenge - %s - ", host.c_str(), port, toString(authenticationScheme)); 1862 1889 if (!m_handlesAuthenticationChallenges) 1863 1890 message.append("Simulating cancelled authentication sheet\n");
Note: See TracChangeset
for help on using the changeset viewer.