WebKit Bugzilla
Attachment 372310 Details for
Bug 198949
: Link to the new AppSSO private framework
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198949-20190617182150.patch (text/plain), 9.65 KB, created by
Jiewen Tan
on 2019-06-17 18:21:50 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Jiewen Tan
Created:
2019-06-17 18:21:50 PDT
Size:
9.65 KB
patch
obsolete
>Subversion Revision: 246528 >diff --git a/Source/WebCore/PAL/ChangeLog b/Source/WebCore/PAL/ChangeLog >index 15028d991fbb98132b73750360033aaf4ffb0971..9251974cdfba5bbfda8398b8d5c57d51c647e29d 100644 >--- a/Source/WebCore/PAL/ChangeLog >+++ b/Source/WebCore/PAL/ChangeLog >@@ -1,3 +1,16 @@ >+2019-06-17 Jiewen Tan <jiewen_tan@apple.com> >+ >+ Link to the new AppSSO private framework >+ https://bugs.webkit.org/show_bug.cgi?id=198949 >+ <rdar://problem/51281897> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * PAL.xcodeproj/project.pbxproj: >+ * pal/cocoa/AppSSOSoftLink.h: >+ * pal/cocoa/AppSSOSoftLink.mm: >+ * pal/spi/cocoa/AppSSOSPI.h: Added. >+ > 2019-06-17 Jiewen Tan <jiewen_tan@apple.com> > > Move SOAuthorization from WebKitAdditions to WebKit >diff --git a/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj b/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj >index ab85e48bf85e2cc1cefc161e5cde2df4b8f0d99c..9a9aba425c6aeba4f6f8dd62ce3300c71377d2ec 100644 >--- a/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj >+++ b/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj >@@ -121,6 +121,7 @@ > 570AB8F120AE2E8D00B8BE87 /* SecKeyProxySPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 570AB8F020AE2E8D00B8BE87 /* SecKeyProxySPI.h */; }; > 570AB8F920AF6E3D00B8BE87 /* NSXPCConnectionSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 570AB8F820AF6E3D00B8BE87 /* NSXPCConnectionSPI.h */; }; > 572A107822B456F500F410C8 /* AuthKitSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 572A107722B456F500F410C8 /* AuthKitSPI.h */; }; >+ 576CA9D622B854AB0030143C /* AppSSOSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 576CA9D522B854AB0030143C /* AppSSOSPI.h */; }; > 57FD318A22B3593E008D0E8B /* AppSSOSoftLink.mm in Sources */ = {isa = PBXBuildFile; fileRef = 57FD318922B3593E008D0E8B /* AppSSOSoftLink.mm */; }; > 57FD318B22B35989008D0E8B /* AppSSOSoftLink.h in Headers */ = {isa = PBXBuildFile; fileRef = 57FD318822B3592F008D0E8B /* AppSSOSoftLink.h */; }; > 63C7EDC721AFAE04006A7B99 /* NSProgressSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 63E369F921AFA83F001C14BC /* NSProgressSPI.h */; }; >@@ -288,6 +289,7 @@ > 570AB8F020AE2E8D00B8BE87 /* SecKeyProxySPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SecKeyProxySPI.h; sourceTree = "<group>"; }; > 570AB8F820AF6E3D00B8BE87 /* NSXPCConnectionSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NSXPCConnectionSPI.h; sourceTree = "<group>"; }; > 572A107722B456F500F410C8 /* AuthKitSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AuthKitSPI.h; sourceTree = "<group>"; }; >+ 576CA9D522B854AB0030143C /* AppSSOSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppSSOSPI.h; sourceTree = "<group>"; }; > 57FD318822B3592F008D0E8B /* AppSSOSoftLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppSSOSoftLink.h; sourceTree = "<group>"; }; > 57FD318922B3593E008D0E8B /* AppSSOSoftLink.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AppSSOSoftLink.mm; sourceTree = "<group>"; }; > 63E369F921AFA83F001C14BC /* NSProgressSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NSProgressSPI.h; sourceTree = "<group>"; }; >@@ -395,6 +397,7 @@ > 0C2DA1201F3BE9E700DBC317 /* cocoa */ = { > isa = PBXGroup; > children = ( >+ 576CA9D522B854AB0030143C /* AppSSOSPI.h */, > 2D02E93B2056FAA700A13797 /* AudioToolboxSPI.h */, > 572A107722B456F500F410C8 /* AuthKitSPI.h */, > 0C2DA1221F3BEB4900DBC317 /* AVKitSPI.h */, >@@ -687,6 +690,7 @@ > buildActionMask = 2147483647; > files = ( > 57FD318B22B35989008D0E8B /* AppSSOSoftLink.h in Headers */, >+ 576CA9D622B854AB0030143C /* AppSSOSPI.h in Headers */, > 2D02E93C2056FAA700A13797 /* AudioToolboxSPI.h in Headers */, > 572A107822B456F500F410C8 /* AuthKitSPI.h in Headers */, > 077E87B2226A460300A2AFF0 /* AVFoundationSoftLink.h in Headers */, >diff --git a/Source/WebCore/PAL/pal/cocoa/AppSSOSoftLink.h b/Source/WebCore/PAL/pal/cocoa/AppSSOSoftLink.h >index 614c537ff4e2e9df2077d02c92a731a0a1c97cd8..f76c5659b9aae80be13f2ac9e22b614b752d9180 100644 >--- a/Source/WebCore/PAL/pal/cocoa/AppSSOSoftLink.h >+++ b/Source/WebCore/PAL/pal/cocoa/AppSSOSoftLink.h >@@ -27,7 +27,7 @@ > > #if HAVE(APP_SSO) > >-#import <AppSSO/AppSSO.h> >+#import <pal/spi/cocoa/AppSSOSPI.h> > #import <wtf/SoftLinking.h> > > SOFT_LINK_FRAMEWORK_FOR_HEADER(PAL, AppSSO); >diff --git a/Source/WebCore/PAL/pal/cocoa/AppSSOSoftLink.mm b/Source/WebCore/PAL/pal/cocoa/AppSSOSoftLink.mm >index ef1cd20760e2665441d32ca8c4d1d704e73fd0e6..8a0c557d38e8fcbfa00e038021702a53d15e39ac 100644 >--- a/Source/WebCore/PAL/pal/cocoa/AppSSOSoftLink.mm >+++ b/Source/WebCore/PAL/pal/cocoa/AppSSOSoftLink.mm >@@ -29,7 +29,7 @@ > > #import <wtf/SoftLinking.h> > >-SOFT_LINK_FRAMEWORK_FOR_SOURCE_WITH_EXPORT(PAL, AppSSO, PAL_EXPORT); >+SOFT_LINK_PRIVATE_FRAMEWORK_FOR_SOURCE_WITH_EXPORT(PAL, AppSSO, PAL_EXPORT); > > #if PLATFORM(MAC) > SOFT_LINK_CLASS_FOR_SOURCE_OPTIONAL_WITH_EXPORT(PAL, AppSSO, SOAuthorization, PAL_EXPORT); >diff --git a/Source/WebCore/PAL/pal/spi/cocoa/AppSSOSPI.h b/Source/WebCore/PAL/pal/spi/cocoa/AppSSOSPI.h >new file mode 100644 >index 0000000000000000000000000000000000000000..f3c249717132af5e696ed61344e6b289216c9d12 >--- /dev/null >+++ b/Source/WebCore/PAL/pal/spi/cocoa/AppSSOSPI.h >@@ -0,0 +1,94 @@ >+/* >+ * Copyright (C) 2019 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if HAVE(APP_SSO) >+ >+#if USE(APPLE_INTERNAL_SDK) >+ >+#import <AppSSO/AppSSO.h> >+ >+#else >+ >+#if __has_include(<UIKit/UIKit.h>) >+#import <UIKit/UIKit.h> >+typedef UIViewController * SOAuthorizationViewController; >+#elif __has_include(<AppKit/AppKit.h>) >+typedef id SOAuthorizationViewController; >+#endif >+ >+NS_ASSUME_NONNULL_BEGIN >+ >+#define kSOErrorAuthorizationPresentationFailed -7 >+ >+extern NSErrorDomain const SOErrorDomain; >+ >+typedef NSString * SOAuthorizationOperation; >+ >+@class SOAuthorization; >+@class SOAuthorizationParameters; >+ >+@protocol SOAuthorizationDelegate <NSObject> >+@optional >+- (void)authorizationDidNotHandle:(SOAuthorization *)authorization; >+- (void)authorizationDidCancel:(SOAuthorization *)authorization; >+- (void)authorizationDidComplete:(SOAuthorization *)authorization; >+- (void)authorization:(SOAuthorization *)authorization didCompleteWithHTTPAuthorizationHeaders:(NSDictionary<NSString *, NSString *> *)httpAuthorizationHeaders; >+- (void)authorization:(SOAuthorization *)authorization didCompleteWithHTTPResponse:(NSHTTPURLResponse *)httpResponse httpBody:(NSData *)httpBody; >+- (void)authorization:(SOAuthorization *)authorization didCompleteWithError:(NSError *)error; >+- (void)authorization:(SOAuthorization *)authorization presentViewController:(SOAuthorizationViewController)viewController withCompletion:(void (^)(BOOL success, NSError * _Nullable error))completion; >+@end >+ >+typedef NSString * SOAuthorizationOption; >+extern SOAuthorizationOption const SOAuthorizationOptionUserActionInitiated; >+extern SOAuthorizationOption const SOAuthorizationOptionInitiatorOrigin; >+extern SOAuthorizationOption const SOAuthorizationOptionInitiatingAction; >+ >+typedef NS_ENUM(NSInteger, SOAuthorizationInitiatingAction) { >+ SOAuthorizationInitiatingActionRedirect, >+ SOAuthorizationInitiatingActionPopUp, >+ SOAuthorizationInitiatingActionKerberos, >+ SOAuthorizationInitiatingActionSubframe, >+}; >+ >+@interface SOAuthorization : NSObject >+@property (weak) id<SOAuthorizationDelegate> delegate; >+@property (retain, nullable) dispatch_queue_t delegateDispatchQueue; >+@property (copy, nonatomic) NSDictionary *authorizationOptions; >+@property (nonatomic) BOOL enableEmbeddedAuthorizationViewController; >++ (BOOL)canPerformAuthorizationWithURL:(NSURL *)url responseCode:(NSInteger)responseCode; >++ (BOOL)canPerformAuthorizationWithURL:(NSURL *)url responseCode:(NSInteger)responseCode useInternalExtensions:(BOOL)useInternalExtensions; >+- (void)beginAuthorizationWithURL:(NSURL *)url httpHeaders:(NSDictionary <NSString *, NSString *> *)httpHeaders httpBody:(NSData *)httpBody; >+- (void)beginAuthorizationWithOperation:(nullable SOAuthorizationOperation)operation url:(NSURL *)url httpHeaders:(NSDictionary <NSString *, NSString *> *)httpHeaders httpBody:(NSData *)httpBody; >+- (void)beginAuthorizationWithParameters:(SOAuthorizationParameters *)parameters; >+- (void)cancelAuthorization; >+@end >+ >+NS_ASSUME_NONNULL_END >+ >+#endif // USE(APPLE_INTERNAL_SDK) >+ >+#endif // HAVE(APP_SSO)
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 198949
: 372310