Pass a hint from the extension to decidePolicyForSOAuthorizationLoadWithCurrentPolicy
authorjiewen_tan@apple.com <jiewen_tan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Feb 2020 05:29:51 +0000 (05:29 +0000)
committerjiewen_tan@apple.com <jiewen_tan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Feb 2020 05:29:51 +0000 (05:29 +0000)
commit7ec5995d65301e1b3891eb4f6ab67ff32984bd32
tree98a9ae5beb10c662f835df6c0e286156a551fc2c
parent798cbdf1f5fb5c28c27602d0b320ef36a44370ea
Pass a hint from the extension to decidePolicyForSOAuthorizationLoadWithCurrentPolicy
https://bugs.webkit.org/show_bug.cgi?id=207079
<rdar://problem/48290464>

Reviewed by Brent Fulgham.

Source/WebCore/PAL:

* pal/cocoa/AppSSOSoftLink.h:
* pal/cocoa/AppSSOSoftLink.mm:
* pal/spi/cocoa/AppSSOSPI.h:
Adds macros for classes that are used in the tests.

Source/WebKit:

Pass a localized human readable hint from the extension to decidePolicyForSOAuthorizationLoadWithCurrentPolicy,
such that clients can display it to tell users what the extension is trying to do. Hints could be something
like "Sign In With Apple".

Covered new test contents within existing tests.

* UIProcess/Cocoa/SOAuthorization/SOAuthorizationSession.h:
* UIProcess/Cocoa/SOAuthorization/SOAuthorizationSession.mm:
(WebKit::SOAuthorizationSession::start):
(WebKit::SOAuthorizationSession::continueStartAfterGetAuthorizationHints):
(WebKit::SOAuthorizationSession::continueStartAfterDecidePolicy):

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/TestSOAuthorization.mm:
(-[TestSOAuthorizationDelegate _webView:decidePolicyForSOAuthorizationLoadWithCurrentPolicy:forExtension:completionHandler:]):
(overrideGetAuthorizationHintsWithURL):
(TestWebKitAPI::TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/pal/cocoa/AppSSOSoftLink.h
Source/WebCore/PAL/pal/cocoa/AppSSOSoftLink.mm
Source/WebCore/PAL/pal/spi/cocoa/AppSSOSPI.h
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/Cocoa/SOAuthorization/SOAuthorizationSession.h
Source/WebKit/UIProcess/Cocoa/SOAuthorization/SOAuthorizationSession.mm
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKitCocoa/TestSOAuthorization.mm