WebKit Bugzilla
Attachment 343201 Details for
Bug 186870
: NSURLAuthenticationMethodOAuth challenges are surfaced to clients in -didReceiveAuthenticationChallenge as NSURLAuthenticationMethodDefault
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186870-20180620193949.patch (text/plain), 6.54 KB, created by
Ansh Shukla
on 2018-06-20 19:39:50 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Ansh Shukla
Created:
2018-06-20 19:39:50 PDT
Size:
6.54 KB
patch
obsolete
>Subversion Revision: 233028 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index a456a0dc1f6ad80a6ec578f1c9b8cfd2bd625586..cd9ec791b243a99a30ffbaf0e6ac932769db0852 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,26 @@ >+2018-06-20 Ansh Shukla <ansh_shukla@apple.com> >+ >+ Add support for OAuth authentication methods. >+ https://bugs.webkit.org/show_bug.cgi?id=186870 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ HTTP 401 responses with WWW-Authenticate headers of type OAuth resolve to authentication >+ scheme type NSURLAuthenticationMethodOAuth. WebKit doesn't support this type currently, >+ meaning it is internally represented with enum type ProtectionSpaceAuthenticationSchemeUnknown. >+ Unfortunately, when WebKit surfaces unknown authentication schemes to clients through >+ WKWebView's -didReceiveAuthenticationChallenge API, the unknown scheme is turned into >+ NSURLAuthenticationMethodDefault, which is not the same. >+ >+ This patch adds a new enum type for OAuth authentication schemes. >+ >+ * platform/network/ProtectionSpaceBase.cpp: >+ (WebCore::ProtectionSpaceBase::isPasswordBased const): >+ * platform/network/ProtectionSpaceBase.h: >+ * platform/network/cocoa/ProtectionSpaceCocoa.mm: >+ (WebCore::scheme): >+ (WebCore::ProtectionSpace::nsSpace const): >+ > 2018-06-20 Wenson Hsieh <wenson_hsieh@apple.com> > > Unreviewed, fix the watchOS build after r233016. >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 78aa1c12b37851fd402e7ba89c0cf9676fc438c9..30fa4674fc991365e537e9a1207479d5ab6d8e9e 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,18 @@ >+2018-06-20 Ansh Shukla <ansh_shukla@apple.com> >+ >+ Add a new protection space type for OAuth authentication schemes. >+ https://bugs.webkit.org/show_bug.cgi?id=186870 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ To fix 186870, we added support for ProtectionSpaceAuthenticationSchemeOAuth as distinct >+ from ProtectionSpaceAuthenticationSchemeUnknown. This patch adds the necessary type to >+ WKProtectionSpaceTypes for clients. >+ >+ * UIProcess/API/C/WKAPICast.h: >+ (WebKit::toAPI): >+ * UIProcess/API/C/WKProtectionSpaceTypes.h: >+ > 2018-06-20 Wenson Hsieh <wenson_hsieh@apple.com> > > [WebKit on watchOS] Fixed position elements sometimes flicker when scrolling >diff --git a/Source/WebCore/platform/network/ProtectionSpaceBase.cpp b/Source/WebCore/platform/network/ProtectionSpaceBase.cpp >index fca64c8012e6d6c72ca2a1e066be49e131ed4696..fea904935f2a0e85d0169edfb35df4749c9ae082 100644 >--- a/Source/WebCore/platform/network/ProtectionSpaceBase.cpp >+++ b/Source/WebCore/platform/network/ProtectionSpaceBase.cpp >@@ -111,6 +111,7 @@ bool ProtectionSpaceBase::isPasswordBased() const > return true; > case ProtectionSpaceAuthenticationSchemeClientCertificateRequested: > case ProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested: >+ case ProtectionSpaceAuthenticationSchemeOAuth: > case ProtectionSpaceAuthenticationSchemeUnknown: > return false; > } >diff --git a/Source/WebCore/platform/network/ProtectionSpaceBase.h b/Source/WebCore/platform/network/ProtectionSpaceBase.h >index b393e6401846ddbd2c9f6027ad1646ae9816c408..720592dbb9f821b131c3872579b4afb9277d157d 100644 >--- a/Source/WebCore/platform/network/ProtectionSpaceBase.h >+++ b/Source/WebCore/platform/network/ProtectionSpaceBase.h >@@ -52,6 +52,7 @@ enum ProtectionSpaceAuthenticationScheme { > ProtectionSpaceAuthenticationSchemeNegotiate = 6, > ProtectionSpaceAuthenticationSchemeClientCertificateRequested = 7, > ProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested = 8, >+ ProtectionSpaceAuthenticationSchemeOAuth = 9, > ProtectionSpaceAuthenticationSchemeUnknown = 100 > }; > >diff --git a/Source/WebCore/platform/network/cocoa/ProtectionSpaceCocoa.mm b/Source/WebCore/platform/network/cocoa/ProtectionSpaceCocoa.mm >index db1fb51bf99027bc2f3530a5d518b0ff7b7861bb..1cbf25ee27d885bc86b2008cf70bf7ee9bf76069 100644 >--- a/Source/WebCore/platform/network/cocoa/ProtectionSpaceCocoa.mm >+++ b/Source/WebCore/platform/network/cocoa/ProtectionSpaceCocoa.mm >@@ -80,6 +80,8 @@ static ProtectionSpaceAuthenticationScheme scheme(NSURLProtectionSpace *space) > if ([method isEqualToString:NSURLAuthenticationMethodServerTrust]) > return ProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested; > #endif >+ if ([method isEqualToString:NSURLAuthenticationMethodOAuth]) >+ return ProtectionSpaceAuthenticationSchemeOAuth; > > ASSERT_NOT_REACHED(); > return ProtectionSpaceAuthenticationSchemeUnknown; >@@ -155,6 +157,9 @@ NSURLProtectionSpace *ProtectionSpace::nsSpace() const > method = NSURLAuthenticationMethodClientCertificate; > break; > #endif >+ case ProtectionSpaceAuthenticationSchemeOAuth: >+ method = NSURLAuthenticationMethodOAuth; >+ break; > default: > ASSERT_NOT_REACHED(); > } >diff --git a/Source/WebKit/UIProcess/API/C/WKAPICast.h b/Source/WebKit/UIProcess/API/C/WKAPICast.h >index c50e1f92e00f30a15140df29ad8761688c668998..e65fd97026ce9d982843b39bb6f8798e2874912e 100644 >--- a/Source/WebKit/UIProcess/API/C/WKAPICast.h >+++ b/Source/WebKit/UIProcess/API/C/WKAPICast.h >@@ -364,6 +364,8 @@ inline WKProtectionSpaceAuthenticationScheme toAPI(WebCore::ProtectionSpaceAuthe > return kWKProtectionSpaceAuthenticationSchemeClientCertificateRequested; > case WebCore::ProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested: > return kWKProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested; >+ case WebCore::ProtectionSpaceAuthenticationSchemeOAuth: >+ return kWKProtectionSpaceAuthenticationSchemeOAuth; > default: > return kWKProtectionSpaceAuthenticationSchemeUnknown; > } >diff --git a/Source/WebKit/UIProcess/API/C/WKProtectionSpaceTypes.h b/Source/WebKit/UIProcess/API/C/WKProtectionSpaceTypes.h >index 4741460490c16f8e15daca02823c79619709f51b..1b25d038746ce085e2da2e8f1e62030445354b00 100644 >--- a/Source/WebKit/UIProcess/API/C/WKProtectionSpaceTypes.h >+++ b/Source/WebKit/UIProcess/API/C/WKProtectionSpaceTypes.h >@@ -53,6 +53,7 @@ enum { > kWKProtectionSpaceAuthenticationSchemeNegotiate, > kWKProtectionSpaceAuthenticationSchemeClientCertificateRequested, > kWKProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested, >+ kWKProtectionSpaceAuthenticationSchemeOAuth, > kWKProtectionSpaceAuthenticationSchemeUnknown = 100, > }; > typedef uint32_t WKProtectionSpaceAuthenticationScheme;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186870
:
343201
|
346858
|
347110
|
347114
|
347120
|
347128
|
347209
|
347213
|
347217
|
347221
|
347222
|
347230
|
347231
|
347235
|
347237
|
347238