├── .DS_Store ├── .gitignore ├── 1.jpg ├── 2.png ├── 3.png ├── 4.png ├── 5.png ├── 6.png ├── Podfile ├── Podfile.lock ├── Pods ├── AFNetworking │ ├── AFNetworking │ │ ├── AFCompatibilityMacros.h │ │ ├── AFHTTPSessionManager.h │ │ ├── AFHTTPSessionManager.m │ │ ├── AFNetworkReachabilityManager.h │ │ ├── AFNetworkReachabilityManager.m │ │ ├── AFNetworking.h │ │ ├── AFSecurityPolicy.h │ │ ├── AFSecurityPolicy.m │ │ ├── AFURLRequestSerialization.h │ │ ├── AFURLRequestSerialization.m │ │ ├── AFURLResponseSerialization.h │ │ ├── AFURLResponseSerialization.m │ │ ├── AFURLSessionManager.h │ │ └── AFURLSessionManager.m │ ├── LICENSE │ ├── README.md │ └── UIKit+AFNetworking │ │ ├── AFAutoPurgingImageCache.h │ │ ├── AFAutoPurgingImageCache.m │ │ ├── AFImageDownloader.h │ │ ├── AFImageDownloader.m │ │ ├── AFNetworkActivityIndicatorManager.h │ │ ├── AFNetworkActivityIndicatorManager.m │ │ ├── UIActivityIndicatorView+AFNetworking.h │ │ ├── UIActivityIndicatorView+AFNetworking.m │ │ ├── UIButton+AFNetworking.h │ │ ├── UIButton+AFNetworking.m │ │ ├── UIImage+AFNetworking.h │ │ ├── UIImageView+AFNetworking.h │ │ ├── UIImageView+AFNetworking.m │ │ ├── UIKit+AFNetworking.h │ │ ├── UIProgressView+AFNetworking.h │ │ ├── UIProgressView+AFNetworking.m │ │ ├── UIRefreshControl+AFNetworking.h │ │ ├── UIRefreshControl+AFNetworking.m │ │ ├── UIWebView+AFNetworking.h │ │ └── UIWebView+AFNetworking.m ├── Headers │ ├── Private │ │ └── AFNetworking │ │ │ ├── AFAutoPurgingImageCache.h │ │ │ ├── AFCompatibilityMacros.h │ │ │ ├── AFHTTPSessionManager.h │ │ │ ├── AFImageDownloader.h │ │ │ ├── AFNetworkActivityIndicatorManager.h │ │ │ ├── AFNetworkReachabilityManager.h │ │ │ ├── AFNetworking.h │ │ │ ├── AFSecurityPolicy.h │ │ │ ├── AFURLRequestSerialization.h │ │ │ ├── AFURLResponseSerialization.h │ │ │ ├── AFURLSessionManager.h │ │ │ ├── UIActivityIndicatorView+AFNetworking.h │ │ │ ├── UIButton+AFNetworking.h │ │ │ ├── UIImage+AFNetworking.h │ │ │ ├── UIImageView+AFNetworking.h │ │ │ ├── UIKit+AFNetworking.h │ │ │ ├── UIProgressView+AFNetworking.h │ │ │ ├── UIRefreshControl+AFNetworking.h │ │ │ └── UIWebView+AFNetworking.h │ └── Public │ │ └── AFNetworking │ │ ├── AFAutoPurgingImageCache.h │ │ ├── AFCompatibilityMacros.h │ │ ├── AFHTTPSessionManager.h │ │ ├── AFImageDownloader.h │ │ ├── AFNetworkActivityIndicatorManager.h │ │ ├── AFNetworkReachabilityManager.h │ │ ├── AFNetworking.h │ │ ├── AFSecurityPolicy.h │ │ ├── AFURLRequestSerialization.h │ │ ├── AFURLResponseSerialization.h │ │ ├── AFURLSessionManager.h │ │ ├── UIActivityIndicatorView+AFNetworking.h │ │ ├── UIButton+AFNetworking.h │ │ ├── UIImage+AFNetworking.h │ │ ├── UIImageView+AFNetworking.h │ │ ├── UIKit+AFNetworking.h │ │ ├── UIProgressView+AFNetworking.h │ │ ├── UIRefreshControl+AFNetworking.h │ │ └── UIWebView+AFNetworking.h ├── Manifest.lock ├── Pods.xcodeproj │ └── project.pbxproj └── Target Support Files │ ├── AFNetworking │ ├── AFNetworking-dummy.m │ ├── AFNetworking-prefix.pch │ └── AFNetworking.xcconfig │ └── Pods-authDemo │ ├── Pods-authDemo-acknowledgements.markdown │ ├── Pods-authDemo-acknowledgements.plist │ ├── Pods-authDemo-dummy.m │ ├── Pods-authDemo-frameworks.sh │ ├── Pods-authDemo-resources.sh │ ├── Pods-authDemo.debug.xcconfig │ └── Pods-authDemo.release.xcconfig ├── README.md ├── auth.mov ├── authDemo.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── contents.xcworkspacedata ├── authDemo.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── authDemo ├── .DS_Store ├── AppDelegate.h ├── AppDelegate.m ├── Base.lproj │ ├── LaunchScreen.xib │ └── Main.storyboard ├── Images.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ └── share_logo.imageset │ │ ├── Contents.json │ │ └── share_logo.jpg ├── Info.plist ├── ViewController.h ├── ViewController.m ├── authTool │ ├── .DS_Store │ ├── Lib │ │ ├── .DS_Store │ │ ├── libFacebookSDK │ │ │ ├── FBSDKCoreKit.framework │ │ │ │ ├── FBSDKCoreKit │ │ │ │ ├── Headers │ │ │ │ │ ├── FBSDKAccessToken.h │ │ │ │ │ ├── FBSDKAppEvents.h │ │ │ │ │ ├── FBSDKAppLinkResolver.h │ │ │ │ │ ├── FBSDKAppLinkUtility.h │ │ │ │ │ ├── FBSDKApplicationDelegate.h │ │ │ │ │ ├── FBSDKButton.h │ │ │ │ │ ├── FBSDKConstants.h │ │ │ │ │ ├── FBSDKCopying.h │ │ │ │ │ ├── FBSDKCoreKit.h │ │ │ │ │ ├── FBSDKGraphErrorRecoveryProcessor.h │ │ │ │ │ ├── FBSDKGraphRequest.h │ │ │ │ │ ├── FBSDKGraphRequestConnection.h │ │ │ │ │ ├── FBSDKGraphRequestDataAttachment.h │ │ │ │ │ ├── FBSDKMacros.h │ │ │ │ │ ├── FBSDKMutableCopying.h │ │ │ │ │ ├── FBSDKProfile.h │ │ │ │ │ ├── FBSDKProfilePictureView.h │ │ │ │ │ ├── FBSDKSettings.h │ │ │ │ │ ├── FBSDKTestUsersManager.h │ │ │ │ │ └── FBSDKUtility.h │ │ │ │ ├── Info.plist │ │ │ │ ├── Modules │ │ │ │ │ └── module.modulemap │ │ │ │ └── PrivateHeaders │ │ │ │ │ ├── FBSDKAccessTokenCacheV4.h │ │ │ │ │ ├── FBSDKBridgeAPICrypto.h │ │ │ │ │ ├── FBSDKBridgeAPIProtocol.h │ │ │ │ │ ├── FBSDKBridgeAPIProtocolNativeV1.h │ │ │ │ │ ├── FBSDKBridgeAPIProtocolWebV1.h │ │ │ │ │ ├── FBSDKError.h │ │ │ │ │ ├── FBSDKGraphRequestBody.h │ │ │ │ │ ├── FBSDKGraphRequestMetadata.h │ │ │ │ │ ├── FBSDKURLConnection.h │ │ │ │ │ └── FBSDKWebDialogView.h │ │ │ └── FBSDKLoginKit.framework │ │ │ │ ├── FBSDKLoginKit │ │ │ │ ├── Headers │ │ │ │ ├── FBSDKLoginButton.h │ │ │ │ ├── FBSDKLoginConstants.h │ │ │ │ ├── FBSDKLoginKit.h │ │ │ │ ├── FBSDKLoginManager.h │ │ │ │ ├── FBSDKLoginManagerLoginResult.h │ │ │ │ ├── FBSDKLoginTooltipView.h │ │ │ │ └── FBSDKTooltipView.h │ │ │ │ ├── Info.plist │ │ │ │ └── Modules │ │ │ │ └── module.modulemap │ │ ├── libTencentSDK │ │ │ ├── .DS_Store │ │ │ └── TencentOpenAPI.framework │ │ │ │ ├── Headers │ │ │ │ ├── QQApiInterface.h │ │ │ │ ├── QQApiInterfaceObject.h │ │ │ │ ├── TencentOAuth.h │ │ │ │ ├── TencentOAuthObject.h │ │ │ │ └── sdkdef.h │ │ │ │ ├── Resources │ │ │ │ └── ios_open_sdk_3.1.3.1_iphone │ │ │ │ └── TencentOpenAPI │ │ ├── libWeChatSDK │ │ │ ├── README.txt │ │ │ ├── WXApi.h │ │ │ ├── WXApiObject.h │ │ │ ├── WechatAuthSDK.h │ │ │ └── libWeChatSDK.a │ │ └── libWeiboSDK │ │ │ ├── WBHttpRequest+WeiboGame.h │ │ │ ├── WBHttpRequest+WeiboShare.h │ │ │ ├── WBHttpRequest+WeiboToken.h │ │ │ ├── WBHttpRequest+WeiboUser.h │ │ │ ├── WBHttpRequest.h │ │ │ ├── WBSDKBasicButton.h │ │ │ ├── WBSDKCommentButton.h │ │ │ ├── WBSDKRelationshipButton.h │ │ │ ├── WeiboSDK+Statistics.h │ │ │ ├── WeiboSDK.bundle │ │ │ ├── images │ │ │ │ ├── alert_error_icon@2x.png │ │ │ │ ├── alert_success_icon@2x.png │ │ │ │ ├── close.png │ │ │ │ ├── close@2x.png │ │ │ │ ├── common_button_big_blue@2x.png │ │ │ │ ├── common_button_big_blue_disable@2x.png │ │ │ │ ├── common_button_big_blue_highlighted@2x.png │ │ │ │ ├── common_button_white.png │ │ │ │ ├── common_button_white@2x.png │ │ │ │ ├── common_button_white_highlighted.png │ │ │ │ ├── common_button_white_highlighted@2x.png │ │ │ │ ├── common_icon_arrow@2x.png │ │ │ │ ├── compose_keyboardbutton_background.png │ │ │ │ ├── compose_keyboardbutton_background@2x.png │ │ │ │ ├── compose_toolbar_background.png │ │ │ │ ├── compose_toolbar_background@2x.png │ │ │ │ ├── empty_failed.png │ │ │ │ ├── empty_failed@2x.png │ │ │ │ ├── login_background@2x.png │ │ │ │ ├── login_country_background@2x.png │ │ │ │ ├── login_country_background_highlighted@2x.png │ │ │ │ ├── navigationbar_background.png │ │ │ │ ├── navigationbar_background@2x.png │ │ │ │ ├── navigationbar_background_os7.png │ │ │ │ ├── navigationbar_background_os7@2x.png │ │ │ │ ├── progresshud_background@2x.png │ │ │ │ ├── sdk_weibo_logo.png │ │ │ │ ├── sdk_weibo_logo@2x.png │ │ │ │ ├── sdk_weibo_logo@3x.png │ │ │ │ ├── timeline_relationship_icon_addattention.png │ │ │ │ ├── timeline_relationship_icon_addattention@2x.png │ │ │ │ ├── timeline_relationship_icon_addattention@3x.png │ │ │ │ ├── timeline_relationship_icon_attention.png │ │ │ │ ├── timeline_relationship_icon_attention@2x.png │ │ │ │ ├── timeline_relationship_icon_attention@3x.png │ │ │ │ ├── verify_code_button@2x.png │ │ │ │ ├── verify_code_button@3x.png │ │ │ │ ├── verify_code_button_highlighted@2x.png │ │ │ │ └── verify_code_button_highlighted@3x.png │ │ │ └── others │ │ │ │ ├── countryList │ │ │ │ └── mfp.cer │ │ │ ├── WeiboSDK.h │ │ │ ├── WeiboUser.h │ │ │ └── libWeiboSDK.a │ ├── WMAuthManager.h │ ├── WMAuthManager.m │ ├── WMEmail.h │ ├── WMEmail.m │ ├── WMFacebookManager.h │ ├── WMFacebookManager.m │ ├── WMNetwork.h │ ├── WMNetwork.m │ ├── WMTencentManager.h │ ├── WMTencentManager.m │ ├── WMWeiXinManager.h │ ├── WMWeiXinManager.m │ ├── WMWeiboManager.h │ └── WMWeiboManager.m └── main.m ├── facebook.gif └── facebook.mov /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/.DS_Store -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | *.xccheckout 14 | *.moved-aside 15 | DerivedData 16 | *.hmap 17 | *.ipa 18 | *.xcuserstate 19 | 20 | # CocoaPods 21 | # 22 | # We recommend against adding the Pods directory to your .gitignore. However 23 | # you should judge for yourself, the pros and cons are mentioned at: 24 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 25 | # 26 | #Pods/ 27 | -------------------------------------------------------------------------------- /1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/1.jpg -------------------------------------------------------------------------------- /2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/2.png -------------------------------------------------------------------------------- /3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/3.png -------------------------------------------------------------------------------- /4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/4.png -------------------------------------------------------------------------------- /5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/5.png -------------------------------------------------------------------------------- /6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/6.png -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | platform :ios, '9.0' 3 | inhibit_all_warnings! 4 | target 'authDemo' do 5 | 6 | pod 'AFNetworking' 7 | 8 | end 9 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - AFNetworking (3.2.1): 3 | - AFNetworking/NSURLSession (= 3.2.1) 4 | - AFNetworking/Reachability (= 3.2.1) 5 | - AFNetworking/Security (= 3.2.1) 6 | - AFNetworking/Serialization (= 3.2.1) 7 | - AFNetworking/UIKit (= 3.2.1) 8 | - AFNetworking/NSURLSession (3.2.1): 9 | - AFNetworking/Reachability 10 | - AFNetworking/Security 11 | - AFNetworking/Serialization 12 | - AFNetworking/Reachability (3.2.1) 13 | - AFNetworking/Security (3.2.1) 14 | - AFNetworking/Serialization (3.2.1) 15 | - AFNetworking/UIKit (3.2.1): 16 | - AFNetworking/NSURLSession 17 | 18 | DEPENDENCIES: 19 | - AFNetworking 20 | 21 | SPEC REPOS: 22 | https://github.com/cocoapods/specs.git: 23 | - AFNetworking 24 | 25 | SPEC CHECKSUMS: 26 | AFNetworking: b6f891fdfaed196b46c7a83cf209e09697b94057 27 | 28 | PODFILE CHECKSUM: bafb936a9f844c17a7bfafbb6b8050820824a1b2 29 | 30 | COCOAPODS: 1.5.3 31 | -------------------------------------------------------------------------------- /Pods/AFNetworking/AFNetworking/AFCompatibilityMacros.h: -------------------------------------------------------------------------------- 1 | // AFCompatibilityMacros.h 2 | // Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | #ifndef AFCompatibilityMacros_h 23 | #define AFCompatibilityMacros_h 24 | 25 | #ifdef API_UNAVAILABLE 26 | #define AF_API_UNAVAILABLE(x) API_UNAVAILABLE(x) 27 | #else 28 | #define AF_API_UNAVAILABLE(x) 29 | #endif // API_UNAVAILABLE 30 | 31 | #if __has_warning("-Wunguarded-availability-new") 32 | #define AF_CAN_USE_AT_AVAILABLE 1 33 | #else 34 | #define AF_CAN_USE_AT_AVAILABLE 0 35 | #endif 36 | 37 | #endif /* AFCompatibilityMacros_h */ 38 | -------------------------------------------------------------------------------- /Pods/AFNetworking/AFNetworking/AFNetworking.h: -------------------------------------------------------------------------------- 1 | // AFNetworking.h 2 | // 3 | // Copyright (c) 2013 AFNetworking (http://afnetworking.com/) 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | #import 25 | #import 26 | 27 | #ifndef _AFNETWORKING_ 28 | #define _AFNETWORKING_ 29 | 30 | #import "AFURLRequestSerialization.h" 31 | #import "AFURLResponseSerialization.h" 32 | #import "AFSecurityPolicy.h" 33 | 34 | #if !TARGET_OS_WATCH 35 | #import "AFNetworkReachabilityManager.h" 36 | #endif 37 | 38 | #import "AFURLSessionManager.h" 39 | #import "AFHTTPSessionManager.h" 40 | 41 | #endif /* _AFNETWORKING_ */ 42 | -------------------------------------------------------------------------------- /Pods/AFNetworking/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011-2016 Alamofire Software Foundation (http://alamofire.org/) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Pods/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // UIActivityIndicatorView+AFNetworking.h 2 | // Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | #import 23 | 24 | #import 25 | 26 | #if TARGET_OS_IOS || TARGET_OS_TV 27 | 28 | #import 29 | 30 | /** 31 | This category adds methods to the UIKit framework's `UIActivityIndicatorView` class. The methods in this category provide support for automatically starting and stopping animation depending on the loading state of a session task. 32 | */ 33 | @interface UIActivityIndicatorView (AFNetworking) 34 | 35 | ///---------------------------------- 36 | /// @name Animating for Session Tasks 37 | ///---------------------------------- 38 | 39 | /** 40 | Binds the animating state to the state of the specified task. 41 | 42 | @param task The task. If `nil`, automatic updating from any previously specified operation will be disabled. 43 | */ 44 | - (void)setAnimatingWithStateOfTask:(nullable NSURLSessionTask *)task; 45 | 46 | @end 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /Pods/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.m: -------------------------------------------------------------------------------- 1 | // UIActivityIndicatorView+AFNetworking.m 2 | // Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | #import "UIActivityIndicatorView+AFNetworking.h" 23 | #import 24 | 25 | #if TARGET_OS_IOS || TARGET_OS_TV 26 | 27 | #import "AFURLSessionManager.h" 28 | 29 | @interface AFActivityIndicatorViewNotificationObserver : NSObject 30 | @property (readonly, nonatomic, weak) UIActivityIndicatorView *activityIndicatorView; 31 | - (instancetype)initWithActivityIndicatorView:(UIActivityIndicatorView *)activityIndicatorView; 32 | 33 | - (void)setAnimatingWithStateOfTask:(NSURLSessionTask *)task; 34 | 35 | @end 36 | 37 | @implementation UIActivityIndicatorView (AFNetworking) 38 | 39 | - (AFActivityIndicatorViewNotificationObserver *)af_notificationObserver { 40 | AFActivityIndicatorViewNotificationObserver *notificationObserver = objc_getAssociatedObject(self, @selector(af_notificationObserver)); 41 | if (notificationObserver == nil) { 42 | notificationObserver = [[AFActivityIndicatorViewNotificationObserver alloc] initWithActivityIndicatorView:self]; 43 | objc_setAssociatedObject(self, @selector(af_notificationObserver), notificationObserver, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 44 | } 45 | return notificationObserver; 46 | } 47 | 48 | - (void)setAnimatingWithStateOfTask:(NSURLSessionTask *)task { 49 | [[self af_notificationObserver] setAnimatingWithStateOfTask:task]; 50 | } 51 | 52 | @end 53 | 54 | @implementation AFActivityIndicatorViewNotificationObserver 55 | 56 | - (instancetype)initWithActivityIndicatorView:(UIActivityIndicatorView *)activityIndicatorView 57 | { 58 | self = [super init]; 59 | if (self) { 60 | _activityIndicatorView = activityIndicatorView; 61 | } 62 | return self; 63 | } 64 | 65 | - (void)setAnimatingWithStateOfTask:(NSURLSessionTask *)task { 66 | NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; 67 | 68 | [notificationCenter removeObserver:self name:AFNetworkingTaskDidResumeNotification object:nil]; 69 | [notificationCenter removeObserver:self name:AFNetworkingTaskDidSuspendNotification object:nil]; 70 | [notificationCenter removeObserver:self name:AFNetworkingTaskDidCompleteNotification object:nil]; 71 | 72 | if (task) { 73 | if (task.state != NSURLSessionTaskStateCompleted) { 74 | UIActivityIndicatorView *activityIndicatorView = self.activityIndicatorView; 75 | if (task.state == NSURLSessionTaskStateRunning) { 76 | [activityIndicatorView startAnimating]; 77 | } else { 78 | [activityIndicatorView stopAnimating]; 79 | } 80 | 81 | [notificationCenter addObserver:self selector:@selector(af_startAnimating) name:AFNetworkingTaskDidResumeNotification object:task]; 82 | [notificationCenter addObserver:self selector:@selector(af_stopAnimating) name:AFNetworkingTaskDidCompleteNotification object:task]; 83 | [notificationCenter addObserver:self selector:@selector(af_stopAnimating) name:AFNetworkingTaskDidSuspendNotification object:task]; 84 | } 85 | } 86 | } 87 | 88 | #pragma mark - 89 | 90 | - (void)af_startAnimating { 91 | dispatch_async(dispatch_get_main_queue(), ^{ 92 | [self.activityIndicatorView startAnimating]; 93 | }); 94 | } 95 | 96 | - (void)af_stopAnimating { 97 | dispatch_async(dispatch_get_main_queue(), ^{ 98 | [self.activityIndicatorView stopAnimating]; 99 | }); 100 | } 101 | 102 | #pragma mark - 103 | 104 | - (void)dealloc { 105 | NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; 106 | 107 | [notificationCenter removeObserver:self name:AFNetworkingTaskDidCompleteNotification object:nil]; 108 | [notificationCenter removeObserver:self name:AFNetworkingTaskDidResumeNotification object:nil]; 109 | [notificationCenter removeObserver:self name:AFNetworkingTaskDidSuspendNotification object:nil]; 110 | } 111 | 112 | @end 113 | 114 | #endif 115 | -------------------------------------------------------------------------------- /Pods/AFNetworking/UIKit+AFNetworking/UIImage+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+AFNetworking.h 3 | // 4 | // 5 | // Created by Paulo Ferreira on 08/07/15. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #if TARGET_OS_IOS || TARGET_OS_TV 26 | 27 | #import 28 | 29 | @interface UIImage (AFNetworking) 30 | 31 | + (UIImage*) safeImageWithData:(NSData*)data; 32 | 33 | @end 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /Pods/AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // UIKit+AFNetworking.h 2 | // 3 | // Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #if TARGET_OS_IOS || TARGET_OS_TV 24 | #import 25 | 26 | #ifndef _UIKIT_AFNETWORKING_ 27 | #define _UIKIT_AFNETWORKING_ 28 | 29 | #if TARGET_OS_IOS 30 | #import "AFAutoPurgingImageCache.h" 31 | #import "AFImageDownloader.h" 32 | #import "AFNetworkActivityIndicatorManager.h" 33 | #import "UIRefreshControl+AFNetworking.h" 34 | #import "UIWebView+AFNetworking.h" 35 | #endif 36 | 37 | #import "UIActivityIndicatorView+AFNetworking.h" 38 | #import "UIButton+AFNetworking.h" 39 | #import "UIImageView+AFNetworking.h" 40 | #import "UIProgressView+AFNetworking.h" 41 | #endif /* _UIKIT_AFNETWORKING_ */ 42 | #endif 43 | -------------------------------------------------------------------------------- /Pods/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // UIProgressView+AFNetworking.h 2 | // Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | #import 23 | 24 | #import 25 | 26 | #if TARGET_OS_IOS || TARGET_OS_TV 27 | 28 | #import 29 | 30 | NS_ASSUME_NONNULL_BEGIN 31 | 32 | 33 | /** 34 | This category adds methods to the UIKit framework's `UIProgressView` class. The methods in this category provide support for binding the progress to the upload and download progress of a session task. 35 | */ 36 | @interface UIProgressView (AFNetworking) 37 | 38 | ///------------------------------------ 39 | /// @name Setting Session Task Progress 40 | ///------------------------------------ 41 | 42 | /** 43 | Binds the progress to the upload progress of the specified session task. 44 | 45 | @param task The session task. 46 | @param animated `YES` if the change should be animated, `NO` if the change should happen immediately. 47 | */ 48 | - (void)setProgressWithUploadProgressOfTask:(NSURLSessionUploadTask *)task 49 | animated:(BOOL)animated; 50 | 51 | /** 52 | Binds the progress to the download progress of the specified session task. 53 | 54 | @param task The session task. 55 | @param animated `YES` if the change should be animated, `NO` if the change should happen immediately. 56 | */ 57 | - (void)setProgressWithDownloadProgressOfTask:(NSURLSessionDownloadTask *)task 58 | animated:(BOOL)animated; 59 | 60 | @end 61 | 62 | NS_ASSUME_NONNULL_END 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /Pods/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // UIRefreshControl+AFNetworking.m 2 | // 3 | // Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | 25 | #import 26 | 27 | #if TARGET_OS_IOS 28 | 29 | #import 30 | 31 | NS_ASSUME_NONNULL_BEGIN 32 | 33 | /** 34 | This category adds methods to the UIKit framework's `UIRefreshControl` class. The methods in this category provide support for automatically beginning and ending refreshing depending on the loading state of a session task. 35 | */ 36 | @interface UIRefreshControl (AFNetworking) 37 | 38 | ///----------------------------------- 39 | /// @name Refreshing for Session Tasks 40 | ///----------------------------------- 41 | 42 | /** 43 | Binds the refreshing state to the state of the specified task. 44 | 45 | @param task The task. If `nil`, automatic updating from any previously specified operation will be disabled. 46 | */ 47 | - (void)setRefreshingWithStateOfTask:(NSURLSessionTask *)task; 48 | 49 | @end 50 | 51 | NS_ASSUME_NONNULL_END 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /Pods/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.m: -------------------------------------------------------------------------------- 1 | // UIRefreshControl+AFNetworking.m 2 | // 3 | // Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import "UIRefreshControl+AFNetworking.h" 24 | #import 25 | 26 | #if TARGET_OS_IOS 27 | 28 | #import "AFURLSessionManager.h" 29 | 30 | @interface AFRefreshControlNotificationObserver : NSObject 31 | @property (readonly, nonatomic, weak) UIRefreshControl *refreshControl; 32 | - (instancetype)initWithActivityRefreshControl:(UIRefreshControl *)refreshControl; 33 | 34 | - (void)setRefreshingWithStateOfTask:(NSURLSessionTask *)task; 35 | 36 | @end 37 | 38 | @implementation UIRefreshControl (AFNetworking) 39 | 40 | - (AFRefreshControlNotificationObserver *)af_notificationObserver { 41 | AFRefreshControlNotificationObserver *notificationObserver = objc_getAssociatedObject(self, @selector(af_notificationObserver)); 42 | if (notificationObserver == nil) { 43 | notificationObserver = [[AFRefreshControlNotificationObserver alloc] initWithActivityRefreshControl:self]; 44 | objc_setAssociatedObject(self, @selector(af_notificationObserver), notificationObserver, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 45 | } 46 | return notificationObserver; 47 | } 48 | 49 | - (void)setRefreshingWithStateOfTask:(NSURLSessionTask *)task { 50 | [[self af_notificationObserver] setRefreshingWithStateOfTask:task]; 51 | } 52 | 53 | @end 54 | 55 | @implementation AFRefreshControlNotificationObserver 56 | 57 | - (instancetype)initWithActivityRefreshControl:(UIRefreshControl *)refreshControl 58 | { 59 | self = [super init]; 60 | if (self) { 61 | _refreshControl = refreshControl; 62 | } 63 | return self; 64 | } 65 | 66 | - (void)setRefreshingWithStateOfTask:(NSURLSessionTask *)task { 67 | NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; 68 | 69 | [notificationCenter removeObserver:self name:AFNetworkingTaskDidResumeNotification object:nil]; 70 | [notificationCenter removeObserver:self name:AFNetworkingTaskDidSuspendNotification object:nil]; 71 | [notificationCenter removeObserver:self name:AFNetworkingTaskDidCompleteNotification object:nil]; 72 | 73 | if (task) { 74 | UIRefreshControl *refreshControl = self.refreshControl; 75 | if (task.state == NSURLSessionTaskStateRunning) { 76 | [refreshControl beginRefreshing]; 77 | 78 | [notificationCenter addObserver:self selector:@selector(af_beginRefreshing) name:AFNetworkingTaskDidResumeNotification object:task]; 79 | [notificationCenter addObserver:self selector:@selector(af_endRefreshing) name:AFNetworkingTaskDidCompleteNotification object:task]; 80 | [notificationCenter addObserver:self selector:@selector(af_endRefreshing) name:AFNetworkingTaskDidSuspendNotification object:task]; 81 | } else { 82 | [refreshControl endRefreshing]; 83 | } 84 | } 85 | } 86 | 87 | #pragma mark - 88 | 89 | - (void)af_beginRefreshing { 90 | dispatch_async(dispatch_get_main_queue(), ^{ 91 | [self.refreshControl beginRefreshing]; 92 | }); 93 | } 94 | 95 | - (void)af_endRefreshing { 96 | dispatch_async(dispatch_get_main_queue(), ^{ 97 | [self.refreshControl endRefreshing]; 98 | }); 99 | } 100 | 101 | #pragma mark - 102 | 103 | - (void)dealloc { 104 | NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; 105 | 106 | [notificationCenter removeObserver:self name:AFNetworkingTaskDidCompleteNotification object:nil]; 107 | [notificationCenter removeObserver:self name:AFNetworkingTaskDidResumeNotification object:nil]; 108 | [notificationCenter removeObserver:self name:AFNetworkingTaskDidSuspendNotification object:nil]; 109 | } 110 | 111 | @end 112 | 113 | #endif 114 | -------------------------------------------------------------------------------- /Pods/AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // UIWebView+AFNetworking.h 2 | // Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | #import 23 | 24 | #import 25 | 26 | #if TARGET_OS_IOS 27 | 28 | #import 29 | 30 | NS_ASSUME_NONNULL_BEGIN 31 | 32 | @class AFHTTPSessionManager; 33 | 34 | /** 35 | This category adds methods to the UIKit framework's `UIWebView` class. The methods in this category provide increased control over the request cycle, including progress monitoring and success / failure handling. 36 | 37 | @discussion When using these category methods, make sure to assign `delegate` for the web view, which implements `–webView:shouldStartLoadWithRequest:navigationType:` appropriately. This allows for tapped links to be loaded through AFNetworking, and can ensure that `canGoBack` & `canGoForward` update their values correctly. 38 | */ 39 | @interface UIWebView (AFNetworking) 40 | 41 | /** 42 | The session manager used to download all requests. 43 | */ 44 | @property (nonatomic, strong) AFHTTPSessionManager *sessionManager; 45 | 46 | /** 47 | Asynchronously loads the specified request. 48 | 49 | @param request A URL request identifying the location of the content to load. This must not be `nil`. 50 | @param progress A progress object monitoring the current download progress. 51 | @param success A block object to be executed when the request finishes loading successfully. This block returns the HTML string to be loaded by the web view, and takes two arguments: the response, and the response string. 52 | @param failure A block object to be executed when the data task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a single argument: the error that occurred. 53 | */ 54 | - (void)loadRequest:(NSURLRequest *)request 55 | progress:(NSProgress * _Nullable __autoreleasing * _Nullable)progress 56 | success:(nullable NSString * (^)(NSHTTPURLResponse *response, NSString *HTML))success 57 | failure:(nullable void (^)(NSError *error))failure; 58 | 59 | /** 60 | Asynchronously loads the data associated with a particular request with a specified MIME type and text encoding. 61 | 62 | @param request A URL request identifying the location of the content to load. This must not be `nil`. 63 | @param MIMEType The MIME type of the content. Defaults to the content type of the response if not specified. 64 | @param textEncodingName The IANA encoding name, as in `utf-8` or `utf-16`. Defaults to the response text encoding if not specified. 65 | @param progress A progress object monitoring the current download progress. 66 | @param success A block object to be executed when the request finishes loading successfully. This block returns the data to be loaded by the web view and takes two arguments: the response, and the downloaded data. 67 | @param failure A block object to be executed when the data task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a single argument: the error that occurred. 68 | */ 69 | - (void)loadRequest:(NSURLRequest *)request 70 | MIMEType:(nullable NSString *)MIMEType 71 | textEncodingName:(nullable NSString *)textEncodingName 72 | progress:(NSProgress * _Nullable __autoreleasing * _Nullable)progress 73 | success:(nullable NSData * (^)(NSHTTPURLResponse *response, NSData *data))success 74 | failure:(nullable void (^)(NSError *error))failure; 75 | 76 | @end 77 | 78 | NS_ASSUME_NONNULL_END 79 | 80 | #endif 81 | -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/AFAutoPurgingImageCache.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/AFAutoPurgingImageCache.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/AFCompatibilityMacros.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFCompatibilityMacros.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/AFHTTPSessionManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFHTTPSessionManager.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/AFImageDownloader.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/AFImageDownloader.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/AFNetworkActivityIndicatorManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/AFNetworkReachabilityManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFNetworkReachabilityManager.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/AFSecurityPolicy.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFSecurityPolicy.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/AFURLRequestSerialization.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLRequestSerialization.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/AFURLResponseSerialization.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLResponseSerialization.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/AFURLSessionManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLSessionManager.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/UIActivityIndicatorView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/UIButton+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/UIImage+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIImage+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/UIImageView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/UIKit+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/UIProgressView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/UIRefreshControl+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AFNetworking/UIWebView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/AFAutoPurgingImageCache.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/AFAutoPurgingImageCache.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/AFCompatibilityMacros.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFCompatibilityMacros.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/AFHTTPSessionManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFHTTPSessionManager.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/AFImageDownloader.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/AFImageDownloader.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/AFNetworkActivityIndicatorManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/AFNetworkReachabilityManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFNetworkReachabilityManager.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/AFSecurityPolicy.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFSecurityPolicy.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/AFURLRequestSerialization.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLRequestSerialization.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/AFURLResponseSerialization.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLResponseSerialization.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/AFURLSessionManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLSessionManager.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/UIActivityIndicatorView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/UIButton+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/UIImage+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIImage+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/UIImageView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/UIKit+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/UIProgressView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/UIRefreshControl+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AFNetworking/UIWebView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.h -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - AFNetworking (3.2.1): 3 | - AFNetworking/NSURLSession (= 3.2.1) 4 | - AFNetworking/Reachability (= 3.2.1) 5 | - AFNetworking/Security (= 3.2.1) 6 | - AFNetworking/Serialization (= 3.2.1) 7 | - AFNetworking/UIKit (= 3.2.1) 8 | - AFNetworking/NSURLSession (3.2.1): 9 | - AFNetworking/Reachability 10 | - AFNetworking/Security 11 | - AFNetworking/Serialization 12 | - AFNetworking/Reachability (3.2.1) 13 | - AFNetworking/Security (3.2.1) 14 | - AFNetworking/Serialization (3.2.1) 15 | - AFNetworking/UIKit (3.2.1): 16 | - AFNetworking/NSURLSession 17 | 18 | DEPENDENCIES: 19 | - AFNetworking 20 | 21 | SPEC REPOS: 22 | https://github.com/cocoapods/specs.git: 23 | - AFNetworking 24 | 25 | SPEC CHECKSUMS: 26 | AFNetworking: b6f891fdfaed196b46c7a83cf209e09697b94057 27 | 28 | PODFILE CHECKSUM: bafb936a9f844c17a7bfafbb6b8050820824a1b2 29 | 30 | COCOAPODS: 1.5.3 31 | -------------------------------------------------------------------------------- /Pods/Target Support Files/AFNetworking/AFNetworking-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_AFNetworking : NSObject 3 | @end 4 | @implementation PodsDummy_AFNetworking 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/AFNetworking/AFNetworking-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #ifndef TARGET_OS_IOS 14 | #define TARGET_OS_IOS TARGET_OS_IPHONE 15 | #endif 16 | 17 | #ifndef TARGET_OS_WATCH 18 | #define TARGET_OS_WATCH 0 19 | #endif 20 | 21 | #ifndef TARGET_OS_TV 22 | #define TARGET_OS_TV 0 23 | #endif 24 | -------------------------------------------------------------------------------- /Pods/Target Support Files/AFNetworking/AFNetworking.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/AFNetworking 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/AFNetworking" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" 4 | OTHER_LDFLAGS = -framework "CoreGraphics" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/AFNetworking 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-authDemo/Pods-authDemo-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## AFNetworking 5 | 6 | Copyright (c) 2011-2016 Alamofire Software Foundation (http://alamofire.org/) 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | Generated by CocoaPods - https://cocoapods.org 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-authDemo/Pods-authDemo-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Copyright (c) 2011-2016 Alamofire Software Foundation (http://alamofire.org/) 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is 24 | furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in 27 | all copies or substantial portions of the Software. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | 37 | License 38 | MIT 39 | Title 40 | AFNetworking 41 | Type 42 | PSGroupSpecifier 43 | 44 | 45 | FooterText 46 | Generated by CocoaPods - https://cocoapods.org 47 | Title 48 | 49 | Type 50 | PSGroupSpecifier 51 | 52 | 53 | StringsTable 54 | Acknowledgements 55 | Title 56 | Acknowledgements 57 | 58 | 59 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-authDemo/Pods-authDemo-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_authDemo : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_authDemo 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-authDemo/Pods-authDemo.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/AFNetworking" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking" -framework "CoreGraphics" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration" 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-authDemo/Pods-authDemo.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/AFNetworking" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking" -framework "CoreGraphics" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration" 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /auth.mov: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/auth.mov -------------------------------------------------------------------------------- /authDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /authDemo.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /authDemo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /authDemo/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/.DS_Store -------------------------------------------------------------------------------- /authDemo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // autoDemo 4 | // 5 | // Created by zwm on 15/5/14. 6 | // Copyright (c) 2015年 zwm. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /authDemo/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // autoDemo 4 | // 5 | // Created by zwm on 15/5/14. 6 | // Copyright (c) 2015年 zwm. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "WMAuthManager.h" 11 | 12 | @interface AppDelegate () 13 | 14 | @end 15 | 16 | @implementation AppDelegate 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 19 | { 20 | // Override point for customization after application launch. 21 | 22 | // 注册 23 | [WMAuthManager registerApp:WMAuthAll 24 | withApplication:application 25 | withOptions:launchOptions]; 26 | 27 | return YES; 28 | } 29 | 30 | #pragma mark - 31 | - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation 32 | { 33 | // 回调 34 | return [WMAuthManager handleOpenURL:url 35 | application:application 36 | sourceApplication:sourceApplication 37 | annotation:annotation]; 38 | } 39 | 40 | - (void)applicationWillResignActive:(UIApplication *)application 41 | { 42 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 43 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 44 | } 45 | 46 | - (void)applicationDidEnterBackground:(UIApplication *)application 47 | { 48 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 49 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 50 | } 51 | 52 | - (void)applicationWillEnterForeground:(UIApplication *)application 53 | { 54 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 55 | } 56 | 57 | - (void)applicationDidBecomeActive:(UIApplication *)application 58 | { 59 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 60 | // 恢复 61 | [WMAuthManager activateApp]; 62 | } 63 | 64 | - (void)applicationWillTerminate:(UIApplication *)application 65 | { 66 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 67 | } 68 | 69 | @end 70 | -------------------------------------------------------------------------------- /authDemo/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 21 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /authDemo/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | } 43 | ], 44 | "info" : { 45 | "version" : 1, 46 | "author" : "xcode" 47 | } 48 | } -------------------------------------------------------------------------------- /authDemo/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /authDemo/Images.xcassets/share_logo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "share_logo.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /authDemo/Images.xcassets/share_logo.imageset/share_logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/Images.xcassets/share_logo.imageset/share_logo.jpg -------------------------------------------------------------------------------- /authDemo/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // autoDemo 4 | // 5 | // Created by zwm on 15/5/14. 6 | // Copyright (c) 2015年 zwm. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /authDemo/authTool/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/.DS_Store -------------------------------------------------------------------------------- /authDemo/authTool/Lib/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/.DS_Store -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libFacebookSDK/FBSDKCoreKit.framework/FBSDKCoreKit: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libFacebookSDK/FBSDKCoreKit.framework/FBSDKCoreKit -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libFacebookSDK/FBSDKCoreKit.framework/Headers/FBSDKAppLinkResolver.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 2 | // 3 | // You are hereby granted a non-exclusive, worldwide, royalty-free license to use, 4 | // copy, modify, and distribute this software in source code or binary form for use 5 | // in connection with the web services and APIs provided by Facebook. 6 | // 7 | // As with any software that integrates with the Facebook platform, your use of 8 | // this software is subject to the Facebook Developer Principles and Policies 9 | // [http://developers.facebook.com/policy/]. This copyright notice shall be 10 | // included in all copies or substantial portions of the software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 14 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 15 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 16 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 17 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | 19 | #import 20 | 21 | @class BFTask; 22 | 23 | // Check if Bolts.framework is available for import 24 | #if __has_include() 25 | // Import it if it's available 26 | # import 27 | #else 28 | // Otherwise - redeclare BFAppLinkResolving protocol to resolve the problem of missing symbols 29 | // Please note: Bolts.framework is still required for AppLink resolving to work, 30 | // but this allows FBSDKCoreKit to weakly link Bolts.framework as well as this enables clang modulemaps to work. 31 | 32 | /*! 33 | Implement this protocol to provide an alternate strategy for resolving 34 | App Links that may include pre-fetching, caching, or querying for App Link 35 | data from an index provided by a service provider. 36 | */ 37 | @protocol BFAppLinkResolving 38 | 39 | /*! 40 | Asynchronously resolves App Link data for a given URL. 41 | 42 | @param url The URL to resolve into an App Link. 43 | @returns A BFTask that will return a BFAppLink for the given URL. 44 | */ 45 | - (BFTask *)appLinkFromURLInBackground:(NSURL *)url; 46 | 47 | @end 48 | 49 | #endif 50 | 51 | /*! 52 | @class FBSDKAppLinkResolver 53 | 54 | @abstract 55 | Provides an implementation of the BFAppLinkResolving protocol that uses the Facebook App Link 56 | Index API to resolve App Links given a URL. It also provides an additional helper method that can resolve 57 | multiple App Links in a single call. 58 | 59 | @discussion 60 | Usage of this type requires a client token. See `[FBSDKSettings setClientToken:]` and linking 61 | Bolts.framework 62 | */ 63 | @interface FBSDKAppLinkResolver : NSObject 64 | 65 | /*! 66 | @abstract Asynchronously resolves App Link data for multiple URLs. 67 | 68 | @param urls An array of NSURLs to resolve into App Links. 69 | @returns A BFTask that will return dictionary mapping input NSURLs to their 70 | corresponding BFAppLink. 71 | 72 | @discussion 73 | You should set the client token before making this call. See `[FBSDKSettings setClientToken:]` 74 | */ 75 | - (BFTask *)appLinksFromURLsInBackground:(NSArray *)urls; 76 | 77 | /*! 78 | @abstract Allocates and initializes a new instance of FBSDKAppLinkResolver. 79 | */ 80 | + (instancetype)resolver; 81 | 82 | @end 83 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libFacebookSDK/FBSDKCoreKit.framework/Headers/FBSDKAppLinkUtility.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 2 | // 3 | // You are hereby granted a non-exclusive, worldwide, royalty-free license to use, 4 | // copy, modify, and distribute this software in source code or binary form for use 5 | // in connection with the web services and APIs provided by Facebook. 6 | // 7 | // As with any software that integrates with the Facebook platform, your use of 8 | // this software is subject to the Facebook Developer Principles and Policies 9 | // [http://developers.facebook.com/policy/]. This copyright notice shall be 10 | // included in all copies or substantial portions of the software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 14 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 15 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 16 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 17 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | 19 | #import 20 | 21 | /*! 22 | @abstract Describes the callback for fetchDeferredAppLink. 23 | @param url the url representing the deferred App Link 24 | @param error the error during the request, if any 25 | 26 | @discussion The url may also have a fb_click_time_utc query parameter that 27 | represents when the click occurred that caused the deferred App Link to be created. 28 | */ 29 | typedef void (^FBSDKDeferredAppLinkHandler)(NSURL *url, NSError *error); 30 | 31 | /*! 32 | @abstract Class containing App Links related utility methods. 33 | */ 34 | @interface FBSDKAppLinkUtility : NSObject 35 | 36 | /*! 37 | @abstract 38 | Call this method from the main thread to fetch deferred applink data if you use Mobile App 39 | Engagement Ads (https://developers.facebook.com/docs/ads-for-apps/mobile-app-ads-engagement). 40 | This may require a network round trip. If successful, the handler is invoked with the link 41 | data (this will only return a valid URL once, and future calls will result in a nil URL 42 | value in the callback). 43 | 44 | @param handler the handler to be invoked if there is deferred App Link data 45 | 46 | @discussion The handler may contain an NSError instance to capture any errors. In the 47 | common case where there simply was no app link data, the NSError instance will be nil. 48 | 49 | This method should only be called from a location that occurs after any launching URL has 50 | been processed (e.g., you should call this method from your application delegate's 51 | applicationDidBecomeActive:). 52 | */ 53 | + (void)fetchDeferredAppLink:(FBSDKDeferredAppLinkHandler)handler; 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libFacebookSDK/FBSDKCoreKit.framework/Headers/FBSDKApplicationDelegate.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 2 | // 3 | // You are hereby granted a non-exclusive, worldwide, royalty-free license to use, 4 | // copy, modify, and distribute this software in source code or binary form for use 5 | // in connection with the web services and APIs provided by Facebook. 6 | // 7 | // As with any software that integrates with the Facebook platform, your use of 8 | // this software is subject to the Facebook Developer Principles and Policies 9 | // [http://developers.facebook.com/policy/]. This copyright notice shall be 10 | // included in all copies or substantial portions of the software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 14 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 15 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 16 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 17 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | 19 | #import 20 | 21 | /*! 22 | @class FBSDKApplicationDelegate 23 | 24 | @abstract 25 | The FBSDKApplicationDelegate is designed to post process the results from Facebook Login 26 | or Facebook Dialogs (or any action that requires switching over to the native Facebook 27 | app or Safari). 28 | 29 | @discussion 30 | The methods in this class are designed to mirror those in UIApplicationDelegate, and you 31 | should call them in the respective methods in your AppDelegate implementation. 32 | */ 33 | @interface FBSDKApplicationDelegate : NSObject 34 | 35 | /*! 36 | @abstract Gets the singleton instance. 37 | */ 38 | + (instancetype)sharedInstance; 39 | 40 | /*! 41 | @abstract 42 | Call this method from the [UIApplicationDelegate application:openURL:sourceApplication:annotation:] method 43 | of the AppDelegate for your app. It should be invoked for the proper processing of responses during interaction 44 | with the native Facebook app or Safari as part of SSO authorization flow or Facebook dialogs. 45 | 46 | @param application The application as passed to [UIApplicationDelegate application:openURL:sourceApplication:annotation:]. 47 | 48 | @param url The URL as passed to [UIApplicationDelegate application:openURL:sourceApplication:annotation:]. 49 | 50 | @param sourceApplication The sourceApplication as passed to [UIApplicationDelegate application:openURL:sourceApplication:annotation:]. 51 | 52 | @param annotation The annotation as passed to [UIApplicationDelegate application:openURL:sourceApplication:annotation:]. 53 | 54 | @return YES if the url was intended for the Facebook SDK, NO if not. 55 | */ 56 | - (BOOL)application:(UIApplication *)application 57 | openURL:(NSURL *)url 58 | sourceApplication:(NSString *)sourceApplication 59 | annotation:(id)annotation; 60 | 61 | /*! 62 | @abstract 63 | Call this method from the [UIApplicationDelegate application:didFinishLaunchingWithOptions:] method 64 | of the AppDelegate for your app. It should be invoked for the proper use of the Facebook SDK. 65 | 66 | @param application The application as passed to [UIApplicationDelegate application:didFinishLaunchingWithOptions:]. 67 | 68 | @param launchOptions The launchOptions as passed to [UIApplicationDelegate application:didFinishLaunchingWithOptions:]. 69 | 70 | @return YES if the url was intended for the Facebook SDK, NO if not. 71 | */ 72 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions; 73 | 74 | @end 75 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libFacebookSDK/FBSDKCoreKit.framework/Headers/FBSDKButton.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 2 | // 3 | // You are hereby granted a non-exclusive, worldwide, royalty-free license to use, 4 | // copy, modify, and distribute this software in source code or binary form for use 5 | // in connection with the web services and APIs provided by Facebook. 6 | // 7 | // As with any software that integrates with the Facebook platform, your use of 8 | // this software is subject to the Facebook Developer Principles and Policies 9 | // [http://developers.facebook.com/policy/]. This copyright notice shall be 10 | // included in all copies or substantial portions of the software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 14 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 15 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 16 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 17 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | 19 | #import 20 | 21 | /*! 22 | @abstract A base class for common SDK buttons. 23 | */ 24 | @interface FBSDKButton : UIButton 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libFacebookSDK/FBSDKCoreKit.framework/Headers/FBSDKCopying.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 2 | // 3 | // You are hereby granted a non-exclusive, worldwide, royalty-free license to use, 4 | // copy, modify, and distribute this software in source code or binary form for use 5 | // in connection with the web services and APIs provided by Facebook. 6 | // 7 | // As with any software that integrates with the Facebook platform, your use of 8 | // this software is subject to the Facebook Developer Principles and Policies 9 | // [http://developers.facebook.com/policy/]. This copyright notice shall be 10 | // included in all copies or substantial portions of the software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 14 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 15 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 16 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 17 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | 19 | #import 20 | 21 | /*! 22 | @abstract Extension protocol for NSCopying that adds the copy method, which is implemented on NSObject. 23 | @discussion NSObject implicitly conforms to this protocol. 24 | */ 25 | @protocol FBSDKCopying 26 | 27 | /*! 28 | @abstract Implemented by NSObject as a convenience to copyWithZone:. 29 | @return A copy of the receiver. 30 | */ 31 | - (id)copy; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libFacebookSDK/FBSDKCoreKit.framework/Headers/FBSDKCoreKit.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 2 | // 3 | // You are hereby granted a non-exclusive, worldwide, royalty-free license to use, 4 | // copy, modify, and distribute this software in source code or binary form for use 5 | // in connection with the web services and APIs provided by Facebook. 6 | // 7 | // As with any software that integrates with the Facebook platform, your use of 8 | // this software is subject to the Facebook Developer Principles and Policies 9 | // [http://developers.facebook.com/policy/]. This copyright notice shall be 10 | // included in all copies or substantial portions of the software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 14 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 15 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 16 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 17 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | 19 | #import 20 | 21 | #import 22 | #import 23 | #import 24 | #import 25 | #import 26 | #import 27 | #import 28 | #import 29 | #import 30 | #import 31 | #import 32 | #import 33 | #import 34 | #import 35 | 36 | #define FBSDK_VERSION_STRING @"4.1.0" 37 | #define FBSDK_TARGET_PLATFORM_VERSION @"v2.3" 38 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libFacebookSDK/FBSDKCoreKit.framework/Headers/FBSDKGraphErrorRecoveryProcessor.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 2 | // 3 | // You are hereby granted a non-exclusive, worldwide, royalty-free license to use, 4 | // copy, modify, and distribute this software in source code or binary form for use 5 | // in connection with the web services and APIs provided by Facebook. 6 | // 7 | // As with any software that integrates with the Facebook platform, your use of 8 | // this software is subject to the Facebook Developer Principles and Policies 9 | // [http://developers.facebook.com/policy/]. This copyright notice shall be 10 | // included in all copies or substantial portions of the software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 14 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 15 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 16 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 17 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | 19 | #import 20 | 21 | #import "FBSDKConstants.h" 22 | 23 | @class FBSDKGraphErrorRecoveryProcessor; 24 | @class FBSDKGraphRequest; 25 | 26 | /*! 27 | @abstract Defines a delegate for `FBSDKGraphErrorRecoveryProcessor`. 28 | */ 29 | @protocol FBSDKGraphErrorRecoveryProcessorDelegate 30 | 31 | /*! 32 | @abstract Indicates the error recovery has been attempted. 33 | @param processor the processor instance. 34 | @param didRecover YES if the recovery was successful. 35 | @param error the error that that was attempted to be recovered from. 36 | */ 37 | - (void)processorDidAttemptRecovery:(FBSDKGraphErrorRecoveryProcessor *)processor didRecover:(BOOL)didRecover error:(NSError *)error; 38 | 39 | @optional 40 | /*! 41 | @abstract Indicates the processor is about to process the error. 42 | @param processor the processor instance. 43 | @param error the error is about to be processed. 44 | @discussion return NO if the processor should not process the error. For example, 45 | if you want to prevent alerts of localized messages but otherwise perform retries and recoveries, 46 | you could return NO for errors where userInfo[FBSDKGraphRequestErrorCategoryKey] equal to FBSDKGraphRequestErrorCategoryOther 47 | */ 48 | - (BOOL)processorWillProcessError:(FBSDKGraphErrorRecoveryProcessor *)processor error:(NSError *)error; 49 | 50 | @end 51 | 52 | /*! 53 | @abstract Defines a type that can process Facebook NSErrors with best practices. 54 | @discussion Facebook NSErrors can contain FBSDKErrorRecoveryAttempting instances to recover from errors, or 55 | localized messages to present to the user. This class will process the instances as follows: 56 | 57 | 1. If the error is temporary as indicated by FBSDKGraphRequestErrorCategoryKey, assume the recovery succeeded and 58 | notify the delegate. 59 | 2. If a FBSDKErrorRecoveryAttempting instance is available, display an alert (dispatched to main thread) 60 | with the recovery options and call the instance's [ attemptRecoveryFromError:optionIndex:...]. 61 | 3. If a FBSDKErrorRecoveryAttempting is not available, check the userInfo for FBSDKLocalizedErrorDescriptionKey 62 | and present that in an alert (dispatched to main thread). 63 | 64 | By default, FBSDKGraphRequests use this type to process errors and retry the request upon a successful 65 | recovery. 66 | 67 | Note that Facebook recovery attempters can present UI or even cause app switches (such as to login). Any such 68 | work is dispatched to the main thread (therefore your request handlers may then run on the main thread). 69 | 70 | Login recovery requires FBSDKLoginKit. Login will use FBSDKLoginBehaviorNative and will prompt the user 71 | for all permissions last granted. If any are declined on the new request, the recovery is not successful but 72 | the `[FBSDKAccessToken currentAccessToken]` might still have been updated. 73 | . 74 | */ 75 | @interface FBSDKGraphErrorRecoveryProcessor : NSObject 76 | 77 | /*! 78 | @abstract Gets the delegate. Note this is a strong reference, and is nil'ed out after recovery is complete. 79 | */ 80 | @property (nonatomic, strong, readonly) iddelegate; 81 | 82 | /*! 83 | @abstract Attempts to process the error, return YES if the error can be processed. 84 | @param error the error to process. 85 | @param request the relateed request that may be reissued. 86 | @param delegate the delegate that will be retained until recovery is complete. 87 | */ 88 | - (BOOL)processError:(NSError *)error request:(FBSDKGraphRequest *)request delegate:(id) delegate; 89 | 90 | /*! 91 | @abstract The callback for FBSDKErrorRecoveryAttempting 92 | @param didRecover if the recovery succeeded 93 | @param contextInfo unused 94 | */ 95 | - (void)didPresentErrorWithRecovery:(BOOL)didRecover contextInfo:(void *)contextInfo; 96 | 97 | @end 98 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libFacebookSDK/FBSDKCoreKit.framework/Headers/FBSDKGraphRequest.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 2 | // 3 | // You are hereby granted a non-exclusive, worldwide, royalty-free license to use, 4 | // copy, modify, and distribute this software in source code or binary form for use 5 | // in connection with the web services and APIs provided by Facebook. 6 | // 7 | // As with any software that integrates with the Facebook platform, your use of 8 | // this software is subject to the Facebook Developer Principles and Policies 9 | // [http://developers.facebook.com/policy/]. This copyright notice shall be 10 | // included in all copies or substantial portions of the software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 14 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 15 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 16 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 17 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | 19 | #import 20 | 21 | #import 22 | 23 | @class FBSDKAccessToken; 24 | 25 | /*! 26 | @abstract Represents a request to the Facebook Graph API. 27 | 28 | @discussion `FBSDKGraphRequest` encapsulates the components of a request (the 29 | Graph API path, the parameters, error recovery behavior) and should be 30 | used in conjunction with `FBSDKGraphRequestConnection` to issue the request. 31 | 32 | Nearly all Graph APIs require an access token. Unless specified, the 33 | `[FBSDKAccessToken currentAccessToken]` is used. Therefore, most requests 34 | will require login first (see `FBSDKLoginManager` in FBSDKLoginKit.framework). 35 | 36 | A `- start` method is provided for convenience for single requests. 37 | 38 | By default, FBSDKGraphRequest will attempt to recover any errors returned from 39 | Facebook. You can disable this via `disableErrorRecovery:`. 40 | @see FBSDKGraphErrorRecoveryProcessor 41 | */ 42 | @interface FBSDKGraphRequest : NSObject 43 | 44 | /*! 45 | @abstract Initializes a new instance that use use `[FBSDKAccessToken currentAccessToken]`. 46 | @param graphPath the graph path (e.g., @"me"). 47 | @param parameters the optional parameters dictionary. 48 | */ 49 | - (instancetype)initWithGraphPath:(NSString *)graphPath 50 | parameters:(NSDictionary *)parameters; 51 | 52 | /*! 53 | @abstract Initializes a new instance that use use `[FBSDKAccessToken currentAccessToken]`. 54 | @param graphPath the graph path (e.g., @"me"). 55 | @param parameters the optional parameters dictionary. 56 | @param HTTPMethod the optional HTTP method. nil defaults to @"GET". 57 | */ 58 | - (instancetype)initWithGraphPath:(NSString *)graphPath 59 | parameters:(NSDictionary *)parameters 60 | HTTPMethod:(NSString *)HTTPMethod; 61 | 62 | /*! 63 | @abstract Initializes a new instance. 64 | @param graphPath the graph path (e.g., @"me"). 65 | @param parameters the optional parameters dictionary. 66 | @param tokenString the token string to use. Specifying nil will cause no token to be used. 67 | @param version the optional Graph API version (e.g., @"v2.0"). nil defaults to FBSDK_TARGET_PLATFORM_VERSION. 68 | @param HTTPMethod the optional HTTP method (e.g., @"POST"). nil defaults to @"GET". 69 | */ 70 | - (instancetype)initWithGraphPath:(NSString *)graphPath 71 | parameters:(NSDictionary *)parameters 72 | tokenString:(NSString *)tokenString 73 | version:(NSString *)version 74 | HTTPMethod:(NSString *)HTTPMethod 75 | NS_DESIGNATED_INITIALIZER; 76 | 77 | /*! 78 | @abstract The request parameters. 79 | */ 80 | @property (nonatomic, strong, readonly) NSMutableDictionary *parameters; 81 | 82 | /*! 83 | @abstract The access token string used by the request. 84 | */ 85 | @property (nonatomic, copy, readonly) NSString *tokenString; 86 | 87 | /*! 88 | @abstract The Graph API endpoint to use for the request, for example "me". 89 | */ 90 | @property (nonatomic, copy, readonly) NSString *graphPath; 91 | 92 | /*! 93 | @abstract The HTTPMethod to use for the request, for example "GET" or "POST". 94 | */ 95 | @property (nonatomic, copy, readonly) NSString *HTTPMethod; 96 | 97 | /*! 98 | @abstract The Graph API version to use (e.g., "v2.0") 99 | */ 100 | @property (nonatomic, copy, readonly) NSString *version; 101 | 102 | /*! 103 | @abstract If set, disables the automatic error recovery mechanism. 104 | @param disable whether to disable the automatic error recovery mechanism 105 | @discussion By default, non-batched FBSDKGraphRequest instances will automatically try to recover 106 | from errors by constructing a `FBSDKGraphErrorRecoveryProcessor` instance that 107 | re-issues the request on successful recoveries. The re-issued request will call the same 108 | handler as the receiver but may occur with a different `FBSDKGraphRequestConnection` instance. 109 | 110 | This will override [FBSDKSettings setGraphErrorRecoveryDisabled:]. 111 | */ 112 | - (void)setGraphErrorRecoveryDisabled:(BOOL)disable; 113 | 114 | /*! 115 | @abstract Starts a connection to the Graph API. 116 | @param handler The handler block to call when the request completes. 117 | */ 118 | - (FBSDKGraphRequestConnection *)startWithCompletionHandler:(FBSDKGraphRequestHandler)handler; 119 | 120 | @end 121 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libFacebookSDK/FBSDKCoreKit.framework/Headers/FBSDKGraphRequestDataAttachment.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 2 | // 3 | // You are hereby granted a non-exclusive, worldwide, royalty-free license to use, 4 | // copy, modify, and distribute this software in source code or binary form for use 5 | // in connection with the web services and APIs provided by Facebook. 6 | // 7 | // As with any software that integrates with the Facebook platform, your use of 8 | // this software is subject to the Facebook Developer Principles and Policies 9 | // [http://developers.facebook.com/policy/]. This copyright notice shall be 10 | // included in all copies or substantial portions of the software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 14 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 15 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 16 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 17 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | 19 | #import 20 | 21 | /*! 22 | @abstract A container class for data attachments so that additional metadata can be provided about the attachment. 23 | */ 24 | @interface FBSDKGraphRequestDataAttachment : NSObject 25 | 26 | /*! 27 | @abstract Initializes the receiver with the attachment data and metadata. 28 | @param data The attachment data (retained, not copied) 29 | @param filename The filename for the attachment 30 | @param contentType The content type for the attachment 31 | */ 32 | - (instancetype)initWithData:(NSData *)data 33 | filename:(NSString *)filename 34 | contentType:(NSString *)contentType 35 | NS_DESIGNATED_INITIALIZER; 36 | 37 | /*! 38 | @abstract The content type for the attachment. 39 | */ 40 | @property (nonatomic, copy, readonly) NSString *contentType; 41 | 42 | /*! 43 | @abstract The attachment data. 44 | */ 45 | @property (nonatomic, strong, readonly) NSData *data; 46 | 47 | /*! 48 | @abstract The filename for the attachment. 49 | */ 50 | @property (nonatomic, copy, readonly) NSString *filename; 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libFacebookSDK/FBSDKCoreKit.framework/Headers/FBSDKMacros.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 2 | // 3 | // You are hereby granted a non-exclusive, worldwide, royalty-free license to use, 4 | // copy, modify, and distribute this software in source code or binary form for use 5 | // in connection with the web services and APIs provided by Facebook. 6 | // 7 | // As with any software that integrates with the Facebook platform, your use of 8 | // this software is subject to the Facebook Developer Principles and Policies 9 | // [http://developers.facebook.com/policy/]. This copyright notice shall be 10 | // included in all copies or substantial portions of the software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 14 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 15 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 16 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 17 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | 19 | #import 20 | 21 | #ifdef __cplusplus 22 | #define FBSDK_EXTERN extern "C" __attribute__((visibility ("default"))) 23 | #else 24 | #define FBSDK_EXTERN extern __attribute__((visibility ("default"))) 25 | #endif 26 | 27 | #define FBSDK_STATIC_INLINE static inline 28 | 29 | #define FBSDK_NO_DESIGNATED_INITIALIZER() \ 30 | @throw [NSException exceptionWithName:NSInvalidArgumentException \ 31 | reason:[NSString stringWithFormat:@"unrecognized selector sent to instance %p", self] \ 32 | userInfo:nil] 33 | 34 | #define FBSDK_NOT_DESIGNATED_INITIALIZER(DESIGNATED_INITIALIZER) \ 35 | @throw [NSException exceptionWithName:NSInvalidArgumentException \ 36 | reason:[NSString stringWithFormat:@"Please use the designated initializer [%p %@]", \ 37 | self, \ 38 | NSStringFromSelector(@selector(DESIGNATED_INITIALIZER))] \ 39 | userInfo:nil] 40 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libFacebookSDK/FBSDKCoreKit.framework/Headers/FBSDKMutableCopying.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 2 | // 3 | // You are hereby granted a non-exclusive, worldwide, royalty-free license to use, 4 | // copy, modify, and distribute this software in source code or binary form for use 5 | // in connection with the web services and APIs provided by Facebook. 6 | // 7 | // As with any software that integrates with the Facebook platform, your use of 8 | // this software is subject to the Facebook Developer Principles and Policies 9 | // [http://developers.facebook.com/policy/]. This copyright notice shall be 10 | // included in all copies or substantial portions of the software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 14 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 15 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 16 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 17 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | 19 | #import 20 | 21 | #import 22 | 23 | /*! 24 | @abstract Extension protocol for NSMutableCopying that adds the mutableCopy method, which is implemented on NSObject. 25 | @discussion NSObject implicitly conforms to this protocol. 26 | */ 27 | @protocol FBSDKMutableCopying 28 | 29 | /*! 30 | @abstract Implemented by NSObject as a convenience to mutableCopyWithZone:. 31 | @return A mutable copy of the receiver. 32 | */ 33 | - (id)mutableCopy; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libFacebookSDK/FBSDKCoreKit.framework/Headers/FBSDKProfilePictureView.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 2 | // 3 | // You are hereby granted a non-exclusive, worldwide, royalty-free license to use, 4 | // copy, modify, and distribute this software in source code or binary form for use 5 | // in connection with the web services and APIs provided by Facebook. 6 | // 7 | // As with any software that integrates with the Facebook platform, your use of 8 | // this software is subject to the Facebook Developer Principles and Policies 9 | // [http://developers.facebook.com/policy/]. This copyright notice shall be 10 | // included in all copies or substantial portions of the software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 14 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 15 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 16 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 17 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | 19 | #import 20 | 21 | /*! 22 | @typedef FBSDKProfilePictureMode enum 23 | @abstract Defines the aspect ratio mode for the source image of the profile picture. 24 | */ 25 | typedef NS_ENUM(NSUInteger, FBSDKProfilePictureMode) 26 | { 27 | /*! 28 | @abstract A square cropped version of the image will be included in the view. 29 | */ 30 | FBSDKProfilePictureModeSquare, 31 | /*! 32 | @abstract The original picture's aspect ratio will be used for the source image in the view. 33 | */ 34 | FBSDKProfilePictureModeNormal, 35 | }; 36 | 37 | /*! 38 | @abstract A view to display a profile picture. 39 | */ 40 | @interface FBSDKProfilePictureView : UIView 41 | 42 | /*! 43 | @abstract The mode for the receiver to determine the aspect ratio of the source image. 44 | */ 45 | @property (nonatomic, assign) FBSDKProfilePictureMode pictureMode; 46 | 47 | /*! 48 | @abstract The profile ID to show the picture for. 49 | */ 50 | @property (nonatomic, copy) NSString *profileID; 51 | 52 | /*! 53 | @abstract Explicitly marks the receiver as needing to update the image. 54 | @discussion This method is called whenever any properties that affect the source image are modified, but this can also 55 | be used to trigger a manual update of the image if it needs to be re-downloaded. 56 | */ 57 | - (void)setNeedsImageUpdate; 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libFacebookSDK/FBSDKCoreKit.framework/Headers/FBSDKTestUsersManager.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 2 | // 3 | // You are hereby granted a non-exclusive, worldwide, royalty-free license to use, 4 | // copy, modify, and distribute this software in source code or binary form for use 5 | // in connection with the web services and APIs provided by Facebook. 6 | // 7 | // As with any software that integrates with the Facebook platform, your use of 8 | // this software is subject to the Facebook Developer Principles and Policies 9 | // [http://developers.facebook.com/policy/]. This copyright notice shall be 10 | // included in all copies or substantial portions of the software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 14 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 15 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 16 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 17 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | 19 | #import 20 | 21 | @class FBSDKAccessToken; 22 | 23 | /*! 24 | @typedef 25 | 26 | @abstract Callback block for returning an array of FBSDKAccessToken instances (and possibly `NSNull` instances); or an error. 27 | */ 28 | typedef void (^FBSDKTestUsersManagerRetrieveTestAccountTokensHandler)(NSArray *tokens, NSError *error) ; 29 | 30 | /*! 31 | @typedef 32 | 33 | @abstract Callback block for removing a test user. 34 | */ 35 | typedef void (^FBSDKTestUsersManagerRemoveTestAccountHandler)(NSError *error) ; 36 | 37 | 38 | /*! 39 | @class FBSDKTestUsersManager 40 | @abstract Provides methods for managing test accounts for testing Facebook integration. 41 | 42 | @discussion Facebook allows developers to create test accounts for testing their applications' 43 | Facebook integration (see https://developers.facebook.com/docs/test_users/). This class 44 | simplifies use of these accounts for writing tests. It is not designed for use in 45 | production application code. 46 | 47 | This class will make Graph API calls on behalf of your app to manage test accounts and requires 48 | an app id and app secret. You will typically use this class to write unit or integration tests. 49 | Make sure you NEVER include your app secret in your production app. 50 | */ 51 | @interface FBSDKTestUsersManager : NSObject 52 | 53 | /*! 54 | @abstract construct or return the shared instance 55 | @param appID the Facebook app id 56 | @param appSecret the Facebook app secret 57 | */ 58 | + (instancetype)sharedInstanceForAppID:(NSString *)appID appSecret:(NSString *)appSecret; 59 | 60 | /*! 61 | @abstract retrieve FBSDKAccessToken instances for test accounts with the specific permissions. 62 | @param arraysOfPermissions an array of permissions sets, such as @[ [NSSet setWithObject:@"email"], [NSSet setWithObject:@"user_birthday"]] 63 | if you needed two test accounts with email and birthday permissions, respectively. You can pass in empty nested sets 64 | if you need two arbitrary test accounts. For convenience, passing nil is treated as @[ [NSSet set] ] 65 | for fetching a single test user. 66 | @param createIfNotFound if YES, new test accounts are created if no test accounts existed that fit the permissions 67 | requirement 68 | @param handler the callback to invoke which will return an array of `FBAccessTokenData` instances or an `NSError`. 69 | If param `createIfNotFound` is NO, the array may contain `[NSNull null]` instances. 70 | 71 | @discussion If you are requesting test accounts with differing number of permissions, try to order 72 | `arrayOfPermissionsArrays` so that the most number of permissions come first to minimize creation of new 73 | test accounts. 74 | */ 75 | - (void)requestTestAccountTokensWithArraysOfPermissions:(NSArray *)arraysOfPermissions 76 | createIfNotFound:(BOOL)createIfNotFound 77 | completionHandler:(FBSDKTestUsersManagerRetrieveTestAccountTokensHandler)handler; 78 | 79 | /*! 80 | @abstract add a test account with the specified permissions 81 | @param permissions the set of permissions, e.g., [NSSet setWithObjects:@"email", @"user_friends"] 82 | @param handler the callback handler 83 | */ 84 | - (void)addTestAccountWithPermissions:(NSSet *)permissions 85 | completionHandler:(FBSDKTestUsersManagerRetrieveTestAccountTokensHandler)handler; 86 | 87 | /*! 88 | @abstract remove a test account for the given user id 89 | @param userId the user id 90 | @param handler the callback handler 91 | */ 92 | - (void)removeTestAccount:(NSString *)userId completionHandler:(FBSDKTestUsersManagerRemoveTestAccountHandler)handler; 93 | 94 | /*! 95 | @abstract Make two test users friends with each other. 96 | @param first the token of the first user 97 | @param second the token of the second user 98 | @param callback the callback handler 99 | */ 100 | - (void)makeFriendsWithFirst:(FBSDKAccessToken *)first second:(FBSDKAccessToken *)second callback:(void (^)(NSError *))callback; 101 | 102 | @end 103 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libFacebookSDK/FBSDKCoreKit.framework/Headers/FBSDKUtility.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 2 | // 3 | // You are hereby granted a non-exclusive, worldwide, royalty-free license to use, 4 | // copy, modify, and distribute this software in source code or binary form for use 5 | // in connection with the web services and APIs provided by Facebook. 6 | // 7 | // As with any software that integrates with the Facebook platform, your use of 8 | // this software is subject to the Facebook Developer Principles and Policies 9 | // [http://developers.facebook.com/policy/]. This copyright notice shall be 10 | // included in all copies or substantial portions of the software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 14 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 15 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 16 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 17 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | 19 | #import 20 | 21 | /*! 22 | @abstract Class to contain common utility methods. 23 | */ 24 | @interface FBSDKUtility : NSObject 25 | 26 | /*! 27 | @abstract Parses a query string into a dictionary. 28 | @param queryString The query string value. 29 | @return A dictionary with the key/value pairs. 30 | */ 31 | + (NSDictionary *)dictionaryWithQueryString:(NSString *)queryString; 32 | 33 | /*! 34 | @abstract Constructs a query string from a dictionary. 35 | @param dictionary The dictionary with key/value pairs for the query string. 36 | @param errorRef If an error occurs, upon return contains an NSError object that describes the problem. 37 | @result Query string representation of the parameters. 38 | */ 39 | + (NSString *)queryStringWithDictionary:(NSDictionary *)dictionary error:(NSError *__autoreleasing *)errorRef; 40 | 41 | /*! 42 | @abstract Decodes a value from an URL. 43 | @param value The value to decode. 44 | @result The decoded value. 45 | */ 46 | + (NSString *)URLDecode:(NSString *)value; 47 | 48 | /*! 49 | @abstract Encodes a value for an URL. 50 | @param value The value to encode. 51 | @result The encoded value. 52 | */ 53 | + (NSString *)URLEncode:(NSString *)value; 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libFacebookSDK/FBSDKCoreKit.framework/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libFacebookSDK/FBSDKCoreKit.framework/Info.plist -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libFacebookSDK/FBSDKCoreKit.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module FBSDKCoreKit { 2 | umbrella header "FBSDKCoreKit.h" 3 | 4 | export * 5 | module * { export * } 6 | 7 | explicit module FBSDKButton { 8 | header "FBSDKButton.h" 9 | export * 10 | } 11 | 12 | explicit module FBSDKAppLinkResolver { 13 | header "FBSDKAppLinkResolver.h" 14 | export * 15 | } 16 | 17 | explicit module FBSDKGraphErrorRecoveryProcessor { 18 | header "FBSDKGraphErrorRecoveryProcessor.h" 19 | export * 20 | } 21 | 22 | explicit module FBSDKGraphRequestDataAttachment { 23 | header "FBSDKGraphRequestDataAttachment.h" 24 | export * 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libFacebookSDK/FBSDKCoreKit.framework/PrivateHeaders/FBSDKAccessTokenCacheV4.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 2 | // 3 | // You are hereby granted a non-exclusive, worldwide, royalty-free license to use, 4 | // copy, modify, and distribute this software in source code or binary form for use 5 | // in connection with the web services and APIs provided by Facebook. 6 | // 7 | // As with any software that integrates with the Facebook platform, your use of 8 | // this software is subject to the Facebook Developer Principles and Policies 9 | // [http://developers.facebook.com/policy/]. This copyright notice shall be 10 | // included in all copies or substantial portions of the software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 14 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 15 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 16 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 17 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | 19 | #import 20 | 21 | #import "FBSDKAccessToken.h" 22 | #import "FBSDKAccessTokenCaching.h" 23 | 24 | @interface FBSDKAccessTokenCacheV4 : NSObject 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libFacebookSDK/FBSDKCoreKit.framework/PrivateHeaders/FBSDKBridgeAPICrypto.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 2 | // 3 | // You are hereby granted a non-exclusive, worldwide, royalty-free license to use, 4 | // copy, modify, and distribute this software in source code or binary form for use 5 | // in connection with the web services and APIs provided by Facebook. 6 | // 7 | // As with any software that integrates with the Facebook platform, your use of 8 | // this software is subject to the Facebook Developer Principles and Policies 9 | // [http://developers.facebook.com/policy/]. This copyright notice shall be 10 | // included in all copies or substantial portions of the software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 14 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 15 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 16 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 17 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | 19 | #import 20 | 21 | #import "FBSDKBridgeAPIRequest.h" 22 | 23 | @interface FBSDKBridgeAPICrypto : NSObject 24 | 25 | + (void)addCipherKeyToQueryParameters:(NSMutableDictionary *)queryParameters; 26 | + (NSDictionary *)decryptResponseForRequest:(FBSDKBridgeAPIRequest *)request 27 | queryParameters:(NSDictionary *)queryParameters 28 | error:(NSError *__autoreleasing *)errorRef; 29 | + (void)reset; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libFacebookSDK/FBSDKCoreKit.framework/PrivateHeaders/FBSDKBridgeAPIProtocol.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 2 | // 3 | // You are hereby granted a non-exclusive, worldwide, royalty-free license to use, 4 | // copy, modify, and distribute this software in source code or binary form for use 5 | // in connection with the web services and APIs provided by Facebook. 6 | // 7 | // As with any software that integrates with the Facebook platform, your use of 8 | // this software is subject to the Facebook Developer Principles and Policies 9 | // [http://developers.facebook.com/policy/]. This copyright notice shall be 10 | // included in all copies or substantial portions of the software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 14 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 15 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 16 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 17 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | 19 | #import 20 | 21 | #import 22 | 23 | #import "FBSDKBridgeAPIProtocolType.h" 24 | 25 | @class FBSDKBridgeAPIRequest; 26 | 27 | FBSDK_EXTERN NSString *const FBSDKBridgeAPIAppIDKey; 28 | FBSDK_EXTERN NSString *const FBSDKBridgeAPISchemeSuffixKey; 29 | FBSDK_EXTERN NSString *const FBSDKBridgeAPIVersionKey; 30 | 31 | @protocol FBSDKBridgeAPIProtocol 32 | 33 | @property (nonatomic, assign, readonly, getter=isEnabled) BOOL enabled; 34 | 35 | - (NSURL *)requestURLWithActionID:(NSString *)actionID 36 | scheme:(NSString *)scheme 37 | methodName:(NSString *)methodName 38 | methodVersion:(NSString *)methodVersion 39 | parameters:(NSDictionary *)parameters 40 | error:(NSError *__autoreleasing *)errorRef; 41 | - (NSDictionary *)responseParametersForActionID:(NSString *)actionID 42 | queryParameters:(NSDictionary *)queryParameters 43 | cancelled:(BOOL *)cancelledRef 44 | error:(NSError *__autoreleasing *)errorRef; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libFacebookSDK/FBSDKCoreKit.framework/PrivateHeaders/FBSDKBridgeAPIProtocolNativeV1.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 2 | // 3 | // You are hereby granted a non-exclusive, worldwide, royalty-free license to use, 4 | // copy, modify, and distribute this software in source code or binary form for use 5 | // in connection with the web services and APIs provided by Facebook. 6 | // 7 | // As with any software that integrates with the Facebook platform, your use of 8 | // this software is subject to the Facebook Developer Principles and Policies 9 | // [http://developers.facebook.com/policy/]. This copyright notice shall be 10 | // included in all copies or substantial portions of the software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 14 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 15 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 16 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 17 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | 19 | #import 20 | 21 | #import 22 | 23 | #import "FBSDKBridgeAPIProtocol.h" 24 | 25 | typedef struct 26 | { 27 | __unsafe_unretained NSString *bridgeArgs; 28 | __unsafe_unretained NSString *methodArgs; 29 | __unsafe_unretained NSString *methodVersion; 30 | } FBSDKBridgeAPIProtocolNativeV1OutputKeysStruct; 31 | FBSDK_EXTERN const FBSDKBridgeAPIProtocolNativeV1OutputKeysStruct FBSDKBridgeAPIProtocolNativeV1OutputKeys; 32 | 33 | typedef struct 34 | { 35 | __unsafe_unretained NSString *actionID; 36 | __unsafe_unretained NSString *appIcon; 37 | __unsafe_unretained NSString *appName; 38 | __unsafe_unretained NSString *sdkVersion; 39 | } FBSDKBridgeAPIProtocolNativeV1BridgeParameterOutputKeysStruct; 40 | FBSDK_EXTERN const FBSDKBridgeAPIProtocolNativeV1BridgeParameterOutputKeysStruct FBSDKBridgeAPIProtocolNativeV1BridgeParameterOutputKeys; 41 | 42 | typedef struct 43 | { 44 | __unsafe_unretained NSString *bridgeArgs; 45 | __unsafe_unretained NSString *methodResults; 46 | } FBSDKBridgeAPIProtocolNativeV1InputKeysStruct; 47 | FBSDK_EXTERN const FBSDKBridgeAPIProtocolNativeV1InputKeysStruct FBSDKBridgeAPIProtocolNativeV1InputKeys; 48 | 49 | typedef struct 50 | { 51 | __unsafe_unretained NSString *actionID; 52 | __unsafe_unretained NSString *error; 53 | } FBSDKBridgeAPIProtocolNativeV1BridgeParameterInputKeysStruct; 54 | FBSDK_EXTERN const FBSDKBridgeAPIProtocolNativeV1BridgeParameterInputKeysStruct FBSDKBridgeAPIProtocolNativeV1BridgeParameterInputKeys; 55 | 56 | @interface FBSDKBridgeAPIProtocolNativeV1 : NSObject 57 | 58 | - (instancetype)initWithAppScheme:(NSString *)appScheme; 59 | - (instancetype)initWithAppScheme:(NSString *)appScheme 60 | pasteboard:(UIPasteboard *)pasteboard 61 | dataLengthThreshold:(NSUInteger)dataLengthThreshold 62 | includeAppIcon:(BOOL)includeAppIcon 63 | NS_DESIGNATED_INITIALIZER; 64 | 65 | @property (nonatomic, copy, readonly) NSString *appScheme; 66 | @property (nonatomic, assign, readonly) NSUInteger dataLengthThreshold; 67 | @property (nonatomic, assign, readonly) BOOL includeAppIcon; 68 | @property (nonatomic, strong, readonly) UIPasteboard *pasteboard; 69 | 70 | @end 71 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libFacebookSDK/FBSDKCoreKit.framework/PrivateHeaders/FBSDKBridgeAPIProtocolWebV1.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 2 | // 3 | // You are hereby granted a non-exclusive, worldwide, royalty-free license to use, 4 | // copy, modify, and distribute this software in source code or binary form for use 5 | // in connection with the web services and APIs provided by Facebook. 6 | // 7 | // As with any software that integrates with the Facebook platform, your use of 8 | // this software is subject to the Facebook Developer Principles and Policies 9 | // [http://developers.facebook.com/policy/]. This copyright notice shall be 10 | // included in all copies or substantial portions of the software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 14 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 15 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 16 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 17 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | 19 | #import 20 | 21 | #import "FBSDKBridgeAPIProtocol.h" 22 | 23 | @interface FBSDKBridgeAPIProtocolWebV1 : NSObject 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libFacebookSDK/FBSDKCoreKit.framework/PrivateHeaders/FBSDKError.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 2 | // 3 | // You are hereby granted a non-exclusive, worldwide, royalty-free license to use, 4 | // copy, modify, and distribute this software in source code or binary form for use 5 | // in connection with the web services and APIs provided by Facebook. 6 | // 7 | // As with any software that integrates with the Facebook platform, your use of 8 | // this software is subject to the Facebook Developer Principles and Policies 9 | // [http://developers.facebook.com/policy/]. This copyright notice shall be 10 | // included in all copies or substantial portions of the software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 14 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 15 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 16 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 17 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | 19 | #import 20 | 21 | @interface FBSDKError : NSObject 22 | 23 | + (NSString *)errorDomain; 24 | 25 | + (BOOL)errorIsNetworkError:(NSError *)error; 26 | 27 | + (NSError *)errorWithCode:(NSInteger)code message:(NSString *)message; 28 | + (NSError *)errorWithCode:(NSInteger)code message:(NSString *)message underlyingError:(NSError *)underlyingError; 29 | + (NSError *)errorWithCode:(NSInteger)code 30 | userInfo:(NSDictionary *)userInfo 31 | message:(NSString *)message 32 | underlyingError:(NSError *)underlyingError; 33 | 34 | + (NSError *)invalidArgumentErrorWithName:(NSString *)name value:(id)value message:(NSString *)message; 35 | + (NSError *)invalidArgumentErrorWithName:(NSString *)name 36 | value:(id)value 37 | message:(NSString *)message 38 | underlyingError:(NSError *)underlyingError; 39 | + (NSError *)invalidCollectionErrorWithName:(NSString *)name 40 | collection:(id)collection 41 | item:(id)item 42 | message:(NSString *)message; 43 | + (NSError *)invalidCollectionErrorWithName:(NSString *)name 44 | collection:(id)collection 45 | item:(id)item 46 | message:(NSString *)message 47 | underlyingError:(NSError *)underlyingError; 48 | 49 | + (NSError *)requiredArgumentErrorWithName:(NSString *)name message:(NSString *)message; 50 | + (NSError *)requiredArgumentErrorWithName:(NSString *)name 51 | message:(NSString *)message 52 | underlyingError:(NSError *)underlyingError; 53 | 54 | + (NSError *)unknownErrorWithMessage:(NSString *)message; 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libFacebookSDK/FBSDKCoreKit.framework/PrivateHeaders/FBSDKGraphRequestBody.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 2 | // 3 | // You are hereby granted a non-exclusive, worldwide, royalty-free license to use, 4 | // copy, modify, and distribute this software in source code or binary form for use 5 | // in connection with the web services and APIs provided by Facebook. 6 | // 7 | // As with any software that integrates with the Facebook platform, your use of 8 | // this software is subject to the Facebook Developer Principles and Policies 9 | // [http://developers.facebook.com/policy/]. This copyright notice shall be 10 | // included in all copies or substantial portions of the software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 14 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 15 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 16 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 17 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | 19 | #import 20 | #import 21 | 22 | @class FBSDKGraphRequestDataAttachment; 23 | @class FBSDKLogger; 24 | 25 | @interface FBSDKGraphRequestBody : NSObject 26 | 27 | @property (nonatomic, retain, readonly) NSData *data; 28 | 29 | - (void)appendWithKey:(NSString *)key 30 | formValue:(NSString *)value 31 | logger:(FBSDKLogger *)logger; 32 | 33 | - (void)appendWithKey:(NSString *)key 34 | imageValue:(UIImage *)image 35 | logger:(FBSDKLogger *)logger; 36 | 37 | - (void)appendWithKey:(NSString *)key 38 | dataValue:(NSData *)data 39 | logger:(FBSDKLogger *)logger; 40 | 41 | - (void)appendWithKey:(NSString *)key 42 | dataAttachmentValue:(FBSDKGraphRequestDataAttachment *)dataAttachment 43 | logger:(FBSDKLogger *)logger; 44 | 45 | + (NSString *)mimeContentType; 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libFacebookSDK/FBSDKCoreKit.framework/PrivateHeaders/FBSDKGraphRequestMetadata.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 2 | // 3 | // You are hereby granted a non-exclusive, worldwide, royalty-free license to use, 4 | // copy, modify, and distribute this software in source code or binary form for use 5 | // in connection with the web services and APIs provided by Facebook. 6 | // 7 | // As with any software that integrates with the Facebook platform, your use of 8 | // this software is subject to the Facebook Developer Principles and Policies 9 | // [http://developers.facebook.com/policy/]. This copyright notice shall be 10 | // included in all copies or substantial portions of the software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 14 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 15 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 16 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 17 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | 19 | #import 20 | 21 | #import 22 | 23 | // Internal only class to facilitate FBRequest processing, specifically 24 | // associating FBRequest and FBRequestHandler instances and necessary 25 | // data for retry processing. 26 | @interface FBSDKGraphRequestMetadata : NSObject 27 | 28 | @property (nonatomic, retain) FBSDKGraphRequest *request; 29 | @property (nonatomic, copy) FBSDKGraphRequestHandler completionHandler; 30 | @property (nonatomic, copy) NSDictionary *batchParameters; 31 | 32 | - (instancetype)initWithRequest:(FBSDKGraphRequest *)request 33 | completionHandler:(FBSDKGraphRequestHandler)handler 34 | batchParameters:(NSDictionary *)batchParameters 35 | NS_DESIGNATED_INITIALIZER; 36 | 37 | - (void)invokeCompletionHandlerForConnection:(FBSDKGraphRequestConnection *)connection 38 | withResults:(id)results 39 | error:(NSError *)error; 40 | @end 41 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libFacebookSDK/FBSDKCoreKit.framework/PrivateHeaders/FBSDKURLConnection.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 2 | // 3 | // You are hereby granted a non-exclusive, worldwide, royalty-free license to use, 4 | // copy, modify, and distribute this software in source code or binary form for use 5 | // in connection with the web services and APIs provided by Facebook. 6 | // 7 | // As with any software that integrates with the Facebook platform, your use of 8 | // this software is subject to the Facebook Developer Principles and Policies 9 | // [http://developers.facebook.com/policy/]. This copyright notice shall be 10 | // included in all copies or substantial portions of the software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 14 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 15 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 16 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 17 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | 19 | #import 20 | 21 | @class FBSDKURLConnection; 22 | 23 | typedef void (^FBSDKURLConnectionHandler)(FBSDKURLConnection *connection, 24 | NSError *error, 25 | NSURLResponse *response, 26 | NSData *responseData); 27 | 28 | @protocol FBSDKURLConnectionDelegate 29 | 30 | @optional 31 | 32 | - (void)facebookURLConnection:(FBSDKURLConnection *)connection 33 | didSendBodyData:(NSInteger)bytesWritten 34 | totalBytesWritten:(NSInteger)totalBytesWritten 35 | totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite; 36 | 37 | @end 38 | 39 | @interface FBSDKURLConnection : NSObject 40 | 41 | - (FBSDKURLConnection *)initWithRequest:(NSURLRequest *)request 42 | completionHandler:(FBSDKURLConnectionHandler)handler 43 | NS_DESIGNATED_INITIALIZER; 44 | 45 | @property (nonatomic, assign) id delegate; 46 | 47 | - (void)cancel; 48 | - (void)start; 49 | - (void)setDelegateQueue:(NSOperationQueue *)queue; 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libFacebookSDK/FBSDKCoreKit.framework/PrivateHeaders/FBSDKWebDialogView.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 2 | // 3 | // You are hereby granted a non-exclusive, worldwide, royalty-free license to use, 4 | // copy, modify, and distribute this software in source code or binary form for use 5 | // in connection with the web services and APIs provided by Facebook. 6 | // 7 | // As with any software that integrates with the Facebook platform, your use of 8 | // this software is subject to the Facebook Developer Principles and Policies 9 | // [http://developers.facebook.com/policy/]. This copyright notice shall be 10 | // included in all copies or substantial portions of the software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 14 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 15 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 16 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 17 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | 19 | #import 20 | 21 | @protocol FBSDKWebDialogViewDelegate; 22 | 23 | @interface FBSDKWebDialogView : UIView 24 | 25 | @property (nonatomic, assign) id delegate; 26 | 27 | - (void)loadURL:(NSURL *)URL; 28 | - (void)stopLoading; 29 | 30 | @end 31 | 32 | @protocol FBSDKWebDialogViewDelegate 33 | 34 | - (void)webDialogView:(FBSDKWebDialogView *)webDialogView didCompleteWithResults:(NSDictionary *)results; 35 | - (void)webDialogView:(FBSDKWebDialogView *)webDialogView didFailWithError:(NSError *)error; 36 | - (void)webDialogViewDidCancel:(FBSDKWebDialogView *)webDialogView; 37 | - (void)webDialogViewDidFinishLoad:(FBSDKWebDialogView *)webDialogView; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libFacebookSDK/FBSDKLoginKit.framework/FBSDKLoginKit: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libFacebookSDK/FBSDKLoginKit.framework/FBSDKLoginKit -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libFacebookSDK/FBSDKLoginKit.framework/Headers/FBSDKLoginButton.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 2 | // 3 | // You are hereby granted a non-exclusive, worldwide, royalty-free license to use, 4 | // copy, modify, and distribute this software in source code or binary form for use 5 | // in connection with the web services and APIs provided by Facebook. 6 | // 7 | // As with any software that integrates with the Facebook platform, your use of 8 | // this software is subject to the Facebook Developer Principles and Policies 9 | // [http://developers.facebook.com/policy/]. This copyright notice shall be 10 | // included in all copies or substantial portions of the software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 14 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 15 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 16 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 17 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | 19 | #import 20 | 21 | #import 22 | 23 | #import 24 | 25 | #import "FBSDKTooltipView.h" 26 | 27 | @protocol FBSDKLoginButtonDelegate; 28 | 29 | /*! 30 | @typedef NS_ENUM(NSUInteger, FBSDKLoginButtonTooltipBehavior) 31 | @abstract Indicates the desired login tooltip behavior. 32 | */ 33 | typedef NS_ENUM(NSUInteger, FBSDKLoginButtonTooltipBehavior) 34 | { 35 | /*! The default behavior. The tooltip will only be displayed if 36 | the app is eligible (determined by possible server round trip) */ 37 | FBSDKLoginButtonTooltipBehaviorAutomatic = 0, 38 | /*! Force display of the tooltip (typically for UI testing) */ 39 | FBSDKLoginButtonTooltipBehaviorForceDisplay = 1, 40 | /*! Force disable. In this case you can still exert more refined 41 | control by manually constructing a `FBSDKLoginTooltipView` instance. */ 42 | FBSDKLoginButtonTooltipBehaviorDisable = 2 43 | }; 44 | 45 | /*! 46 | @abstract A button to simplify login. 47 | @discussion `FBSDKLoginButton` works with `[FBSDKAccessToken currentAccessToken]` to 48 | determine what to display. The delegate is only notified when a login flow is initiated 49 | by a tapping the button and your app delegate is connected to `FBSDKApplicationDelegate` 50 | (in the same way when using `FBSDKLoginManager`). 51 | 52 | `FBSDKLoginButton` has a fixed height, but you may change the width. `initWithFrame:CGRectZero` 53 | will size the button to its minimum frame. 54 | */ 55 | @interface FBSDKLoginButton : FBSDKButton 56 | 57 | /*! 58 | @abstract The default audience to use, if publish permissions are requested at login time. 59 | */ 60 | @property (assign, nonatomic) FBSDKDefaultAudience defaultAudience; 61 | /*! 62 | @abstract Gets or sets the delegate. 63 | */ 64 | @property (weak, nonatomic) IBOutlet id delegate; 65 | /*! 66 | @abstract Gets or sets the login behavior to use 67 | */ 68 | @property (assign, nonatomic) FBSDKLoginBehavior loginBehavior; 69 | /*! 70 | @abstract The publish permissions to request. 71 | 72 | @discussion Use `defaultAudience` to specify the default audience to publish to. 73 | Note this is converted to NSSet and is only 74 | an NSArray for the convenience of literal syntax. 75 | */ 76 | @property (copy, nonatomic) NSArray *publishPermissions; 77 | /*! 78 | @abstract The read permissions to request. 79 | 80 | @discussion Note, that if read permissions are specified, then publish permissions should not be specified. This is converted to NSSet and is only 81 | an NSArray for the convenience of literal syntax. 82 | */ 83 | @property (copy, nonatomic) NSArray *readPermissions; 84 | /*! 85 | @abstract Gets or sets the desired tooltip behavior. 86 | */ 87 | @property (assign, nonatomic) FBSDKLoginButtonTooltipBehavior tooltipBehavior; 88 | /*! 89 | @abstract Gets or sets the desired tooltip color style. 90 | */ 91 | @property (assign, nonatomic) FBSDKTooltipColorStyle tooltipColorStyle; 92 | 93 | @end 94 | 95 | /*! 96 | @protocol 97 | @abstract A delegate for `FBSDKLoginButton` 98 | */ 99 | @protocol FBSDKLoginButtonDelegate 100 | 101 | /*! 102 | @abstract Sent to the delegate when the button was used to login. 103 | @param loginButton the sender 104 | @param result The results of the login 105 | @param error The error (if any) from the login 106 | */ 107 | - (void) loginButton:(FBSDKLoginButton *)loginButton 108 | didCompleteWithResult:(FBSDKLoginManagerLoginResult *)result 109 | error:(NSError *)error; 110 | 111 | /*! 112 | @abstract Sent to the delegate when the button was used to logout. 113 | @param loginButton The button that was clicked. 114 | */ 115 | - (void)loginButtonDidLogOut:(FBSDKLoginButton *)loginButton; 116 | 117 | @end 118 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libFacebookSDK/FBSDKLoginKit.framework/Headers/FBSDKLoginConstants.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 2 | // 3 | // You are hereby granted a non-exclusive, worldwide, royalty-free license to use, 4 | // copy, modify, and distribute this software in source code or binary form for use 5 | // in connection with the web services and APIs provided by Facebook. 6 | // 7 | // As with any software that integrates with the Facebook platform, your use of 8 | // this software is subject to the Facebook Developer Principles and Policies 9 | // [http://developers.facebook.com/policy/]. This copyright notice shall be 10 | // included in all copies or substantial portions of the software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 14 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 15 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 16 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 17 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | 19 | #import 20 | 21 | #import 22 | 23 | /*! 24 | @abstract The error domain for all errors from FBSDKLoginKit 25 | @discussion Error codes from the SDK in the range 300-399 are reserved for this domain. 26 | */ 27 | FBSDK_EXTERN NSString *const FBSDKLoginErrorDomain; 28 | 29 | /*! 30 | @typedef NS_ENUM(NSInteger, FBSDKLoginErrorCode) 31 | @abstract Error codes for FBSDKLoginErrorDomain. 32 | */ 33 | typedef NS_ENUM(NSInteger, FBSDKLoginErrorCode) 34 | { 35 | /*! 36 | @abstract Reserved. 37 | */ 38 | FBSDKLoginReservedErrorCode = 300, 39 | /*! 40 | @abstract The error code for unknown errors. 41 | */ 42 | FBSDKLoginUnknownErrorCode, 43 | 44 | /*! 45 | @abstract The user's password has changed and must log in again 46 | */ 47 | FBSDKLoginPasswordChangedErrorCode, 48 | /*! 49 | @abstract The user must log in to their account on www.facebook.com to restore access 50 | */ 51 | FBSDKLoginUserCheckpointedErrorCode, 52 | /*! 53 | @abstract Indicates a failure to request new permissions because the user has changed. 54 | */ 55 | FBSDKLoginUserMismatchErrorCode, 56 | /*! 57 | @abstract The user must confirm their account with Facebook before logging in 58 | */ 59 | FBSDKLoginUnconfirmedUserErrorCode, 60 | 61 | /*! 62 | @abstract The Accounts framework failed without returning an error, indicating the 63 | app's slider in the iOS Facebook Settings (device Settings -> Facebook -> App Name) has 64 | been disabled. 65 | */ 66 | FBSDKLoginSystemAccountAppDisabledErrorCode, 67 | /*! 68 | @abstract An error occurred related to Facebook system Account store 69 | */ 70 | FBSDKLoginSystemAccountUnavailableErrorCode, 71 | }; 72 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libFacebookSDK/FBSDKLoginKit.framework/Headers/FBSDKLoginKit.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 2 | // 3 | // You are hereby granted a non-exclusive, worldwide, royalty-free license to use, 4 | // copy, modify, and distribute this software in source code or binary form for use 5 | // in connection with the web services and APIs provided by Facebook. 6 | // 7 | // As with any software that integrates with the Facebook platform, your use of 8 | // this software is subject to the Facebook Developer Principles and Policies 9 | // [http://developers.facebook.com/policy/]. This copyright notice shall be 10 | // included in all copies or substantial portions of the software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 14 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 15 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 16 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 17 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | 19 | #import 20 | 21 | #import 22 | #import 23 | #import 24 | #import 25 | #import 26 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libFacebookSDK/FBSDKLoginKit.framework/Headers/FBSDKLoginManagerLoginResult.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 2 | // 3 | // You are hereby granted a non-exclusive, worldwide, royalty-free license to use, 4 | // copy, modify, and distribute this software in source code or binary form for use 5 | // in connection with the web services and APIs provided by Facebook. 6 | // 7 | // As with any software that integrates with the Facebook platform, your use of 8 | // this software is subject to the Facebook Developer Principles and Policies 9 | // [http://developers.facebook.com/policy/]. This copyright notice shall be 10 | // included in all copies or substantial portions of the software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 14 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 15 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 16 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 17 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | 19 | #import 20 | 21 | @class FBSDKAccessToken; 22 | 23 | /*! 24 | @abstract Describes the result of a login attempt. 25 | */ 26 | @interface FBSDKLoginManagerLoginResult : NSObject 27 | 28 | /*! 29 | @abstract the access token. 30 | */ 31 | @property (copy, nonatomic) FBSDKAccessToken *token; 32 | 33 | /*! 34 | @abstract whether the login was cancelled by the user. 35 | */ 36 | @property (readonly, nonatomic) BOOL isCancelled; 37 | 38 | /*! 39 | @abstract the set of permissions granted by the user in the associated request. 40 | @discussion inspect the token's permissions set for a complete list. 41 | */ 42 | @property (copy, nonatomic) NSSet *grantedPermissions; 43 | 44 | /*! 45 | @abstract the set of permissions declined by the user in the associated request. 46 | @discussion inspect the token's permissions set for a complete list. 47 | */ 48 | @property (copy, nonatomic) NSSet *declinedPermissions; 49 | 50 | /*! 51 | @abstract Initializes a new instance. 52 | @param token the access token 53 | @param isCancelled whether the login was cancelled by the user 54 | @param grantedPermissions the set of granted permissions 55 | @param declinedPermissions the set of declined permissions 56 | */ 57 | - (instancetype)initWithToken:(FBSDKAccessToken *)token 58 | isCancelled:(BOOL)isCancelled 59 | grantedPermissions:(NSSet *)grantedPermissions 60 | declinedPermissions:(NSSet *)declinedPermissions 61 | NS_DESIGNATED_INITIALIZER; 62 | @end 63 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libFacebookSDK/FBSDKLoginKit.framework/Headers/FBSDKLoginTooltipView.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 2 | // 3 | // You are hereby granted a non-exclusive, worldwide, royalty-free license to use, 4 | // copy, modify, and distribute this software in source code or binary form for use 5 | // in connection with the web services and APIs provided by Facebook. 6 | // 7 | // As with any software that integrates with the Facebook platform, your use of 8 | // this software is subject to the Facebook Developer Principles and Policies 9 | // [http://developers.facebook.com/policy/]. This copyright notice shall be 10 | // included in all copies or substantial portions of the software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 14 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 15 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 16 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 17 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | 19 | #import 20 | 21 | #import 22 | 23 | @protocol FBSDKLoginTooltipViewDelegate; 24 | 25 | /*! 26 | @class FBSDKLoginTooltipView 27 | 28 | @abstract Represents a tooltip to be displayed next to a Facebook login button 29 | to highlight features for new users. 30 | 31 | @discussion The `FBSDKLoginButton` may display this view automatically. If you do 32 | not use the `FBSDKLoginButton`, you can manually call one of the `present*` methods 33 | as appropriate and customize behavior via `FBSDKLoginTooltipViewDelegate` delegate. 34 | 35 | By default, the `FBSDKLoginTooltipView` is not added to the superview until it is 36 | determined the app has migrated to the new login experience. You can override this 37 | (e.g., to test the UI layout) by implementing the delegate or setting `forceDisplay` to YES. 38 | 39 | */ 40 | @interface FBSDKLoginTooltipView : FBSDKTooltipView 41 | 42 | /*! @abstract the delegate */ 43 | @property (nonatomic, assign) id delegate; 44 | 45 | /*! @abstract if set to YES, the view will always be displayed and the delegate's 46 | `loginTooltipView:shouldAppear:` will NOT be called. */ 47 | @property (nonatomic, assign) BOOL forceDisplay; 48 | 49 | @end 50 | 51 | /*! 52 | @protocol 53 | 54 | @abstract 55 | The `FBSDKLoginTooltipViewDelegate` protocol defines the methods used to receive event 56 | notifications from `FBSDKLoginTooltipView` objects. 57 | */ 58 | @protocol FBSDKLoginTooltipViewDelegate 59 | 60 | @optional 61 | 62 | /*! 63 | @abstract 64 | Asks the delegate if the tooltip view should appear 65 | 66 | @param view The tooltip view. 67 | @param appIsEligible The value fetched from the server identifying if the app 68 | is eligible for the new login experience. 69 | 70 | @discussion Use this method to customize display behavior. 71 | */ 72 | - (BOOL)loginTooltipView:(FBSDKLoginTooltipView *)view shouldAppear:(BOOL)appIsEligible; 73 | 74 | /*! 75 | @abstract 76 | Tells the delegate the tooltip view will appear, specifically after it's been 77 | added to the super view but before the fade in animation. 78 | 79 | @param view The tooltip view. 80 | */ 81 | - (void)loginTooltipViewWillAppear:(FBSDKLoginTooltipView *)view; 82 | 83 | /*! 84 | @abstract 85 | Tells the delegate the tooltip view will not appear (i.e., was not 86 | added to the super view). 87 | 88 | @param view The tooltip view. 89 | */ 90 | - (void)loginTooltipViewWillNotAppear:(FBSDKLoginTooltipView *)view; 91 | 92 | 93 | @end 94 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libFacebookSDK/FBSDKLoginKit.framework/Headers/FBSDKTooltipView.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 2 | // 3 | // You are hereby granted a non-exclusive, worldwide, royalty-free license to use, 4 | // copy, modify, and distribute this software in source code or binary form for use 5 | // in connection with the web services and APIs provided by Facebook. 6 | // 7 | // As with any software that integrates with the Facebook platform, your use of 8 | // this software is subject to the Facebook Developer Principles and Policies 9 | // [http://developers.facebook.com/policy/]. This copyright notice shall be 10 | // included in all copies or substantial portions of the software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 14 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 15 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 16 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 17 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | 19 | #import 20 | 21 | /*! 22 | @typedef FBSDKTooltipViewArrowDirection enum 23 | 24 | @abstract 25 | Passed on construction to determine arrow orientation. 26 | */ 27 | typedef NS_ENUM(NSUInteger, FBSDKTooltipViewArrowDirection) 28 | { 29 | /*! View is located above given point, arrow is pointing down. */ 30 | FBSDKTooltipViewArrowDirectionDown = 0, 31 | /*! View is located below given point, arrow is pointing up. */ 32 | FBSDKTooltipViewArrowDirectionUp = 1, 33 | }; 34 | 35 | /*! 36 | @typedef FBSDKTooltipColorStyle enum 37 | 38 | @abstract 39 | Passed on construction to determine color styling. 40 | */ 41 | typedef NS_ENUM(NSUInteger, FBSDKTooltipColorStyle) 42 | { 43 | /*! Light blue background, white text, faded blue close button. */ 44 | FBSDKTooltipColorStyleFriendlyBlue = 0, 45 | /*! Dark gray background, white text, light gray close button. */ 46 | FBSDKTooltipColorStyleNeutralGray = 1, 47 | }; 48 | 49 | /*! 50 | @class FBSDKTooltipView 51 | 52 | @abstract 53 | Tooltip bubble with text in it used to display tips for UI elements, 54 | with a pointed arrow (to refer to the UI element). 55 | 56 | @discussion 57 | The tooltip fades in and will automatically fade out. See `displayDuration`. 58 | */ 59 | @interface FBSDKTooltipView : UIView 60 | 61 | /*! 62 | @abstract Gets or sets the amount of time in seconds the tooltip should be displayed. 63 | 64 | @discussion Set this to zero to make the display permanent until explicitly dismissed. 65 | Defaults to six seconds. 66 | */ 67 | @property (nonatomic, assign) CFTimeInterval displayDuration; 68 | 69 | /*! 70 | @abstract Gets or sets the color style after initialization. 71 | 72 | @discussion Defaults to value passed to -initWithTagline:message:colorStyle:. 73 | */ 74 | @property (nonatomic, assign) FBSDKTooltipColorStyle colorStyle; 75 | 76 | /*! 77 | @abstract Gets or sets the message. 78 | */ 79 | @property (nonatomic, copy) NSString *message; 80 | 81 | /*! 82 | @abstract Gets or sets the optional phrase that comprises the first part of the label (and is highlighted differently). 83 | */ 84 | @property (nonatomic, copy) NSString *tagline; 85 | 86 | /*! 87 | @abstract 88 | Designated initializer. 89 | 90 | @param tagline First part of the label, that will be highlighted with different color. Can be nil. 91 | 92 | @param message Main message to display. 93 | 94 | @param colorStyle Color style to use for tooltip. 95 | 96 | @discussion 97 | If you need to show a tooltip for login, consider using the `FBSDKLoginTooltipView` view. 98 | 99 | @see FBSDKLoginTooltipView 100 | */ 101 | - (instancetype)initWithTagline:(NSString *)tagline message:(NSString *)message colorStyle:(FBSDKTooltipColorStyle)colorStyle; 102 | 103 | /*! 104 | @abstract 105 | Show tooltip at the top or at the bottom of given view. 106 | Tooltip will be added to anchorView.window.rootViewController.view 107 | 108 | @param anchorView view to show at, must be already added to window view hierarchy, in order to decide 109 | where tooltip will be shown. (If there's not enough space at the top of the anchorView in window bounds - 110 | tooltip will be shown at the bottom of it) 111 | 112 | @discussion 113 | Use this method to present the tooltip with automatic positioning or 114 | use -presentInView:withArrowPosition:direction: for manual positioning 115 | If anchorView is nil or has no window - this method does nothing. 116 | */ 117 | - (void)presentFromView:(UIView *)anchorView; 118 | 119 | /*! 120 | @abstract 121 | Adds tooltip to given view, with given position and arrow direction. 122 | 123 | @param view View to be used as superview. 124 | 125 | @param arrowPosition Point in view's cordinates, where arrow will be pointing 126 | 127 | @param arrowDirection whenever arrow should be pointing up (message bubble is below the arrow) or 128 | down (message bubble is above the arrow). 129 | */ 130 | - (void)presentInView:(UIView *)view withArrowPosition:(CGPoint)arrowPosition direction:(FBSDKTooltipViewArrowDirection)arrowDirection; 131 | 132 | /*! 133 | @abstract 134 | Remove tooltip manually. 135 | 136 | @discussion 137 | Calling this method isn't necessary - tooltip will dismiss itself automatically after the `displayDuration`. 138 | */ 139 | - (void)dismiss; 140 | 141 | @end 142 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libFacebookSDK/FBSDKLoginKit.framework/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libFacebookSDK/FBSDKLoginKit.framework/Info.plist -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libFacebookSDK/FBSDKLoginKit.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module FBSDKLoginKit { 2 | umbrella header "FBSDKLoginKit.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libTencentSDK/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libTencentSDK/.DS_Store -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libTencentSDK/TencentOpenAPI.framework/Headers/QQApiInterface.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// \file QQApiInterface.h 3 | /// \brief QQApi接口简化封装 4 | /// 5 | /// Created by Tencent on 12-5-15. 6 | /// Copyright (c) 2012年 Tencent. All rights reserved. 7 | /// 8 | 9 | #import 10 | #import "QQApiInterfaceObject.h" 11 | 12 | /** 13 | \brief 处理来至QQ的请求及响应的回调协议 14 | */ 15 | @protocol QQApiInterfaceDelegate 16 | 17 | /** 18 | 处理来至QQ的请求 19 | */ 20 | - (void)onReq:(QQBaseReq *)req; 21 | 22 | /** 23 | 处理来至QQ的响应 24 | */ 25 | - (void)onResp:(QQBaseResp *)resp; 26 | 27 | /** 28 | 处理QQ在线状态的回调 29 | */ 30 | - (void)isOnlineResponse:(NSDictionary *)response; 31 | 32 | @end 33 | 34 | /** 35 | \brief 对QQApi的简单封装类 36 | */ 37 | @interface QQApiInterface : NSObject 38 | 39 | /** 40 | 处理由手Q唤起的跳转请求 41 | \param url 待处理的url跳转请求 42 | \param delegate 第三方应用用于处理来至QQ请求及响应的委托对象 43 | \return 跳转请求处理结果,YES表示成功处理,NO表示不支持的请求协议或处理失败 44 | */ 45 | + (BOOL)handleOpenURL:(NSURL *)url delegate:(id)delegate; 46 | 47 | /** 48 | 向手Q发起分享请求 49 | \param req 分享内容的请求 50 | \return 请求发送结果码 51 | */ 52 | + (QQApiSendResultCode)sendReq:(QQBaseReq *)req; 53 | 54 | /** 55 | 向手Q QZone结合版发起分享请求 56 | \note H5分享只支持单张网络图片的传递 57 | \param req 分享内容的请求 58 | \return 请求发送结果码 59 | */ 60 | + (QQApiSendResultCode)SendReqToQZone:(QQBaseReq *)req; 61 | 62 | /** 63 | 向手Q 群部落发起分享请求 64 | \note H5分享只支持单张网络图片的传递 65 | \param req 分享内容的请求 66 | \return 请求发送结果码 67 | */ 68 | + (QQApiSendResultCode)SendReqToQQGroupTribe:(QQBaseReq *)req; 69 | 70 | /** 71 | 向手Q发送应答消息 72 | \param resp 应答消息 73 | \return 应答发送结果码 74 | */ 75 | + (QQApiSendResultCode)sendResp:(QQBaseResp *)resp; 76 | 77 | /** 78 | 检测是否已安装QQ 79 | \return 如果QQ已安装则返回YES,否则返回NO 80 | */ 81 | + (BOOL)isQQInstalled; 82 | 83 | /** 84 | 批量检测QQ号码是否在线 85 | */ 86 | + (void)getQQUinOnlineStatues:(NSArray *)QQUins delegate:(id)delegate; 87 | 88 | /** 89 | 检测QQ是否支持API调用 90 | \return 如果当前安装QQ版本支持API调用则返回YES,否则返回NO 91 | */ 92 | + (BOOL)isQQSupportApi; 93 | 94 | /** 95 | 启动QQ 96 | \return 成功返回YES,否则返回NO 97 | */ 98 | + (BOOL)openQQ; 99 | 100 | /** 101 | 获取QQ下载地址 102 | 103 | 如果App通过QQApiInterface#isQQInstalledQQApiInterface#isQQSupportApi检测发现QQ没安装或当前版本QQ不支持API调用,可引导用户通过打开此链接下载最新版QQ。 104 | \return iPhoneQQ下载地址 105 | */ 106 | + (NSString *)getQQInstallUrl; 107 | 108 | @end 109 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libTencentSDK/TencentOpenAPI.framework/Resources/ios_open_sdk_3.1.3.1_iphone: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libTencentSDK/TencentOpenAPI.framework/Resources/ios_open_sdk_3.1.3.1_iphone -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libTencentSDK/TencentOpenAPI.framework/TencentOpenAPI: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libTencentSDK/TencentOpenAPI.framework/TencentOpenAPI -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeChatSDK/README.txt: -------------------------------------------------------------------------------- 1 | 重要! 2 | 3 | SDK1.7.5 4 | 1. 提高稳定性 5 | 2. 加快registerApp接口启动速度 6 | 7 | SDK1.7.4 8 | 1. 更新支持iOS启用 ATS(App Transport Security) 9 | 2. 需要在工程中链接CFNetwork.framework 10 | 3. 在工程配置中的”Other Linker Flags”中加入”-Objc -all_load” 11 | 12 | SDK1.7.3 13 | 1. 增强稳定性,适配iOS10 14 | 2. 修复小于32K的jpg格式缩略图设置失败的问题 15 | 16 | SDK1.7.2 17 | 1. 修复因CTTeleponyNetworkInfo引起的崩溃问题 18 | 19 | SDK1.7.1 20 | 1. 支持兼容ipv6(提升稳定性) 21 | 2. xCode Version 7.3.1 (7D1014) 编译 22 | 23 | SDK1.7 24 | 1. 支持兼容ipv6 25 | 2. 修复若干问题增强稳定性 26 | 27 | SDK1.6.3 28 | 1. xCode7.2 构建的sdk包。 29 | 2. 请使用xCode7.2进行编译。 30 | 3. 需要在Build Phases中Link Security.framework 31 | 4. 修复若干小问题。 32 | 33 | SDK1.6.2 34 | 1、xCode7.1 构建的sdk包 35 | 2、请使用xCode7.1进行编译 36 | 37 | SDK1.6.1 38 | 1、修复armv7s下,bitcode可能编译不过 39 | 2、解决warning 40 | 41 | SDK1.6 42 | 1、iOS 9系统策略更新,限制了http协议的访问,此外应用需要在“Info.plist”中将要使用的URL Schemes列为白名单,才可正常检查其他应用是否安装。 43 | 受此影响,当你的应用在iOS 9中需要使用微信SDK的相关能力(分享、收藏、支付、登录等)时,需要在“Info.plist”里增加如下代码: 44 | LSApplicationQueriesSchemes 45 | 46 | weixin 47 | 48 | NSAppTransportSecurity 49 | 50 | NSAllowsArbitraryLoads 51 | 52 | 53 | 2、开发者需要在工程中链接上 CoreTelephony.framework 54 | 3、解决bitcode编译不过问题 55 | 56 | SDK1.5 57 | 1、废弃safeSendReq:接口,使用sendReq:即可。 58 | 2、新增+(BOOL) sendAuthReq:(SendAuthReq*) req viewController : (UIViewController*) viewController delegate:(id) delegate; 59 | 支持未安装微信情况下Auth,具体见WXApi.h接口描述 60 | 3、微信开放平台新增了微信模块用户统计功能,便于开发者统计微信功能模块的用户使用和活跃情况。开发者需要在工程中链接上:SystemConfiguration.framework,libz.dylib,libsqlite3.0.dylib。 61 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeChatSDK/WXApi.h: -------------------------------------------------------------------------------- 1 | // 2 | // WXApi.h 3 | // 所有Api接口 4 | // 5 | // Created by Wechat on 12-2-28. 6 | // Copyright (c) 2012年 Tencent. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "WXApiObject.h" 11 | 12 | 13 | #pragma mark - WXApiDelegate 14 | /*! @brief 接收并处理来自微信终端程序的事件消息 15 | * 16 | * 接收并处理来自微信终端程序的事件消息,期间微信界面会切换到第三方应用程序。 17 | * WXApiDelegate 会在handleOpenURL:delegate:中使用并触发。 18 | */ 19 | @protocol WXApiDelegate 20 | @optional 21 | 22 | /*! @brief 收到一个来自微信的请求,第三方应用程序处理完后调用sendResp向微信发送结果 23 | * 24 | * 收到一个来自微信的请求,异步处理完成后必须调用sendResp发送处理结果给微信。 25 | * 可能收到的请求有GetMessageFromWXReq、ShowMessageFromWXReq等。 26 | * @param req 具体请求内容,是自动释放的 27 | */ 28 | -(void) onReq:(BaseReq*)req; 29 | 30 | 31 | 32 | /*! @brief 发送一个sendReq后,收到微信的回应 33 | * 34 | * 收到一个来自微信的处理结果。调用一次sendReq后会收到onResp。 35 | * 可能收到的处理结果有SendMessageToWXResp、SendAuthResp等。 36 | * @param resp具体的回应内容,是自动释放的 37 | */ 38 | -(void) onResp:(BaseResp*)resp; 39 | 40 | @end 41 | 42 | 43 | 44 | #pragma mark - WXApi 45 | 46 | /*! @brief 微信Api接口函数类 47 | * 48 | * 该类封装了微信终端SDK的所有接口 49 | */ 50 | @interface WXApi : NSObject 51 | 52 | /*! @brief WXApi的成员函数,向微信终端程序注册第三方应用。 53 | * 54 | * 需要在每次启动第三方应用程序时调用。第一次调用后,会在微信的可用应用列表中出现。 55 | * iOS7及以上系统需要调起一次微信才会出现在微信的可用应用列表中。 56 | * @attention 请保证在主线程中调用此函数 57 | * @param appid 微信开发者ID 58 | * @param typeFlag 应用支持打开的文件类型 59 | * @return 成功返回YES,失败返回NO。 60 | */ 61 | +(BOOL) registerApp:(NSString *)appid; 62 | 63 | 64 | /*! @brief WXApi的成员函数,向微信终端程序注册第三方应用。 65 | * 66 | * 需要在每次启动第三方应用程序时调用。第一次调用后,会在微信的可用应用列表中出现。 67 | * @see registerApp 68 | * @param appid 微信开发者ID 69 | * @param appdesc 应用附加信息,长度不超过1024字节 70 | * @return 成功返回YES,失败返回NO。 71 | */ 72 | +(BOOL) registerApp:(NSString *)appid withDescription:(NSString *)appdesc; 73 | 74 | 75 | /*! @brief WXApi的成员函数,向微信终端程序注册应用支持打开的文件类型。 76 | * 77 | * 需要在每次启动第三方应用程序时调用。调用后并第一次成功分享数据到微信后,会在微信的可用应用列表中出现。 78 | * @see registerApp 79 | * @param typeFlag 应用支持打开的数据类型, enAppSupportContentFlag枚举类型 “|” 操作后结果 80 | */ 81 | +(void) registerAppSupportContentFlag:(UInt64)typeFlag; 82 | 83 | 84 | 85 | /*! @brief 处理微信通过URL启动App时传递的数据 86 | * 87 | * 需要在 application:openURL:sourceApplication:annotation:或者application:handleOpenURL中调用。 88 | * @param url 微信启动第三方应用时传递过来的URL 89 | * @param delegate WXApiDelegate对象,用来接收微信触发的消息。 90 | * @return 成功返回YES,失败返回NO。 91 | */ 92 | +(BOOL) handleOpenURL:(NSURL *) url delegate:(id) delegate; 93 | 94 | 95 | 96 | /*! @brief 检查微信是否已被用户安装 97 | * 98 | * @return 微信已安装返回YES,未安装返回NO。 99 | */ 100 | +(BOOL) isWXAppInstalled; 101 | 102 | 103 | 104 | /*! @brief 判断当前微信的版本是否支持OpenApi 105 | * 106 | * @return 支持返回YES,不支持返回NO。 107 | */ 108 | +(BOOL) isWXAppSupportApi; 109 | 110 | 111 | 112 | /*! @brief 获取微信的itunes安装地址 113 | * 114 | * @return 微信的安装地址字符串。 115 | */ 116 | +(NSString *) getWXAppInstallUrl; 117 | 118 | 119 | 120 | /*! @brief 获取当前微信SDK的版本号 121 | * 122 | * @return 返回当前微信SDK的版本号 123 | */ 124 | +(NSString *) getApiVersion; 125 | 126 | 127 | 128 | /*! @brief 打开微信 129 | * 130 | * @return 成功返回YES,失败返回NO。 131 | */ 132 | +(BOOL) openWXApp; 133 | 134 | 135 | 136 | /*! @brief 发送请求到微信,等待微信返回onResp 137 | * 138 | * 函数调用后,会切换到微信的界面。第三方应用程序等待微信返回onResp。微信在异步处理完成后一定会调用onResp。支持以下类型 139 | * SendAuthReq、SendMessageToWXReq、PayReq等。 140 | * @param req 具体的发送请求,在调用函数后,请自己释放。 141 | * @return 成功返回YES,失败返回NO。 142 | */ 143 | +(BOOL) sendReq:(BaseReq*)req; 144 | 145 | /*! @brief 发送Auth请求到微信,支持用户没安装微信,等待微信返回onResp 146 | * 147 | * 函数调用后,会切换到微信的界面。第三方应用程序等待微信返回onResp。微信在异步处理完成后一定会调用onResp。支持SendAuthReq类型。 148 | * @param req 具体的发送请求,在调用函数后,请自己释放。 149 | * @param viewController 当前界面对象。 150 | * @param delegate WXApiDelegate对象,用来接收微信触发的消息。 151 | * @return 成功返回YES,失败返回NO。 152 | */ 153 | +(BOOL) sendAuthReq:(SendAuthReq*)req viewController:(UIViewController*)viewController delegate:(id)delegate; 154 | 155 | 156 | /*! @brief 收到微信onReq的请求,发送对应的应答给微信,并切换到微信界面 157 | * 158 | * 函数调用后,会切换到微信的界面。第三方应用程序收到微信onReq的请求,异步处理该请求,完成后必须调用该函数。可能发送的相应有 159 | * GetMessageFromWXResp、ShowMessageFromWXResp等。 160 | * @param resp 具体的应答内容,调用函数后,请自己释放 161 | * @return 成功返回YES,失败返回NO。 162 | */ 163 | +(BOOL) sendResp:(BaseResp*)resp; 164 | 165 | 166 | @end 167 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeChatSDK/WechatAuthSDK.h: -------------------------------------------------------------------------------- 1 | // 2 | // WechatAuthSDK.h 3 | // WechatAuthSDK 4 | // 5 | // Created by 李凯 on 13-11-29. 6 | // Copyright (c) 2013年 Tencent. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | enum AuthErrCode { 13 | WechatAuth_Err_Ok = 0, //Auth成功 14 | WechatAuth_Err_NormalErr = -1, //普通错误 15 | WechatAuth_Err_NetworkErr = -2, //网络错误 16 | WechatAuth_Err_GetQrcodeFailed = -3, //获取二维码失败 17 | WechatAuth_Err_Cancel = -4, //用户取消授权 18 | WechatAuth_Err_Timeout = -5, //超时 19 | }; 20 | 21 | @protocol WechatAuthAPIDelegate 22 | @optional 23 | 24 | - (void)onAuthGotQrcode:(UIImage *)image; //得到二维码 25 | - (void)onQrcodeScanned; //二维码被扫描 26 | - (void)onAuthFinish:(int)errCode AuthCode:(NSString *)authCode; //成功登录 27 | 28 | @end 29 | 30 | @interface WechatAuthSDK : NSObject{ 31 | NSString *_sdkVersion; 32 | __weak id _delegate; 33 | } 34 | 35 | @property(nonatomic, weak) id delegate; 36 | @property(nonatomic, readonly) NSString *sdkVersion; //authSDK版本号 37 | 38 | /*! @brief 发送登录请求,等待WechatAuthAPIDelegate回调 39 | * 40 | * @param appId 微信开发者ID 41 | * @param nonceStr 一个随机的尽量不重复的字符串,用来使得每次的signature不同 42 | * @param timeStamp 时间戳 43 | * @param scope 应用授权作用域,拥有多个作用域用逗号(,)分隔 44 | * @param signature 签名 45 | * @param schemeData 会在扫码后拼在scheme后 46 | * @return 成功返回YES,失败返回NO 47 | 注:该实现只保证同时只有一个Auth在运行,Auth未完成或未Stop再次调用Auth接口时会返回NO。 48 | */ 49 | 50 | - (BOOL)Auth:(NSString *)appId 51 | nonceStr:(NSString *)nonceStr 52 | timeStamp:(NSString*)timeStamp 53 | scope:(NSString *)scope 54 | signature:(NSString *)signature 55 | schemeData:(NSString *)schemeData; 56 | 57 | 58 | /*! @brief 暂停登录请求 59 | * 60 | * @return 成功返回YES,失败返回NO。 61 | */ 62 | - (BOOL)StopAuth; 63 | 64 | @end 65 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeChatSDK/libWeChatSDK.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeChatSDK/libWeChatSDK.a -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WBHttpRequest+WeiboShare.h: -------------------------------------------------------------------------------- 1 | // 2 | // WBHttpRequest+WeiboShare.h 3 | // WeiboSDK 4 | // 5 | // Created by DannionQiu on 14/10/31. 6 | // Copyright (c) 2014年 SINA iOS Team. All rights reserved. 7 | // 8 | 9 | #import "WBHttpRequest.h" 10 | 11 | @class WBImageObject; 12 | 13 | @interface WBHttpRequest (WeiboShare) 14 | 15 | /*! 16 | @method 17 | 18 | @abstract 19 | 获得当前授权用户的微博id列表。 20 | 21 | @param userID 当前授权用户的uid 22 | 23 | @param accessToken 当前授权用户的accessToken 24 | 25 | @param otherProperties 一个NSDictionary字典,承载任意想额外添加到请求中的参数。 26 | 27 | @param queue 指定发送请求的NSOperationQueue,如果这个参数为nil,则请求会发送在MainQueue( [NSOperationQueue mainQueue] )中。 28 | 29 | @param handler 完成请求后会回调handler,处理完成请求后的逻辑。 30 | */ 31 | + (WBHttpRequest *)requestForStatusIDsFromCurrentUser:(NSString*)userID 32 | withAccessToken:(NSString*)accessToken 33 | andOtherProperties:(NSDictionary*)otherProperties 34 | queue:(NSOperationQueue*)queue 35 | withCompletionHandler:(WBRequestHandler)handler; 36 | 37 | /*! 38 | @method 39 | 40 | @abstract 41 | 转发微博。转发微博id所对应的微博。 42 | 43 | @param statusID 微博id,微博的唯一标识符。 44 | 45 | @param text 添加的转发文本,内容不超过140个汉字,不填则默认为“转发微博”。 46 | 47 | @param accessToken 当前授权用户的accessToken 48 | 49 | @param otherProperties 一个NSDictionary字典,承载任意想额外添加到请求中的参数。 50 | 51 | @param queue 指定发送请求的NSOperationQueue,如果这个参数为nil,则请求会发送在MainQueue( [NSOperationQueue mainQueue] )中。 52 | 53 | @param handler 完成请求后会回调handler,处理完成请求后的逻辑。 54 | */ 55 | + (WBHttpRequest *)requestForRepostAStatus:(NSString*)statusID 56 | repostText:(NSString*)text 57 | withAccessToken:(NSString*)accessToken 58 | andOtherProperties:(NSDictionary*)otherProperties 59 | queue:(NSOperationQueue*)queue 60 | withCompletionHandler:(WBRequestHandler)handler; 61 | 62 | /*! 63 | @method 64 | 65 | @abstract 66 | 发表一个微博(无图或者带一张图片的微博)。 67 | 68 | @param statusText 要发布的微博文本内容,内容不超过140个汉字。 69 | 70 | @param imageObject 要上传的图片,仅支持JPEG、GIF、PNG格式,图片大小小于5M。这个参数可为nil。由于只能传一张图片,若imageObject和url都有值,请看@caution。 71 | 72 | @param url 图片的URL地址,必须以http开头。这个参数可为nil,由于只能传一张图片,若imageObject和url都有值,请看@caution。 73 | 74 | @param accessToken 当前授权用户的accessToken 75 | 76 | @param otherProperties 一个NSDictionary字典,承载任意想额外添加到请求中的参数。 77 | 78 | @param queue 指定发送请求的NSOperationQueue,如果这个参数为nil,则请求会发送在MainQueue( [NSOperationQueue mainQueue] )中。 79 | 80 | @param handler 完成请求后会回调handler,处理完成请求后的逻辑。 81 | 82 | @caution 注意,如果参数imageObject和url都有值,则发布带有imageObject所对应的图片,忽略url所对应的图片。 83 | */ 84 | + (WBHttpRequest *)requestForShareAStatus:(NSString*)statusText 85 | contatinsAPicture:(WBImageObject*)imageObject 86 | orPictureUrl:(NSString*)url 87 | withAccessToken:(NSString*)accessToken 88 | andOtherProperties:(NSDictionary*)otherProperties 89 | queue:(NSOperationQueue*)queue 90 | withCompletionHandler:(WBRequestHandler)handler; 91 | 92 | 93 | @end 94 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WBHttpRequest+WeiboToken.h: -------------------------------------------------------------------------------- 1 | // 2 | // WBHttpRequest+WeiboToken.h 3 | // WeiboSDK 4 | // 5 | // Created by DannionQiu on 14/11/6. 6 | // Copyright (c) 2014年 SINA iOS Team. All rights reserved. 7 | // 8 | 9 | #import "WBHttpRequest.h" 10 | 11 | @interface WBHttpRequest (WeiboToken) 12 | /*! 13 | @method 14 | 15 | @abstract 16 | 使用RefreshToken去换取新的身份凭证AccessToken. 17 | 18 | @discussion 19 | 在SSO授权登录后,服务器会下发有效期为7天的refreshToken以及有效期为1天的AccessToken。 20 | 当有效期为1天的AccessToken过期时,可以调用该接口带着refreshToken信息区换取新的AccessToken。 21 | @param refreshToken refreshToken 22 | 23 | @param queue 指定发送请求的NSOperationQueue,如果这个参数为nil,则请求会发送在MainQueue( [NSOperationQueue mainQueue] )中。 24 | 25 | @param handler 完成请求后会回调handler,处理完成请求后的逻辑。 26 | */ 27 | + (WBHttpRequest *)requestForRenewAccessTokenWithRefreshToken:(NSString*)refreshToken 28 | queue:(NSOperationQueue*)queue 29 | withCompletionHandler:(WBRequestHandler)handler; 30 | @end 31 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WBHttpRequest.h: -------------------------------------------------------------------------------- 1 | // 2 | // WBHttpRequest.h 3 | // WeiboSDK 4 | // 5 | // Created by DannionQiu on 14-9-18. 6 | // Copyright (c) 2014年 SINA iOS Team. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | #pragma mark - WBHttpRequest and WBHttpRequestDelegate 13 | @class WBHttpRequest; 14 | 15 | /** 16 | 接收并处理来自微博sdk对于网络请求接口的调用响应 以及openAPI 17 | 如inviteFriend、logOutWithToken的请求 18 | */ 19 | @protocol WBHttpRequestDelegate 20 | 21 | /** 22 | 收到一个来自微博Http请求的响应 23 | 24 | @param response 具体的响应对象 25 | */ 26 | @optional 27 | - (void)request:(WBHttpRequest *)request didReceiveResponse:(NSURLResponse *)response; 28 | 29 | /** 30 | 收到一个来自微博Http请求失败的响应 31 | 32 | @param error 错误信息 33 | */ 34 | @optional 35 | - (void)request:(WBHttpRequest *)request didFailWithError:(NSError *)error; 36 | 37 | /** 38 | 收到一个来自微博Http请求的网络返回 39 | 40 | @param result 请求返回结果 41 | */ 42 | @optional 43 | - (void)request:(WBHttpRequest *)request didFinishLoadingWithResult:(NSString *)result; 44 | 45 | /** 46 | 收到一个来自微博Http请求的网络返回 47 | 48 | @param data 请求返回结果 49 | */ 50 | @optional 51 | - (void)request:(WBHttpRequest *)request didFinishLoadingWithDataResult:(NSData *)data; 52 | 53 | /** 54 | 收到快速SSO授权的重定向 55 | 56 | @param URI 57 | */ 58 | @optional 59 | - (void)request:(WBHttpRequest *)request didReciveRedirectResponseWithURI:(NSURL *)redirectUrl; 60 | 61 | @end 62 | 63 | 64 | /** 65 | 微博封装Http请求的消息结构 66 | 67 | */ 68 | @interface WBHttpRequest : NSObject 69 | { 70 | NSURLConnection *connection; 71 | NSMutableData *responseData; 72 | } 73 | 74 | /** 75 | 用户自定义请求地址URL 76 | */ 77 | @property (nonatomic, strong) NSString *url; 78 | 79 | /** 80 | 用户自定义请求方式 81 | 82 | 支持"GET" "POST" 83 | */ 84 | @property (nonatomic, strong) NSString *httpMethod; 85 | 86 | /** 87 | 用户自定义请求参数字典 88 | */ 89 | @property (nonatomic, strong) NSDictionary *params; 90 | 91 | /** 92 | WBHttpRequestDelegate对象,用于接收微博SDK对于发起的接口请求的请求的响应 93 | */ 94 | @property (nonatomic, weak) id delegate; 95 | 96 | /** 97 | 用户自定义TAG 98 | 99 | 用于区分回调Request 100 | */ 101 | @property (nonatomic, strong) NSString* tag; 102 | 103 | /** 104 | 统一HTTP请求接口 105 | 调用此接口后,将发送一个HTTP网络请求 106 | @param url 请求url地址 107 | @param httpMethod 支持"GET" "POST" 108 | @param params 向接口传递的参数结构 109 | @param delegate WBHttpRequestDelegate对象,用于接收微博SDK对于发起的接口请求的请求的响应 110 | @param tag 用户自定义TAG,将通过回调WBHttpRequest实例的tag属性返回 111 | */ 112 | + (WBHttpRequest *)requestWithURL:(NSString *)url 113 | httpMethod:(NSString *)httpMethod 114 | params:(NSDictionary *)params 115 | delegate:(id)delegate 116 | withTag:(NSString *)tag; 117 | 118 | /** 119 | 统一微博Open API HTTP请求接口 120 | 调用此接口后,将发送一个HTTP网络请求(用于访问微博open api) 121 | @param accessToken 应用获取到的accessToken,用于身份验证 122 | @param url 请求url地址 123 | @param httpMethod 支持"GET" "POST" 124 | @param params 向接口传递的参数结构 125 | @param delegate WBHttpRequestDelegate对象,用于接收微博SDK对于发起的接口请求的请求的响应 126 | @param tag 用户自定义TAG,将通过回调WBHttpRequest实例的tag属性返回 127 | */ 128 | + (WBHttpRequest *)requestWithAccessToken:(NSString *)accessToken 129 | url:(NSString *)url 130 | httpMethod:(NSString *)httpMethod 131 | params:(NSDictionary *)params 132 | delegate:(id)delegate 133 | withTag:(NSString *)tag; 134 | 135 | 136 | 137 | /** 138 | 取消网络请求接口 139 | 调用此接口后,将取消当前网络请求,建议同时[WBHttpRequest setDelegate:nil]; 140 | 注意:该方法只对使用delegate的request方法有效。无法取消任何使用block的request的网络请求接口。 141 | */ 142 | - (void)disconnect; 143 | 144 | #pragma mark - block extension 145 | 146 | typedef void (^WBRequestHandler)(WBHttpRequest *httpRequest, 147 | id result, 148 | NSError *error); 149 | 150 | /** 151 | 统一微博Open API HTTP请求接口 152 | 调用此接口后,将发送一个HTTP网络请求(用于访问微博open api) 153 | @param url 请求url地址 154 | @param httpMethod 支持"GET" "POST" 155 | @param params 向接口传递的参数结构 156 | @param queue 发起请求的NSOperationQueue对象,如queue为nil,则在主线程([NSOperationQueue mainQueue])发起请求。 157 | @param handler 接口请求返回调用的block方法 158 | */ 159 | + (WBHttpRequest *)requestWithURL:(NSString *)url 160 | httpMethod:(NSString *)httpMethod 161 | params:(NSDictionary *)params 162 | queue:(NSOperationQueue*)queue 163 | withCompletionHandler:(WBRequestHandler)handler; 164 | 165 | 166 | /** 167 | 统一HTTP请求接口 168 | 调用此接口后,将发送一个HTTP网络请求 169 | @param url 请求url地址 170 | @param httpMethod 支持"GET" "POST" 171 | @param params 向接口传递的参数结构 172 | @param queue 发起请求的NSOperationQueue对象,如queue为nil,则在主线程([NSOperationQueue mainQueue])发起请求。 173 | @param handler 接口请求返回调用的block方法 174 | */ 175 | + (WBHttpRequest *)requestWithAccessToken:(NSString *)accessToken 176 | url:(NSString *)url 177 | httpMethod:(NSString *)httpMethod 178 | params:(NSDictionary *)params 179 | queue:(NSOperationQueue*)queue 180 | withCompletionHandler:(WBRequestHandler)handler; 181 | 182 | @end 183 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WBSDKBasicButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // WBSDKBasicButton.h 3 | // WeiboSDK 4 | // 5 | // Created by DannionQiu on 14/10/24. 6 | // Copyright (c) 2014年 SINA iOS Team. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class WBSDKBasicButton; 12 | typedef void (^WBSDKButtonHandler)(WBSDKBasicButton *button, 13 | BOOL isSuccess, 14 | NSDictionary *resultDict); 15 | 16 | @interface WBSDKBasicButton : UIButton 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WBSDKCommentButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // WBSDKCommentButton.h 3 | // WeiboSDK 4 | // 5 | // Created by DannionQiu on 14/10/26. 6 | // Copyright (c) 2014年 SINA iOS Team. All rights reserved. 7 | // 8 | 9 | #import "WBSDKBasicButton.h" 10 | 11 | @interface WBSDKCommentButton : WBSDKBasicButton 12 | 13 | /** 14 | 初始化一个社会化评论按钮 15 | @param frame 按钮的frame值 16 | @param accessToken 用户授权后获取的Token 17 | @param keyWord 社会化评论的热点词 18 | @param urlString 社会化评论链接,可传空 19 | @param category 领域ID, 此参数为必选参数。 20 | @param handler 回调函数,当用户点击按钮,进行完与社会化评论组件相关的交互之后,回调的函数。 21 | */ 22 | - (id)initWithFrame:(CGRect)frame 23 | accessToken:(NSString*)accessToken 24 | keyword:(NSString*)keyWord 25 | urlString:(NSString*)urlString 26 | category:(NSString*)category 27 | completionHandler:(WBSDKButtonHandler)handler; 28 | 29 | @property (nonatomic, strong)NSString* keyWord; 30 | @property (nonatomic, strong)NSString* accessToken; 31 | @property (nonatomic, strong)NSString* urlString; 32 | @property (nonatomic, strong)NSString* category; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WBSDKRelationshipButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // WBSDKRelationshipButton.h 3 | // WeiboSDK 4 | // 5 | // Created by DannionQiu on 14/10/26. 6 | // Copyright (c) 2014年 SINA iOS Team. All rights reserved. 7 | // 8 | 9 | #import "WBSDKBasicButton.h" 10 | 11 | enum 12 | { 13 | WBSDKRelationshipButtonStateFollow, 14 | WBSDKRelationshipButtonStateUnfollow 15 | }; 16 | typedef NSUInteger WBSDKRelationshipButtonState; 17 | 18 | 19 | 20 | @interface WBSDKRelationshipButton : WBSDKBasicButton 21 | 22 | /** 23 | 初始化一个关注组件按钮 24 | @param frame 按钮的frame值 25 | @param accessToken 用户授权后获取的Token 26 | @param currentUserID 当前用户的uid值 27 | @param followerUserID 希望当前用户加关注的用户uid值 28 | @param handler 回调函数,当用户点击按钮,进行完关注组件相关的交互之后,回调的函数。 29 | */ 30 | - (id)initWithFrame:(CGRect)frame 31 | accessToken:(NSString*)accessToken 32 | currentUser:(NSString*)currentUserID 33 | followUser:(NSString*)followerUserID 34 | completionHandler:(WBSDKButtonHandler)handler; 35 | 36 | @property (nonatomic, strong)NSString* accessToken; 37 | @property (nonatomic, strong)NSString* currentUserID; 38 | @property (nonatomic, strong)NSString* followUserID; 39 | 40 | 41 | @property (nonatomic, assign)WBSDKRelationshipButtonState currentRelationShip; 42 | 43 | 44 | /** 45 | 获取最新的关注状态 46 | 该方法会调用OpenApi,获取当前用户与目标用户之间的关注状态,并将按钮的状态改变为正确的状态。 47 | */ 48 | - (void)checkCurrentRelationship; 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK+Statistics.h: -------------------------------------------------------------------------------- 1 | // 2 | // WeiboSDK+Statistics.h 3 | // WeiboSDK 4 | // 5 | // Created by DannionQiu on 15/4/13. 6 | // Copyright (c) 2015年 SINA iOS Team. All rights reserved. 7 | // 8 | 9 | #import "WeiboSDK.h" 10 | 11 | @interface WeiboSDK(Statistics) 12 | 13 | /** 设置是否开启统计模式, 默认为NO. 14 | @param value 为YES, SDK会开启统计功能,记录日志,并在合适的实际传上服务器。 15 | @return void. 16 | */ 17 | + (void)setStatisticsEnabled:(BOOL)value; 18 | 19 | #pragma mark - Optional Configs Setting 20 | /** 设置是否打印SDK的log信息, 默认NO(不打印log). 21 | @param value 设置为YES, WeiboSDK 会输出log信息可供调试参考. 除非特殊需要,否则发布产品时需改回NO. 22 | @return void. 23 | */ 24 | + (void)setStatisticsLogEnabled:(BOOL)value; 25 | 26 | /** 设置版本信息. 27 | @param version 版本号,为nil或@""时, 默认为Build号(CFBundleVersion) 28 | @return void. 29 | */ 30 | + (void)setVersion:(NSString*)version; 31 | 32 | /** 设置渠道信息. 33 | @param channelID 渠道名称, 为nil或@""时, 默认为@"AppStore"渠道 34 | @return void. 35 | */ 36 | + (void)setChannelID:(NSString*)channelID; 37 | 38 | /** 设定日志上传的发送间隔 39 | @param frequecy 单位为秒,最小30秒,最大8*60*60秒(8小时)。默认为180秒(3分钟) 40 | @return void. 41 | */ 42 | + (void)setUploadFrequecy:(NSTimeInterval)frequecy; 43 | 44 | #pragma mark - Statistics Api 45 | /** 自动页面时长统计, 开始记录某个页面展示时长. 46 | 使用方法:必须配对调用beginLogPageView:和endLogPageView:两个函数来完成自动统计,若只调用某一个函数不会生成有效数据。 47 | 在该页面展示时调用beginLogPageView:,当退出该页面时调用endLogPageView: 48 | @param pageName 统计的页面名称. 49 | @return void. 50 | */ 51 | + (void)beginLogPageView:(NSString *)pageName; 52 | 53 | /** 自动页面时长统计, 结束记录某个页面展示时长. 54 | 使用方法:必须配对调用beginLogPageView:和endLogPageView:两个函数来完成自动统计,若只调用某一个函数不会生成有效数据。 55 | 在该页面展示时调用beginLogPageView:,当退出该页面时调用endLogPageView: 56 | @param pageName 统计的页面名称. 57 | @return void. 58 | */ 59 | + (void)endLogPageView:(NSString *)pageName; 60 | 61 | 62 | /** 自动事件时长统计, 开始记录某个事示时长. 63 | 使用方法:调用event:函数来完成自动统计。 64 | @param eventID 统计的事件标识符. 65 | @warning eventID不能使用空格和特殊字符,且长度不能超过255个字符(否则将截取前255个字符) 66 | */ 67 | + (void)event:(NSString *)eventID; 68 | 69 | /** 自动事件时长统计, 开始记录某个事示时长. 70 | 使用方法:调用event:函数来完成自动统计。 71 | @param eventID 统计的事件标识符. 72 | @param pageName 事件发生时所在页面. 73 | @param userInfo 事件相关信息. 74 | @return void. 75 | 76 | @warning 每个event的userInfo不能超过10个 77 | eventID、pageName、userInfo中key和value都不能使用空格和特殊字符,且长度不能超过255个字符(否则将截取前255个字符) 78 | */ 79 | + (void)event:(NSString *)eventID onPageView:(NSString*)pageName withUserInfo:(NSDictionary*)userInfo; 80 | 81 | /** 强制日志上传 82 | 调用后,若距离上次成功上传日志时间不小于30秒,立刻上传日志。 83 | */ 84 | + (void)forceUploadRecords; 85 | 86 | 87 | 88 | 89 | @end 90 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/alert_error_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/alert_error_icon@2x.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/alert_success_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/alert_success_icon@2x.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/close.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/close@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/close@2x.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/common_button_big_blue@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/common_button_big_blue@2x.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/common_button_big_blue_disable@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/common_button_big_blue_disable@2x.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/common_button_big_blue_highlighted@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/common_button_big_blue_highlighted@2x.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/common_button_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/common_button_white.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/common_button_white@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/common_button_white@2x.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/common_button_white_highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/common_button_white_highlighted.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/common_button_white_highlighted@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/common_button_white_highlighted@2x.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/common_icon_arrow@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/common_icon_arrow@2x.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/compose_keyboardbutton_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/compose_keyboardbutton_background.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/compose_keyboardbutton_background@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/compose_keyboardbutton_background@2x.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/compose_toolbar_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/compose_toolbar_background.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/compose_toolbar_background@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/compose_toolbar_background@2x.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/empty_failed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/empty_failed.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/empty_failed@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/empty_failed@2x.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/login_background@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/login_background@2x.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/login_country_background@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/login_country_background@2x.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/login_country_background_highlighted@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/login_country_background_highlighted@2x.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/navigationbar_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/navigationbar_background.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/navigationbar_background@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/navigationbar_background@2x.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/navigationbar_background_os7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/navigationbar_background_os7.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/navigationbar_background_os7@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/navigationbar_background_os7@2x.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/progresshud_background@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/progresshud_background@2x.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/sdk_weibo_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/sdk_weibo_logo.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/sdk_weibo_logo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/sdk_weibo_logo@2x.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/sdk_weibo_logo@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/sdk_weibo_logo@3x.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/timeline_relationship_icon_addattention.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/timeline_relationship_icon_addattention.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/timeline_relationship_icon_addattention@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/timeline_relationship_icon_addattention@2x.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/timeline_relationship_icon_addattention@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/timeline_relationship_icon_addattention@3x.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/timeline_relationship_icon_attention.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/timeline_relationship_icon_attention.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/timeline_relationship_icon_attention@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/timeline_relationship_icon_attention@2x.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/timeline_relationship_icon_attention@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/timeline_relationship_icon_attention@3x.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/verify_code_button@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/verify_code_button@2x.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/verify_code_button@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/verify_code_button@3x.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/verify_code_button_highlighted@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/verify_code_button_highlighted@2x.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/verify_code_button_highlighted@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/images/verify_code_button_highlighted@3x.png -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/others/countryList: -------------------------------------------------------------------------------- 1 | {"香港地区":{"code":"00852","rule":{"mcc":["454"]}},"台湾地区":{"code":"00886","rule":{"mcc":["466"]}},"澳门地区":{"code":"00853","rule":{"mcc":["455"]}},"日本":{"code":"0081","rule":{"mcc":["440","441"]}},"韩国":{"code":"0082","rule":{"mcc":["450"]}},"新加坡":{"code":"0065","rule":{"mcc":["525"]}},"马来西亚":{"code":"0060","rule":{"mcc":["502"]}},"美国":{"code":"001","rule":{"mcc":["310","311","316"]}},"加拿大":{"code":"001","rule":{"mcc":["302"]}},"澳大利亚":{"code":"0061","rule":{"mcc":["505"]}},"英国":{"code":"0044","rule":{"mcc":["234"]}},"法国":{"code":"0033","rule":{"mcc":["208"]}},"俄罗斯":{"code":"007","rule":{"mcc":["250"]}},"印度":{"code":"0091","rule":{"mcc":["404"]}},"泰国":{"code":"0066","rule":{"mcc":["520"]}},"德国":{"code":"0049","rule":{"mcc":["262"]}}} -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/others/mfp.cer: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/WeiboSDK.bundle/others/mfp.cer -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/WeiboUser.h: -------------------------------------------------------------------------------- 1 | // 2 | // WeiboUser.h 3 | // WeiboSDK 4 | // 5 | // Created by DannionQiu on 14-9-23. 6 | // Copyright (c) 2014年 SINA iOS Team. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /*@ 12 | You can get the latest WeiboUser field description on http://open.weibo.com/wiki/2/friendships/friends/en . 13 | */ 14 | @interface WeiboUser : NSObject 15 | 16 | - (instancetype)initWithDictionary:(NSDictionary*)paraDict; 17 | + (instancetype)userWithDictionary:(NSDictionary*)paraDict; 18 | 19 | // Validate the dictionary to be converted. 20 | + (BOOL)isValidForDictionary:(NSDictionary *)dict; 21 | 22 | - (BOOL)updateWithDictionary:(NSDictionary*)paraDict; 23 | 24 | 25 | @property(readwrite, strong, nonatomic) NSString* userID; 26 | @property(readwrite, strong, nonatomic) NSString* userClass; 27 | @property(readwrite, strong, nonatomic) NSString* screenName; 28 | @property(readwrite, strong, nonatomic) NSString* name; 29 | @property(readwrite, strong, nonatomic) NSString* province; 30 | @property(readwrite, strong, nonatomic) NSString* city; 31 | @property(readwrite, strong, nonatomic) NSString* location; 32 | @property(readwrite, strong, nonatomic) NSString* userDescription; 33 | @property(readwrite, strong, nonatomic) NSString* url; 34 | @property(readwrite, strong, nonatomic) NSString* profileImageUrl; 35 | @property(readwrite, strong, nonatomic) NSString* coverImageUrl; 36 | @property(readwrite, strong, nonatomic) NSString* coverImageForPhoneUrl; 37 | @property(readwrite, strong, nonatomic) NSString* profileUrl; 38 | @property(readwrite, strong, nonatomic) NSString* userDomain; 39 | @property(readwrite, strong, nonatomic) NSString* weihao; 40 | @property(readwrite, strong, nonatomic) NSString* gender; 41 | @property(readwrite, strong, nonatomic) NSString* followersCount; 42 | @property(readwrite, strong, nonatomic) NSString* friendsCount; 43 | @property(readwrite, strong, nonatomic) NSString* pageFriendsCount; 44 | @property(readwrite, strong, nonatomic) NSString* statusesCount; 45 | @property(readwrite, strong, nonatomic) NSString* favouritesCount; 46 | @property(readwrite, strong, nonatomic) NSString* createdTime; 47 | @property(readwrite, assign, nonatomic) BOOL isFollowingMe; 48 | @property(readwrite, assign, nonatomic) BOOL isFollowingByMe; 49 | @property(readwrite, assign, nonatomic) BOOL isAllowAllActMsg; 50 | @property(readwrite, assign, nonatomic) BOOL isAllowAllComment; 51 | @property(readwrite, assign, nonatomic) BOOL isGeoEnabled; 52 | @property(readwrite, assign, nonatomic) BOOL isVerified; 53 | @property(readwrite, strong, nonatomic) NSString* verifiedType; 54 | @property(readwrite, strong, nonatomic) NSString* remark; 55 | @property(readwrite, strong, nonatomic) NSString* statusID; 56 | @property(readwrite, strong, nonatomic) NSString* ptype; 57 | @property(readwrite, strong, nonatomic) NSString* avatarLargeUrl; 58 | @property(readwrite, strong, nonatomic) NSString* avatarHDUrl; 59 | @property(readwrite, strong, nonatomic) NSString* verifiedReason; 60 | @property(readwrite, strong, nonatomic) NSString* verifiedTrade; 61 | @property(readwrite, strong, nonatomic) NSString* verifiedReasonUrl; 62 | @property(readwrite, strong, nonatomic) NSString* verifiedSource; 63 | @property(readwrite, strong, nonatomic) NSString* verifiedSourceUrl; 64 | @property(readwrite, strong, nonatomic) NSString* verifiedState; 65 | @property(readwrite, strong, nonatomic) NSString* verifiedLevel; 66 | @property(readwrite, strong, nonatomic) NSString* onlineStatus; 67 | @property(readwrite, strong, nonatomic) NSString* biFollowersCount; 68 | @property(readwrite, strong, nonatomic) NSString* language; 69 | @property(readwrite, strong, nonatomic) NSString* star; 70 | @property(readwrite, strong, nonatomic) NSString* mbtype; 71 | @property(readwrite, strong, nonatomic) NSString* mbrank; 72 | @property(readwrite, strong, nonatomic) NSString* block_word; 73 | @property(readwrite, strong, nonatomic) NSString* block_app; 74 | @property(readwrite, strong, nonatomic) NSString* credit_score; 75 | @property(readwrite, strong, nonatomic) NSDictionary* originParaDict; 76 | 77 | @end 78 | -------------------------------------------------------------------------------- /authDemo/authTool/Lib/libWeiboSDK/libWeiboSDK.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/authDemo/authTool/Lib/libWeiboSDK/libWeiboSDK.a -------------------------------------------------------------------------------- /authDemo/authTool/WMAuthManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // WMAuthManager.h 3 | // 4 | // Created by zwm on 15/5/14. 5 | // Copyright (c) 2015年 zwm. All rights reserved. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | typedef NS_OPTIONS (NSInteger, WMAuthType) { 12 | WMAuthNone = 0, 13 | WMAuthTencent = 1 << 0, 14 | WMAuthWeibo = 1 << 1, 15 | WMAuthWeixin = 1 << 2, 16 | WMAuthFacebook = 1 << 3, 17 | WMAuthAll = WMAuthTencent | WMAuthWeibo | WMAuthWeixin | WMAuthFacebook, 18 | }; 19 | 20 | /// 第三方授权回调 21 | /// @param error 是否成功,返回nil成功,失败error.domain失败原因 22 | /// @param openID QQ的openId 微博userID 微信openid facebook的userID 23 | /// @param unionID 微信一账号多app统一id,其他第三方没这个都传0 24 | typedef void (^WMAuthBlock)(NSError *error, NSString *openID, NSString *unionID); 25 | /// 用户信息回调 26 | /// @param userName 用户名 27 | /// @param userAvatar 头像url 28 | typedef void (^WMUserInfoBlock)(NSString *userName, NSString *userAvatar); 29 | /// 用户信息回调,facebook专用 30 | /// @param userName 用户名 31 | /// @param userAvatar 用户头像 32 | typedef void (^WMUserInfoImgBlock)(NSString *userName, UIView *userAvatar); 33 | /// 分享回调 34 | /// @param error 是否成功,返回nil成功,失败error.domain失败原因 35 | typedef void (^WMShareBlock)(NSError *error); 36 | 37 | @interface WMAuthManager : NSObject 38 | 39 | /// 0、用户手机是否安装对应第三方 40 | /// @param authType 四者其一 41 | /// @return 安装返回true,未安装返回false 42 | + (BOOL)isAppInstalled:(WMAuthType)authType; 43 | 44 | /// 1、注册第三方 45 | /// @param authType 四者皆可WMAuthAll 46 | /// @param application facebook专用 47 | + (void)registerApp:(WMAuthType)authType 48 | withApplication:(UIApplication *)application 49 | withOptions:(NSDictionary *)launchOptions; 50 | 51 | /// 2、第三方回调响应 52 | /// @param application facebook专用 53 | + (BOOL)handleOpenURL:(NSURL *)url 54 | application:(UIApplication *)application 55 | sourceApplication:(NSString *)sourceApplication 56 | annotation:(id)annotation; 57 | 58 | /// 3、恢复状态,facebook专用 59 | + (void)activateApp; 60 | 61 | /// 4、发起对应第三方授权,目的是第三方授权登录或者第三方绑定 62 | /// @param authType 四种其一 63 | /// @param result 登录回调block,成功返回TRUE和ID,失败返回FALSE和错误信息 64 | /// @param block 获取用户信息回调,成功返回用户名和头像 65 | /// @param imgBlock facebook专用 66 | /// @param vc weixin专用 67 | + (void)sendAuthType:(WMAuthType)authType 68 | withBlock:(WMAuthBlock)result 69 | withUserInfo:(WMUserInfoBlock)block 70 | withUserInfoImg:(WMUserInfoImgBlock)imgBlock 71 | withController:(UIViewController *)vc; 72 | /// 4.1、同上,只是不去取用户名和头像 73 | /// @param authType 四种其一 74 | /// @param result 登录回调block,成功返回TRUE和ID,失败返回FALSE和错误信息 75 | /// @param vc weixin专用 76 | + (void)sendAuthType:(WMAuthType)authType 77 | withBlock:(WMAuthBlock)result 78 | withController:(UIViewController *)vc; 79 | 80 | /// 5、分享链接到对应第三方 81 | /// @param authType 四种其一,以下参数的limit详见各自接口描述 82 | /// @param title 标题 83 | /// @param description 简要描述,对应微信时,nil朋友圈,非nil微信好友 84 | /// @param image 配一张缩略图,对应微博时,nil发纯文本微博,非nil带图微博 85 | /// @param url 指向链接,不能为空 86 | /// @param result 回调是否成功,error为nil成功,失败error.domain原因 87 | + (void)shareAuthType:(WMAuthType)authType 88 | title:(NSString *)title 89 | description:(NSString *)description 90 | thumb:(UIImage *)image 91 | url:(NSString *)url 92 | result:(WMShareBlock)result; 93 | 94 | + (BOOL)isUserInfo:(WMAuthType)authType; 95 | + (NSString *)getUserName:(WMAuthType)authType; 96 | + (NSString *)getUserAvatar:(WMAuthType)authType; 97 | 98 | @end 99 | -------------------------------------------------------------------------------- /authDemo/authTool/WMEmail.h: -------------------------------------------------------------------------------- 1 | // 2 | // WMEmail.h 3 | // authDemo 4 | // 5 | // Created by zwm on 2016/12/9. 6 | // Copyright © 2016年 zwm. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "WMAuthManager.h" 11 | 12 | @interface WMEmailData : NSObject 13 | 14 | @property (nonatomic, strong) NSData *data;// 附件数据 15 | @property (nonatomic, copy) NSString *type;// 附件类型 @"audio/mp3"、@"image/jpeg" 16 | @property (nonatomic, copy) NSString *name;// 附件名字 @"share.mp3"、@"share.jpg" 17 | 18 | @end 19 | 20 | @interface WMEmail : NSObject 21 | 22 | /// 是否能发送邮件 23 | /// @"没有检测到系统邮箱,请先配置一个" 24 | + (BOOL)canSendMail; 25 | 26 | /// 分享文件、链接到邮件 27 | /// @param datas 邮件附件 28 | /// @param title 邮件标题 29 | /// @param description 邮件内容 30 | /// @param result 回调是否成功,error为nil成功,失败error.domain原因 31 | + (void)shareEmail:(NSArray *)datas 32 | title:(NSString *)title 33 | description:(NSString *)description 34 | result:(WMShareBlock)result; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /authDemo/authTool/WMEmail.m: -------------------------------------------------------------------------------- 1 | // 2 | // WMEmail.m 3 | // authDemo 4 | // 5 | // Created by zwm on 2016/12/9. 6 | // Copyright © 2016年 zwm. All rights reserved. 7 | // 8 | 9 | #import "WMEmail.h" 10 | #import 11 | #import 12 | 13 | @implementation WMEmailData 14 | 15 | 16 | @end 17 | 18 | @interface WMEmail () 19 | 20 | @property (nonatomic, copy) WMShareBlock shareBlock; 21 | @property (nonatomic, strong) MFMailComposeViewController *picker; 22 | 23 | @end 24 | 25 | @implementation WMEmail 26 | 27 | + (BOOL)canSendMail 28 | { 29 | Class mailClass = (NSClassFromString(@"MFMailComposeViewController")); 30 | if (mailClass != nil) { 31 | return [mailClass canSendMail]; 32 | } 33 | return FALSE; 34 | } 35 | 36 | + (instancetype)manager 37 | { 38 | static id manager = nil; 39 | static dispatch_once_t onceToken; 40 | dispatch_once(&onceToken, ^{ 41 | manager = [[WMEmail alloc] init]; 42 | }); 43 | return manager; 44 | } 45 | 46 | + (void)shareEmail:(NSArray *)datas 47 | title:(NSString *)title 48 | description:(NSString *)description 49 | result:(WMShareBlock)result 50 | { 51 | [[WMEmail manager] shareEmail:datas title:title description:description result:result]; 52 | } 53 | 54 | - (void)shareEmail:(NSArray *)datas 55 | title:(NSString *)title 56 | description:(NSString *)description 57 | result:(WMShareBlock)result 58 | { 59 | _picker = [[MFMailComposeViewController alloc] init]; 60 | __weak typeof(self) weakself = self; 61 | self.picker.mailComposeDelegate = weakself; 62 | _shareBlock = result; 63 | 64 | [_picker setSubject:title]; 65 | 66 | // 发送附件 67 | for (NSInteger i=0; i 9 | #import 10 | #import "WMAuthManager.h" 11 | 12 | @interface WMFacebookManager : NSObject 13 | 14 | + (BOOL)isAppInstalled; 15 | 16 | + (void)registerApp:(UIApplication *)application withOptions:(NSDictionary *)launchOptions; 17 | + (void)activateApp; 18 | 19 | + (BOOL)handleOpenURL:(NSURL *)url 20 | application:(UIApplication *)application 21 | sourceApplication:(NSString *)sourceApplication 22 | annotation:(id)annotation; 23 | 24 | + (void)sendAuthWithBlock:(WMAuthBlock)result 25 | withUserInfoImg:(WMUserInfoImgBlock)block; 26 | 27 | + (BOOL)isUserInfo; 28 | + (NSString *)getUserName; 29 | + (NSString *)getUserAvatar; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /authDemo/authTool/WMFacebookManager.m: -------------------------------------------------------------------------------- 1 | // 2 | // WMFacebookManager.m 3 | // 4 | // Created by zwm on 15/5/14. 5 | // Copyright (c) 2015年 zwm. All rights reserved. 6 | // 7 | 8 | #import "WMFacebookManager.h" 9 | #import 10 | #import 11 | 12 | @interface WMFacebookManager () 13 | 14 | @property (nonatomic, assign) BOOL isOK; 15 | @property (nonatomic, copy) NSString *nickName; 16 | @property (nonatomic, copy) NSString *iconUrl; 17 | 18 | @property (nonatomic, copy) WMAuthBlock respBlcok; 19 | @property (nonatomic, copy) WMUserInfoImgBlock userInfoImgBlcok; 20 | 21 | @property (strong, nonatomic) FBSDKLoginManager *loginManager; 22 | //@property (strong, nonatomic) FBSDKGraphRequest *ret; 23 | 24 | @end 25 | 26 | @implementation WMFacebookManager 27 | 28 | + (BOOL)isAppInstalled 29 | { 30 | return TRUE; 31 | } 32 | 33 | + (instancetype)manager 34 | { 35 | static id manager = nil; 36 | static dispatch_once_t onceToken; 37 | dispatch_once(&onceToken, ^{ 38 | manager = [[WMFacebookManager alloc] init]; 39 | }); 40 | return manager; 41 | } 42 | 43 | - (id)init 44 | { 45 | self = [super init]; 46 | if (self) { 47 | self.loginManager = [[FBSDKLoginManager alloc] init]; 48 | } 49 | return self; 50 | } 51 | 52 | + (void)activateApp 53 | { 54 | [FBSDKAppEvents activateApp]; 55 | } 56 | 57 | + (void)registerApp:(UIApplication *)application withOptions:(NSDictionary *)launchOptions 58 | { 59 | [[FBSDKApplicationDelegate sharedInstance] application:application 60 | didFinishLaunchingWithOptions:launchOptions]; 61 | [FBSDKProfile enableUpdatesOnAccessTokenChange:YES]; 62 | } 63 | 64 | + (void)sendAuthWithBlock:(WMAuthBlock)resultBlock 65 | withUserInfoImg:(WMUserInfoImgBlock)infoBlock 66 | { 67 | WMFacebookManager *manager = [WMFacebookManager manager]; 68 | manager.respBlcok = resultBlock; 69 | manager.userInfoImgBlcok = infoBlock; 70 | 71 | [manager.loginManager logInWithReadPermissions:@[@"public_profile"] //@[@"email"] 72 | handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) { 73 | if (error) { 74 | NSLog(@"Facebook error:%@", error); 75 | if (resultBlock) { 76 | resultBlock([NSError errorWithDomain:@"Facebook登录失败" code:error.code userInfo:nil], @"0", @"0"); 77 | } 78 | } else if (result.isCancelled) { 79 | if (resultBlock) { 80 | resultBlock([NSError errorWithDomain:@"用户取消Facebook登录" code:-1 userInfo:nil], @"0", @"0"); 81 | } 82 | } else { 83 | if ([FBSDKAccessToken currentAccessToken]) { 84 | if (resultBlock) { 85 | resultBlock(nil, [[FBSDKAccessToken currentAccessToken] userID], @"0"); 86 | } 87 | if (infoBlock) { 88 | FBSDKProfile *profile = [FBSDKProfile currentProfile]; 89 | if (profile) { 90 | FBSDKProfilePictureView *avatarImg = [[FBSDKProfilePictureView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)]; 91 | [avatarImg setProfileID:profile.userID]; 92 | 93 | infoBlock(profile.name, avatarImg); 94 | } 95 | } 96 | } 97 | } 98 | }]; 99 | } 100 | 101 | + (BOOL)handleOpenURL:(NSURL *)url 102 | application:(UIApplication *)application 103 | sourceApplication:(NSString *)sourceApplication 104 | annotation:(id)annotation 105 | { 106 | return [[FBSDKApplicationDelegate sharedInstance] application:application 107 | openURL:url 108 | sourceApplication:sourceApplication 109 | annotation:annotation]; 110 | } 111 | 112 | + (BOOL)isUserInfo 113 | { 114 | WMFacebookManager *manager = [WMFacebookManager manager]; 115 | return manager.isOK; 116 | } 117 | 118 | + (NSString *)getUserName 119 | { 120 | WMFacebookManager *manager = [WMFacebookManager manager]; 121 | return manager.nickName; 122 | } 123 | 124 | + (NSString *)getUserAvatar 125 | { 126 | WMFacebookManager *manager = [WMFacebookManager manager]; 127 | return manager.iconUrl; 128 | } 129 | 130 | @end 131 | -------------------------------------------------------------------------------- /authDemo/authTool/WMNetwork.h: -------------------------------------------------------------------------------- 1 | // 2 | // WMNetwork.h 3 | // 4 | // Created by zwm on 15/6/15. 5 | // Copyright (c) 2015年 zwm. All rights reserved. 6 | // 7 | 8 | #import 9 | #import "AFNetworking.h" 10 | 11 | typedef void(^WMNetworkBlock)(id data, NSError *error); 12 | 13 | @interface WMNetwork : AFHTTPSessionManager 14 | 15 | + (id)sharedInstance; 16 | 17 | + (void)requestWithFullUrl:(NSString *)urlPath withParams:(NSDictionary *)params andBlock:(WMNetworkBlock)block; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /authDemo/authTool/WMNetwork.m: -------------------------------------------------------------------------------- 1 | // 2 | // WMNetwork.m 3 | // 4 | // Created by zwm on 15/6/15. 5 | // Copyright (c) 2015年 zwm. All rights reserved. 6 | // 7 | 8 | #import "WMNetwork.h" 9 | #import "AFNetworkActivityIndicatorManager.h" 10 | 11 | @implementation WMNetwork 12 | 13 | + (WMNetwork *)sharedInstance 14 | { 15 | static WMNetwork *_sharedNetwork = nil; 16 | static dispatch_once_t onceToken; 17 | dispatch_once(&onceToken, ^{ 18 | _sharedNetwork = [[WMNetwork alloc] init]; 19 | }); 20 | 21 | return _sharedNetwork; 22 | } 23 | 24 | - (id)init 25 | { 26 | self = [super init]; 27 | if (self) { 28 | self.responseSerializer = [AFJSONResponseSerializer serializer]; 29 | self.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/plain", @"text/javascript", @"text/json", @"text/html", nil]; 30 | [self.requestSerializer setValue:@"application/json" forHTTPHeaderField:@"Accept"]; 31 | } 32 | return self; 33 | } 34 | 35 | + (void)requestWithFullUrl:(NSString *)urlPath 36 | withParams:(NSDictionary *)params 37 | andBlock:(WMNetworkBlock)block 38 | { 39 | if (!urlPath || urlPath.length <= 0) { 40 | return; 41 | } 42 | 43 | // log请求数据 44 | NSLog(@"\n===========request===========\n%@:\n%@", urlPath, params); 45 | urlPath = [urlPath stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; 46 | 47 | // 发起请求 48 | [[WMNetwork sharedInstance] POST:urlPath parameters:params 49 | progress:^(NSProgress * _Nonnull uploadProgress) { 50 | 51 | } success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) { 52 | NSLog(@"\n===========response POST===========\n%@:\n%@", urlPath, responseObject); 53 | if (block) { 54 | block(responseObject, nil); 55 | } 56 | } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) { 57 | NSLog(@"\n===========response POST===========\n%@:\n%@", urlPath, error); 58 | if (block) { 59 | block(nil, error); 60 | } 61 | }]; 62 | } 63 | 64 | @end 65 | -------------------------------------------------------------------------------- /authDemo/authTool/WMTencentManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // WMTencentManager.h 3 | // 4 | // Created by zwm on 15/5/14. 5 | // Copyright (c) 2015年 zwm. All rights reserved. 6 | // 7 | 8 | #import 9 | #import "WMAuthManager.h" 10 | 11 | #define QQAppID @"1104592420" 12 | 13 | // Security.framework”, “libiconv.dylib”,“SystemConfiguration.framework”, 14 | // “CoreGraphics.Framework”、“libsqlite3.dylib”、“CoreTelephony.framework”、“libstdc++.dylib”、“libz.dylib” 15 | 16 | @interface WMTencentManager : NSObject 17 | 18 | + (BOOL)isAppInstalled; 19 | 20 | + (BOOL)handleOpenURL:(NSURL *)url; 21 | 22 | + (void)sendAuthWithBlock:(WMAuthBlock)result 23 | withUserInfo:(WMUserInfoBlock)block; 24 | 25 | + (BOOL)isUserInfo; 26 | + (NSString *)getUserName; 27 | + (NSString *)getUserAvatar; 28 | 29 | /// 分享到QQ 30 | /// @param title 标题,最长128个字符 31 | /// @param description 简要描述,最长512个字符 32 | /// @param image 配一张缩略图,最大1M字节 33 | /// @param url 指向链接,必填,最长512个字符 34 | /// @param result 回调是否成功,error为nil成功,失败error.domain原因 35 | + (void)shareQQ:(NSString *)title 36 | description:(NSString *)description 37 | thumb:(NSData *)image 38 | url:(NSString *)url 39 | result:(WMShareBlock)result; 40 | /// 分享图片到QQ 41 | /// @param image 大小不能超过5M,其他同上 42 | + (void)shareImg:(NSData *)image 43 | title:(NSString *)title 44 | description:(NSString *)description 45 | thumb:(NSData *)thumb 46 | result:(WMShareBlock)result; 47 | @end 48 | -------------------------------------------------------------------------------- /authDemo/authTool/WMWeiXinManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // WMWeiXinManager.h 3 | // 4 | // Created by zwm on 15/5/14. 5 | // Copyright (c) 2015年 zwm. All rights reserved. 6 | // 7 | 8 | #import 9 | #import "WMAuthManager.h" 10 | 11 | #define WXAppKey @"wx37496a0e9d616484" 12 | #define WXSecret @"c454b6604b65cf4bb852fc4ac27cb50f" 13 | 14 | // SystemConfiguration.framework,libz.dylib,libsqlite3.0.dylib, 15 | // CoreTelephony.framework,Security.framework,CFNetwork.framework 16 | 17 | @interface WMWeiXinManager : NSObject 18 | 19 | + (BOOL)isAppInstalled; 20 | 21 | + (void)registerApp; 22 | 23 | + (BOOL)handleOpenURL:(NSURL *)url; 24 | 25 | + (void)sendAuthWithBlock:(WMAuthBlock)result 26 | withUserInfo:(WMUserInfoBlock)block 27 | withController:(UIViewController *)viewController; 28 | 29 | + (BOOL)isUserInfo; 30 | + (NSString *)getUserName; 31 | + (NSString *)getUserAvatar; 32 | 33 | /// 分享链接到微信好友 34 | /// @param title 标题,长度不能超过512字节 35 | /// @param description 简要描述,长度不能超过1K 36 | /// @param image 配一张缩略图,大小不能超过32K 37 | /// @param url 指向链接,不能为空且长度不能超过10K 38 | /// @param result 回调是否成功,error为nil成功,失败error.domain原因 39 | + (void)shareFirend:(NSString *)title 40 | description:(NSString *)description 41 | thumb:(UIImage *)image 42 | url:(NSString *)url 43 | result:(WMShareBlock)result; 44 | /// 分享链接到微信朋友圈,参数同上 45 | + (void)shareFirends:(NSString *)title 46 | thumb:(UIImage *)image 47 | url:(NSString *)url 48 | result:(WMShareBlock)result; 49 | /// 分享图片到微信 50 | /// @param image 大小不能超过10M 51 | /// @param isFriends 是否朋友圈 52 | + (void)shareImg:(NSData *)image 53 | thumb:(UIImage *)thumb 54 | isFriends:(BOOL)isFriends 55 | result:(WMShareBlock)result; 56 | /// 分享文件给好友(音乐) 57 | + (void)shareFile:(NSData *)file 58 | result:(WMShareBlock)result; 59 | /// 分享音乐到微信 60 | /// @param isFriends 是否朋友圈 61 | + (void)shareMusic:(NSString *)title 62 | des:(NSString *)description 63 | thumb:(UIImage *)image 64 | url:(NSString *)url 65 | isFriends:(BOOL)isFriends 66 | result:(WMShareBlock)result; 67 | 68 | @end 69 | -------------------------------------------------------------------------------- /authDemo/authTool/WMWeiboManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // WMWeiboManager.h 3 | // 4 | // Created by zwm on 15/5/14. 5 | // Copyright (c) 2015年 zwm. All rights reserved. 6 | // 7 | 8 | #import 9 | #import "WMAuthManager.h" 10 | 11 | #define WBAppKey @"464916152" 12 | 13 | // iOS 应用推荐使用默认授权回调页 14 | #define kRedirectURI @"https://api.weibo.com/oauth2/default.html" 15 | 16 | // QuartzCore.framework 、 ImageIO.framework 、 SystemConfiguration.framework 、 Security.framework 、 17 | // CoreTelephony.framework 、 CoreText.framework 、 UIKit.framework 、 Foundation.framework 和 CoreGraphics.framework 18 | 19 | @interface WMWeiboManager : NSObject 20 | 21 | + (BOOL)isAppInstalled; 22 | 23 | + (void)registerApp; 24 | 25 | + (BOOL)handleOpenURL:(NSURL *)url; 26 | 27 | + (void)sendAuthWithBlock:(WMAuthBlock)result 28 | withUserInfo:(WMUserInfoBlock)block; 29 | 30 | + (BOOL)isUserInfo; 31 | + (NSString *)getUserName; 32 | + (NSString *)getUserAvatar; 33 | 34 | /// 分享链接、图片到微博 35 | /// @param title 想要表达的文字 36 | /// @param image 配一张缩略图,大小不能超过10M 37 | /// @param url 指向链接 38 | /// 合起来长度小于140个汉字:msg.text = [NSString stringWithFormat:@"#考满分分享#%@ (分享自 @考满分网) %@", title, url]; 39 | /// @param result 回调是否成功,error为nil成功,失败error.domain原因 40 | + (void)shareWB:(NSString *)title 41 | description:(NSString *)description 42 | thumb:(NSData *)image 43 | url:(NSString *)url 44 | result:(WMShareBlock)result; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /authDemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // autoDemo 4 | // 5 | // Created by zwm on 15/5/14. 6 | // Copyright (c) 2015年 zwm. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /facebook.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/facebook.gif -------------------------------------------------------------------------------- /facebook.mov: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emilyZhouwm/auth/01f3076fc0c357437ef975f1c755451963dc8fd4/facebook.mov --------------------------------------------------------------------------------