diff --git a/Example/AndroidExample/.buckconfig b/Example/.buckconfig similarity index 100% rename from Example/AndroidExample/.buckconfig rename to Example/.buckconfig diff --git a/Example/AndroidExample/.gitattributes b/Example/.gitattributes similarity index 100% rename from Example/AndroidExample/.gitattributes rename to Example/.gitattributes diff --git a/Example/AndroidExample/.gitignore b/Example/.gitignore similarity index 97% rename from Example/AndroidExample/.gitignore rename to Example/.gitignore index 828cc884..ad572e63 100644 --- a/Example/AndroidExample/.gitignore +++ b/Example/.gitignore @@ -20,7 +20,6 @@ DerivedData *.hmap *.ipa *.xcuserstate -project.xcworkspace # Android/IntelliJ # @@ -40,6 +39,7 @@ yarn-error.log buck-out/ \.buckd/ *.keystore +!debug.keystore # fastlane # diff --git a/Example/AndroidExample/.watchmanconfig b/Example/.watchmanconfig similarity index 100% rename from Example/AndroidExample/.watchmanconfig rename to Example/.watchmanconfig diff --git a/Example/AndroidExample/.eslintrc.js b/Example/AndroidExample/.eslintrc.js deleted file mode 100644 index 40c6dcd0..00000000 --- a/Example/AndroidExample/.eslintrc.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - root: true, - extends: '@react-native-community', -}; diff --git a/Example/AndroidExample/.flowconfig b/Example/AndroidExample/.flowconfig deleted file mode 100644 index 1319ea12..00000000 --- a/Example/AndroidExample/.flowconfig +++ /dev/null @@ -1,99 +0,0 @@ -[ignore] -; We fork some components by platform -.*/*[.]android.js - -; Ignore "BUCK" generated dirs -/\.buckd/ - -; Ignore unexpected extra "@providesModule" -.*/node_modules/.*/node_modules/fbjs/.* - -; Ignore duplicate module providers -; For RN Apps installed via npm, "Libraries" folder is inside -; "node_modules/react-native" but in the source repo it is in the root -node_modules/react-native/Libraries/react-native/React.js - -; Ignore polyfills -node_modules/react-native/Libraries/polyfills/.* - -; These should not be required directly -; require from fbjs/lib instead: require('fbjs/lib/warning') -node_modules/warning/.* - -; Flow doesn't support platforms -.*/Libraries/Utilities/HMRLoadingView.js - -[untyped] -.*/node_modules/@react-native-community/cli/.*/.* - -[include] - -[libs] -node_modules/react-native/Libraries/react-native/react-native-interface.js -node_modules/react-native/flow/ - -[options] -emoji=true - -esproposal.optional_chaining=enable -esproposal.nullish_coalescing=enable - -module.file_ext=.js -module.file_ext=.json -module.file_ext=.ios.js - -module.system=haste -module.system.haste.use_name_reducers=true -# get basename -module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1' -# strip .js or .js.flow suffix -module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1' -# strip .ios suffix -module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1' -module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1' -module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1' -module.system.haste.paths.blacklist=.*/__tests__/.* -module.system.haste.paths.blacklist=.*/__mocks__/.* -module.system.haste.paths.whitelist=/node_modules/react-native/Libraries/.* -module.system.haste.paths.whitelist=/node_modules/react-native/RNTester/.* -module.system.haste.paths.whitelist=/node_modules/react-native/IntegrationTests/.* -module.system.haste.paths.blacklist=/node_modules/react-native/Libraries/react-native/react-native-implementation.js -module.system.haste.paths.blacklist=/node_modules/react-native/Libraries/Animated/src/polyfills/.* - -munge_underscores=true - -module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub' - -suppress_type=$FlowIssue -suppress_type=$FlowFixMe -suppress_type=$FlowFixMeProps -suppress_type=$FlowFixMeState - -suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\) -suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+ -suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError - -[lints] -sketchy-null-number=warn -sketchy-null-mixed=warn -sketchy-number=warn -untyped-type-import=warn -nonstrict-import=warn -deprecated-type=warn -unsafe-getters-setters=warn -inexact-spread=warn -unnecessary-invariant=warn -signature-verification-failure=warn -deprecated-utility=error - -[strict] -deprecated-type -nonstrict-import -sketchy-null -unclear-type -unsafe-getters-setters -untyped-import -untyped-type-import - -[version] -^0.98.0 diff --git a/Example/AndroidExample/App.js b/Example/AndroidExample/App.js deleted file mode 100644 index ab7509cb..00000000 --- a/Example/AndroidExample/App.js +++ /dev/null @@ -1,134 +0,0 @@ -import React, { Component } from 'react'; -import { UIManager, LayoutAnimation, Alert } from 'react-native'; -import { authorize, refresh, revoke } from 'react-native-app-auth'; -import { Page, Button, ButtonContainer, Form, Heading } from './components'; - -UIManager.setLayoutAnimationEnabledExperimental && - UIManager.setLayoutAnimationEnabledExperimental(true); - -type State = { - hasLoggedInOnce: boolean, - accessToken: ?string, - accessTokenExpirationDate: ?string, - refreshToken: ?string, -}; - -const config = { - issuer: 'https://demo.identityserver.io', - clientId: 'native.code', - redirectUrl: 'io.identityserver.demo:/oauthredirect', - additionalParameters: { - prompt: 'login' - }, - scopes: ['openid', 'profile', 'email', 'offline_access'] - - // serviceConfiguration: { - // authorizationEndpoint: 'https://demo.identityserver.io/connect/authorize', - // tokenEndpoint: 'https://demo.identityserver.io/connect/token', - // revocationEndpoint: 'https://demo.identityserver.io/connect/revoke' - // } -}; - -export default class App extends Component<{}, State> { - state = { - hasLoggedInOnce: false, - accessToken: '', - accessTokenExpirationDate: '', - refreshToken: '', - }; - - animateState(nextState: $Shape, delay: number = 0) { - setTimeout(() => { - this.setState(() => { - LayoutAnimation.easeInEaseOut(); - return nextState; - }); - }, delay); - } - - authorize = async () => { - try { - const authState = await authorize(config); - - this.animateState( - { - hasLoggedInOnce: true, - accessToken: authState.accessToken, - accessTokenExpirationDate: authState.accessTokenExpirationDate, - refreshToken: authState.refreshToken, - scopes: authState.scopes, - }, - 500 - ); - } catch (error) { - Alert.alert('Failed to log in', error.message); - } - }; - - refresh = async () => { - try { - const authState = await refresh(config, { - refreshToken: this.state.refreshToken, - }); - - this.animateState({ - accessToken: authState.accessToken || this.state.accessToken, - accessTokenExpirationDate: - authState.accessTokenExpirationDate || this.state.accessTokenExpirationDate, - refreshToken: authState.refreshToken || this.state.refreshToken, - }); - } catch (error) { - Alert.alert('Failed to refresh token', error.message); - } - }; - - revoke = async () => { - try { - await revoke(config, { - tokenToRevoke: this.state.accessToken, - sendClientId: true, - }); - this.animateState({ - accessToken: '', - accessTokenExpirationDate: '', - refreshToken: '', - }); - } catch (error) { - Alert.alert('Failed to revoke token', error.message); - } - }; - - render() { - const { state } = this; - return ( - - {!!state.accessToken ? ( -
- accessToken - {state.accessToken} - accessTokenExpirationDate - {state.accessTokenExpirationDate} - refreshToken - {state.refreshToken} - scopes - {state.scopes.join(', ')} -
- ) : ( - {state.hasLoggedInOnce ? 'Goodbye.' : 'Hello, stranger.'} - )} - - - {!state.accessToken ? ( - - - - - - - - - - - Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda. - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC-Carthage/Source/AppDelegate.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC-Carthage/Source/AppDelegate.h deleted file mode 100644 index ece00038..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC-Carthage/Source/AppDelegate.h +++ /dev/null @@ -1,38 +0,0 @@ -/*! @file AppDelegate.h - @brief AppAuth iOS SDK Example - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ -#import - -@protocol OIDExternalUserAgentSession; - -/*! @brief The example application's delegate. - */ -@interface AppDelegate : UIResponder - -/*! @brief The sample application's @c UIWindow. - */ -@property(nonatomic, strong, nullable) UIWindow *window; - -/*! @brief The authorization flow session which receives the return URL from \SFSafariViewController. - @discussion We need to store this in the app delegate as it's that delegate which receives the - incoming URL on UIApplicationDelegate.application:openURL:options:. This property will be - nil, except when an authorization flow is in progress. - */ -@property(nonatomic, strong, nullable) id currentAuthorizationFlow; - -@end - diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC-Carthage/Source/AppDelegate.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC-Carthage/Source/AppDelegate.m deleted file mode 100644 index 71627038..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC-Carthage/Source/AppDelegate.m +++ /dev/null @@ -1,76 +0,0 @@ -/*! @file AppDelegate.m - @brief AppAuth iOS SDK Example - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "AppDelegate.h" - -#import -#import "AppAuthExampleViewController.h" - -@interface AppDelegate () - -@end - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application - didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - - UIWindow *window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; - UIViewController *mainViewController = - [[AppAuthExampleViewController alloc] initWithNibName:nil bundle:nil]; - window.rootViewController = mainViewController; - - _window = window; - [_window makeKeyAndVisible]; - - return YES; -} - -/*! @brief Handles inbound URLs. Checks if the URL matches the redirect URI for a pending - AppAuth authorization request. - */ -- (BOOL)application:(UIApplication *)app - openURL:(NSURL *)url - options:(NSDictionary *)options { - // Sends the URL to the current authorization flow (if any) which will process it if it relates to - // an authorization response. - if ([_currentAuthorizationFlow resumeExternalUserAgentFlowWithURL:url]) { - _currentAuthorizationFlow = nil; - return YES; - } - - // Your additional URL handling (if any) goes here. - - return NO; -} - -/*! @brief Forwards inbound URLs for iOS 8.x and below to @c application:openURL:options:. - @discussion When you drop support for versions of iOS earlier than 9.0, you can delete this - method. NB. this implementation doesn't forward the sourceApplication or annotations. If you - need these, then you may want @c application:openURL:options to call this method instead. - */ -- (BOOL)application:(UIApplication *)application - openURL:(NSURL *)url - sourceApplication:(NSString *)sourceApplication - annotation:(id)annotation { - return [self application:application - openURL:url - options:@{}]; -} - -@end diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC-Carthage/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_1024.png b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC-Carthage/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_1024.png deleted file mode 100644 index 9d74d657..00000000 Binary files a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC-Carthage/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_1024.png and /dev/null differ diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC-Carthage/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_120.png b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC-Carthage/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_120.png deleted file mode 100644 index f73edc78..00000000 Binary files a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC-Carthage/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_120.png and /dev/null differ diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC-Carthage/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_152.png b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC-Carthage/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_152.png deleted file mode 100644 index bdd5de3c..00000000 Binary files a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC-Carthage/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_152.png and /dev/null differ diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC-Carthage/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_167.png b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC-Carthage/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_167.png deleted file mode 100644 index 1bb56407..00000000 Binary files a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC-Carthage/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_167.png and /dev/null differ diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC-Carthage/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_180.png b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC-Carthage/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_180.png deleted file mode 100644 index 17535eb0..00000000 Binary files a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC-Carthage/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_180.png and /dev/null differ diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC-Carthage/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_76.png b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC-Carthage/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_76.png deleted file mode 100644 index dc824d5e..00000000 Binary files a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC-Carthage/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_76.png and /dev/null differ diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC-Carthage/Source/Assets.xcassets/AppIcon.appiconset/Contents.json b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC-Carthage/Source/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 0b6ca5ed..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC-Carthage/Source/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "size" : "20x20", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "20x20", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "AppAuth_Icon_120.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "AppAuth_Icon_180.png", - "scale" : "3x" - }, - { - "idiom" : "ipad", - "size" : "20x20", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "20x20", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "40x40", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "40x40", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "AppAuth_Icon_76.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "AppAuth_Icon_152.png", - "scale" : "2x" - }, - { - "size" : "83.5x83.5", - "idiom" : "ipad", - "filename" : "AppAuth_Icon_167.png", - "scale" : "2x" - }, - { - "size" : "1024x1024", - "idiom" : "ios-marketing", - "filename" : "AppAuth_Icon_1024.png", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC-Carthage/Source/Base.lproj/LaunchScreen.storyboard b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC-Carthage/Source/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index e9366724..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC-Carthage/Source/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC-Carthage/Source/Info.plist b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC-Carthage/Source/Info.plist deleted file mode 100644 index 005fe32e..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC-Carthage/Source/Info.plist +++ /dev/null @@ -1,67 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleURLTypes - - - CFBundleTypeRole - Editor - CFBundleURLSchemes - - com.example.app - - - - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - NSAppTransportSecurity - - NSExceptionDomains - - localhost - - NSExceptionAllowsInsecureHTTPLoads - - - - - - diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC-Carthage/Source/main.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC-Carthage/Source/main.m deleted file mode 100644 index a4890425..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC-Carthage/Source/main.m +++ /dev/null @@ -1,30 +0,0 @@ -/*! @file main.m - @brief AppAuth iOS SDK Example - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -#import "AppDelegate.h" - -/*! @brief Application main entry point. - @return Exit code. - */ -int main(int argc, char *argv[]) { - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/.gitignore b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/.gitignore deleted file mode 100644 index 42a22df4..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -## Build generated -build/ -DerivedData/ - -## Various settings -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata/ - -## Other -*.moved-aside -*.xcuserstate - -# Pods are ignored in the samples as all Pods & their dependencies are either -# development Pods (this repo) or sourced from repos in the same organization. -# Generally we recommend versioning Pods, see the pros & cons here: -# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control -Pods diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Example-iOS_ObjC.xcodeproj/project.pbxproj b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Example-iOS_ObjC.xcodeproj/project.pbxproj deleted file mode 100644 index 0e1a19c7..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Example-iOS_ObjC.xcodeproj/project.pbxproj +++ /dev/null @@ -1,513 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 341310AA1E6DEF7000D5DEE5 /* AppAuthExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 341310A91E6DEF7000D5DEE5 /* AppAuthExampleTests.m */; }; - 346E916E1C29D42800D3620B /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 346E916D1C29D42800D3620B /* main.m */; }; - 346E91711C29D42800D3620B /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 346E91701C29D42800D3620B /* AppDelegate.m */; }; - 346E91791C29D42800D3620B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 346E91781C29D42800D3620B /* Assets.xcassets */; }; - 346E917C1C29D42800D3620B /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 346E917A1C29D42800D3620B /* LaunchScreen.storyboard */; }; - 346E91991C2A245000D3620B /* SafariServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 346E91981C2A245000D3620B /* SafariServices.framework */; }; - 34CB09BD1C42007600A54261 /* AppAuthExampleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34CB09BB1C42007600A54261 /* AppAuthExampleViewController.m */; }; - 34CB09BE1C42007600A54261 /* AppAuthExampleViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34CB09BC1C42007600A54261 /* AppAuthExampleViewController.xib */; }; - E46F8589CE9E5DDFA69D835B /* libPods-Example-iOS_ObjC.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B61A918CBE7B8142CD7D8B3 /* libPods-Example-iOS_ObjC.a */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 341310AC1E6DEF7000D5DEE5 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 346E91611C29D42800D3620B /* Project object */; - proxyType = 1; - remoteGlobalIDString = 346E91681C29D42800D3620B; - remoteInfo = Example; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 09795EAF079B07A1781675D9 /* libPods-Example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Example.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 0D29B2A58C931A5D41332144 /* Pods-Example-iOS_ObjC.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example-iOS_ObjC.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Example-iOS_ObjC/Pods-Example-iOS_ObjC.debug.xcconfig"; sourceTree = ""; }; - 341310A71E6DEF7000D5DEE5 /* AppAuthExample-iOS_ObjCTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "AppAuthExample-iOS_ObjCTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - 341310A91E6DEF7000D5DEE5 /* AppAuthExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppAuthExampleTests.m; sourceTree = ""; }; - 341310AB1E6DEF7000D5DEE5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 346E91691C29D42800D3620B /* Example-iOS_ObjC.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Example-iOS_ObjC.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 346E916D1C29D42800D3620B /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 346E916F1C29D42800D3620B /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 346E91701C29D42800D3620B /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 346E91781C29D42800D3620B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 346E917B1C29D42800D3620B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 346E917D1C29D42800D3620B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 346E91981C2A245000D3620B /* SafariServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SafariServices.framework; path = System/Library/Frameworks/SafariServices.framework; sourceTree = SDKROOT; }; - 3474C8DD1DFCB08E00F22B34 /* libAppAuth-iOS.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libAppAuth-iOS.a"; path = "../../build/Debug-iphoneos/libAppAuth-iOS.a"; sourceTree = ""; }; - 34CB09BA1C42007600A54261 /* AppAuthExampleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppAuthExampleViewController.h; sourceTree = ""; }; - 34CB09BB1C42007600A54261 /* AppAuthExampleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppAuthExampleViewController.m; sourceTree = ""; }; - 34CB09BC1C42007600A54261 /* AppAuthExampleViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = AppAuthExampleViewController.xib; sourceTree = ""; }; - 8B61A918CBE7B8142CD7D8B3 /* libPods-Example-iOS_ObjC.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Example-iOS_ObjC.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - C4C31DB4A4928F246AA03805 /* Pods-Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-Example/Pods-Example.release.xcconfig"; sourceTree = ""; }; - D9867DC6FA9089CD613D4728 /* Pods-Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Example/Pods-Example.debug.xcconfig"; sourceTree = ""; }; - ECBCCC4A1A779C83C72044F2 /* Pods-Example-iOS_ObjC.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example-iOS_ObjC.release.xcconfig"; path = "Pods/Target Support Files/Pods-Example-iOS_ObjC/Pods-Example-iOS_ObjC.release.xcconfig"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 341310A41E6DEF7000D5DEE5 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 346E91661C29D42800D3620B /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 346E91991C2A245000D3620B /* SafariServices.framework in Frameworks */, - E46F8589CE9E5DDFA69D835B /* libPods-Example-iOS_ObjC.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 341310A81E6DEF7000D5DEE5 /* Tests */ = { - isa = PBXGroup; - children = ( - 341310A91E6DEF7000D5DEE5 /* AppAuthExampleTests.m */, - 341310AB1E6DEF7000D5DEE5 /* Info.plist */, - ); - path = Tests; - sourceTree = ""; - }; - 341564001C487ABA00ECA3D9 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 3474C8DD1DFCB08E00F22B34 /* libAppAuth-iOS.a */, - 346E91981C2A245000D3620B /* SafariServices.framework */, - 09795EAF079B07A1781675D9 /* libPods-Example.a */, - 8B61A918CBE7B8142CD7D8B3 /* libPods-Example-iOS_ObjC.a */, - ); - name = Frameworks; - sourceTree = ""; - }; - 346E91601C29D42800D3620B = { - isa = PBXGroup; - children = ( - 346E916B1C29D42800D3620B /* Source */, - 341310A81E6DEF7000D5DEE5 /* Tests */, - 341564001C487ABA00ECA3D9 /* Frameworks */, - 346E916A1C29D42800D3620B /* Products */, - 6DB0B0125441549B9E4A3E6C /* Pods */, - ); - sourceTree = ""; - }; - 346E916A1C29D42800D3620B /* Products */ = { - isa = PBXGroup; - children = ( - 346E91691C29D42800D3620B /* Example-iOS_ObjC.app */, - 341310A71E6DEF7000D5DEE5 /* AppAuthExample-iOS_ObjCTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 346E916B1C29D42800D3620B /* Source */ = { - isa = PBXGroup; - children = ( - 346E916D1C29D42800D3620B /* main.m */, - 346E916F1C29D42800D3620B /* AppDelegate.h */, - 346E91701C29D42800D3620B /* AppDelegate.m */, - 34CB09BA1C42007600A54261 /* AppAuthExampleViewController.h */, - 34CB09BB1C42007600A54261 /* AppAuthExampleViewController.m */, - 34CB09BC1C42007600A54261 /* AppAuthExampleViewController.xib */, - 346E91781C29D42800D3620B /* Assets.xcassets */, - 346E917A1C29D42800D3620B /* LaunchScreen.storyboard */, - 346E917D1C29D42800D3620B /* Info.plist */, - ); - path = Source; - sourceTree = ""; - }; - 6DB0B0125441549B9E4A3E6C /* Pods */ = { - isa = PBXGroup; - children = ( - D9867DC6FA9089CD613D4728 /* Pods-Example.debug.xcconfig */, - C4C31DB4A4928F246AA03805 /* Pods-Example.release.xcconfig */, - 0D29B2A58C931A5D41332144 /* Pods-Example-iOS_ObjC.debug.xcconfig */, - ECBCCC4A1A779C83C72044F2 /* Pods-Example-iOS_ObjC.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 341310A61E6DEF7000D5DEE5 /* AppAuthExample-iOS_ObjCTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 341310AE1E6DEF7000D5DEE5 /* Build configuration list for PBXNativeTarget "AppAuthExample-iOS_ObjCTests" */; - buildPhases = ( - 341310A31E6DEF7000D5DEE5 /* Sources */, - 341310A41E6DEF7000D5DEE5 /* Frameworks */, - 341310A51E6DEF7000D5DEE5 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 341310AD1E6DEF7000D5DEE5 /* PBXTargetDependency */, - ); - name = "AppAuthExample-iOS_ObjCTests"; - productName = AppAuthExampleTests; - productReference = 341310A71E6DEF7000D5DEE5 /* AppAuthExample-iOS_ObjCTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 346E91681C29D42800D3620B /* Example-iOS_ObjC */ = { - isa = PBXNativeTarget; - buildConfigurationList = 346E91801C29D42800D3620B /* Build configuration list for PBXNativeTarget "Example-iOS_ObjC" */; - buildPhases = ( - C4DC5E3A0D4C7419380FA8C2 /* [CP] Check Pods Manifest.lock */, - 346E91651C29D42800D3620B /* Sources */, - 346E91661C29D42800D3620B /* Frameworks */, - 346E91671C29D42800D3620B /* Resources */, - 0B0B46F67786AB6E322D5F2B /* [CP] Embed Pods Frameworks */, - 3CB1FD4B438DD277394F39A7 /* [CP] Copy Pods Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "Example-iOS_ObjC"; - productName = Example; - productReference = 346E91691C29D42800D3620B /* Example-iOS_ObjC.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 346E91611C29D42800D3620B /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0720; - ORGANIZATIONNAME = "William Denniss"; - TargetAttributes = { - 341310A61E6DEF7000D5DEE5 = { - CreatedOnToolsVersion = 8.2.1; - ProvisioningStyle = Automatic; - TestTargetID = 346E91681C29D42800D3620B; - }; - 346E91681C29D42800D3620B = { - CreatedOnToolsVersion = 7.2; - }; - }; - }; - buildConfigurationList = 346E91641C29D42800D3620B /* Build configuration list for PBXProject "Example-iOS_ObjC" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 346E91601C29D42800D3620B; - productRefGroup = 346E916A1C29D42800D3620B /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 346E91681C29D42800D3620B /* Example-iOS_ObjC */, - 341310A61E6DEF7000D5DEE5 /* AppAuthExample-iOS_ObjCTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 341310A51E6DEF7000D5DEE5 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 346E91671C29D42800D3620B /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 346E917C1C29D42800D3620B /* LaunchScreen.storyboard in Resources */, - 346E91791C29D42800D3620B /* Assets.xcassets in Resources */, - 34CB09BE1C42007600A54261 /* AppAuthExampleViewController.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 0B0B46F67786AB6E322D5F2B /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Example-iOS_ObjC/Pods-Example-iOS_ObjC-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 3CB1FD4B438DD277394F39A7 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Example-iOS_ObjC/Pods-Example-iOS_ObjC-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - C4DC5E3A0D4C7419380FA8C2 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 341310A31E6DEF7000D5DEE5 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 341310AA1E6DEF7000D5DEE5 /* AppAuthExampleTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 346E91651C29D42800D3620B /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 346E91711C29D42800D3620B /* AppDelegate.m in Sources */, - 346E916E1C29D42800D3620B /* main.m in Sources */, - 34CB09BD1C42007600A54261 /* AppAuthExampleViewController.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 341310AD1E6DEF7000D5DEE5 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 346E91681C29D42800D3620B /* Example-iOS_ObjC */; - targetProxy = 341310AC1E6DEF7000D5DEE5 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 346E917A1C29D42800D3620B /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 346E917B1C29D42800D3620B /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 341310AF1E6DEF7000D5DEE5 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CLANG_ANALYZER_NONNULL = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - DEVELOPMENT_TEAM = ""; - INFOPLIST_FILE = Tests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 10.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = net.openid.AppAuthExampleTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example-iOS_ObjC.app/Example-iOS_ObjC"; - }; - name = Debug; - }; - 341310B01E6DEF7000D5DEE5 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CLANG_ANALYZER_NONNULL = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - DEVELOPMENT_TEAM = ""; - INFOPLIST_FILE = Tests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 10.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = net.openid.AppAuthExampleTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example-iOS_ObjC.app/Example-iOS_ObjC"; - }; - name = Release; - }; - 346E917E1C29D42800D3620B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_BITCODE = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "../../Source/**"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 346E917F1C29D42800D3620B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_BITCODE = NO; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "../../Source/**"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 346E91811C29D42800D3620B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 0D29B2A58C931A5D41332144 /* Pods-Example-iOS_ObjC.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - INFOPLIST_FILE = Source/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 7.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = net.openid.appauth.Example; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 346E91821C29D42800D3620B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = ECBCCC4A1A779C83C72044F2 /* Pods-Example-iOS_ObjC.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - INFOPLIST_FILE = Source/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 7.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = net.openid.appauth.Example; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 341310AE1E6DEF7000D5DEE5 /* Build configuration list for PBXNativeTarget "AppAuthExample-iOS_ObjCTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 341310AF1E6DEF7000D5DEE5 /* Debug */, - 341310B01E6DEF7000D5DEE5 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 346E91641C29D42800D3620B /* Build configuration list for PBXProject "Example-iOS_ObjC" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 346E917E1C29D42800D3620B /* Debug */, - 346E917F1C29D42800D3620B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 346E91801C29D42800D3620B /* Build configuration list for PBXNativeTarget "Example-iOS_ObjC" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 346E91811C29D42800D3620B /* Debug */, - 346E91821C29D42800D3620B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 346E91611C29D42800D3620B /* Project object */; -} diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Example-iOS_ObjC.xcodeproj/xcshareddata/xcschemes/Example-iOS_ObjC.xcscheme b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Example-iOS_ObjC.xcodeproj/xcshareddata/xcschemes/Example-iOS_ObjC.xcscheme deleted file mode 100644 index bb9fd794..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Example-iOS_ObjC.xcodeproj/xcshareddata/xcschemes/Example-iOS_ObjC.xcscheme +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Example-iOS_ObjC.xcworkspace/contents.xcworkspacedata b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Example-iOS_ObjC.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index e9470b78..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Example-iOS_ObjC.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Podfile b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Podfile deleted file mode 100644 index 4d6ab0f6..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Podfile +++ /dev/null @@ -1,7 +0,0 @@ -target 'Example-iOS_ObjC' do - platform :ios, '9.0' - - # AppAuth Pod - # In production, just use `pod 'AppAuth'` without the path reference. - pod 'AppAuth', :path => '../../' -end diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/README.md b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/README.md deleted file mode 100644 index 8393bb74..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/README.md +++ /dev/null @@ -1,56 +0,0 @@ -# Example Project - -## Setup & Open the Project - -1. In the `Example-iOS_ObjC` folder, run the following command to install the -AppAuth pod. - -``` -pod install -``` - -2. Open the `Example-iOS_ObjC.xcworkspace` workspace. - -``` -open Example-iOS_ObjC.xcworkspace -``` - -This workspace is configured to include AppAuth via CocoaPods. You can also -directly include AppAuth as a static library using the build targets in the -`AppAuth.xcodeproj` project. - -## Configuration - -The example doesn't work out of the box, you need to configure it with your own -client ID. - -### Information You'll Need - -* Issuer -* Client ID -* Redirect URI - -How to get this information varies by IdP, but we have -[instructions](../README.md#openid-certified-providers) for some OpenID -Certified providers. - -### Configure the Example - -#### In the file `AppAuthExampleViewController.m` - -1. Update `kIssuer` with the IdP's issuer. -2. Update `kClientID` with your new client id. -3. Update `kRedirectURI` redirect URI - -#### In the file `Info.plist` - -Fully expand "URL types" (a.k.a. `CFBundleURLTypes`) and replace -`com.example.app` with the *scheme* of your redirect URI. -The scheme is everything before the colon (`:`). For example, if the redirect -URI is `com.example.app:/oauth2redirect/example-provider`, then the scheme -would be `com.example.app`. - -### Running the Example - -Now your example should be ready to run. - diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/AppAuthExampleViewController.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/AppAuthExampleViewController.h deleted file mode 100644 index 364b1973..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/AppAuthExampleViewController.h +++ /dev/null @@ -1,74 +0,0 @@ -/*! @file AppAuthExampleViewController.h - @brief AppAuth iOS SDK Example - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ -#import - -@class OIDAuthState; -@class OIDServiceConfiguration; - -NS_ASSUME_NONNULL_BEGIN - -/*! @brief The example application's view controller. - */ -@interface AppAuthExampleViewController : UIViewController - -@property(nullable) IBOutlet UIButton *authAutoButton; -@property(nullable) IBOutlet UIButton *authManual; -@property(nullable) IBOutlet UIButton *codeExchangeButton; -@property(nullable) IBOutlet UIButton *userinfoButton; -@property(nullable) IBOutlet UIButton *clearAuthStateButton; -@property(nullable) IBOutlet UITextView *logTextView; - -/*! @brief The authorization state. This is the AppAuth object that you should keep around and - serialize to disk. - */ -@property(nonatomic, readonly, nullable) OIDAuthState *authState; - -/*! @brief Authorization code flow using @c OIDAuthState automatic code exchanges. - @param sender IBAction sender. - */ -- (IBAction)authWithAutoCodeExchange:(nullable id)sender; - -/*! @brief Authorization code flow without a the code exchange (need to call @c codeExchange: - manually) - @param sender IBAction sender. - */ -- (IBAction)authNoCodeExchange:(nullable id)sender; - -/*! @brief Performs the authorization code exchange at the token endpoint. - @param sender IBAction sender. - */ -- (IBAction)codeExchange:(nullable id)sender; - -/*! @brief Performs a Userinfo API call using @c OIDAuthState.performActionWithFreshTokens. - @param sender IBAction sender. - */ -- (IBAction)userinfo:(nullable id)sender; - -/*! @brief Nils the @c OIDAuthState object. - @param sender IBAction sender. - */ -- (IBAction)clearAuthState:(nullable id)sender; - -/*! @brief Clears the UI log. - @param sender IBAction sender. - */ -- (IBAction)clearLog:(nullable id)sender; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/AppAuthExampleViewController.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/AppAuthExampleViewController.m deleted file mode 100644 index 86a32445..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/AppAuthExampleViewController.m +++ /dev/null @@ -1,474 +0,0 @@ -/*! @file AppAuthExampleViewController.m - @brief AppAuth iOS SDK Example - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "AppAuthExampleViewController.h" - -#import - -#import "AppAuth.h" -#import "AppDelegate.h" - -typedef void (^PostRegistrationCallback)(OIDServiceConfiguration *configuration, - OIDRegistrationResponse *registrationResponse); - -/*! @brief The OIDC issuer from which the configuration will be discovered. - */ -static NSString *const kIssuer = @"https://issuer.example.com"; - -/*! @brief The OAuth client ID. - @discussion For client configuration instructions, see the README. - Set to nil to use dynamic registration with this example. - @see https://github.com/openid/AppAuth-iOS/blob/master/Examples/Example-iOS_ObjC/README.md - */ -static NSString *const kClientID = @"YOUR_CLIENT_ID"; - -/*! @brief The OAuth redirect URI for the client @c kClientID. - @discussion For client configuration instructions, see the README. - @see https://github.com/openid/AppAuth-iOS/blob/master/Examples/Example-iOS_ObjC/README.md - */ -static NSString *const kRedirectURI = @"com.example.app:/oauth2redirect/example-provider"; - -/*! @brief NSCoding key for the authState property. - */ -static NSString *const kAppAuthExampleAuthStateKey = @"authState"; - -@interface AppAuthExampleViewController () -@end - -@implementation AppAuthExampleViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - - _logTextView.layer.borderColor = [UIColor colorWithWhite:0.8 alpha:1.0].CGColor; - _logTextView.layer.borderWidth = 1.0f; - _logTextView.alwaysBounceVertical = true; - _logTextView.textContainer.lineBreakMode = NSLineBreakByCharWrapping; - _logTextView.text = @""; - - [self loadState]; - [self updateUI]; -} - -- (void)verifyConfig { -#if !defined(NS_BLOCK_ASSERTIONS) - - // The example needs to be configured with your own client details. - // See: https://github.com/openid/AppAuth-iOS/blob/master/Examples/Example-iOS_ObjC/README.md - - NSAssert(![kIssuer isEqualToString:@"https://issuer.example.com"], - @"Update kIssuer with your own issuer. " - "Instructions: https://github.com/openid/AppAuth-iOS/blob/master/Examples/Example-iOS_ObjC/README.md"); - - NSAssert(![kClientID isEqualToString:@"YOUR_CLIENT_ID"], - @"Update kClientID with your own client ID. " - "Instructions: https://github.com/openid/AppAuth-iOS/blob/master/Examples/Example-iOS_ObjC/README.md"); - - NSAssert(![kRedirectURI isEqualToString:@"com.example.app:/oauth2redirect/example-provider"], - @"Update kRedirectURI with your own redirect URI. " - "Instructions: https://github.com/openid/AppAuth-iOS/blob/master/Examples/Example-iOS_ObjC/README.md"); - - // verifies that the custom URI scheme has been updated in the Info.plist - NSArray __unused* urlTypes = - [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleURLTypes"]; - NSAssert([urlTypes count] > 0, @"No custom URI scheme has been configured for the project."); - NSArray *urlSchemes = - [(NSDictionary *)[urlTypes objectAtIndex:0] objectForKey:@"CFBundleURLSchemes"]; - NSAssert([urlSchemes count] > 0, @"No custom URI scheme has been configured for the project."); - NSString *urlScheme = [urlSchemes objectAtIndex:0]; - - NSAssert(![urlScheme isEqualToString:@"com.example.app"], - @"Configure the URI scheme in Info.plist (URL Types -> Item 0 -> URL Schemes -> Item 0) " - "with the scheme of your redirect URI. Full instructions: " - "https://github.com/openid/AppAuth-iOS/blob/master/Examples/Example-iOS_ObjC/README.md"); - -#endif // !defined(NS_BLOCK_ASSERTIONS) -} - -/*! @brief Saves the @c OIDAuthState to @c NSUSerDefaults. - */ -- (void)saveState { - // for production usage consider using the OS Keychain instead - NSData *archivedAuthState = [ NSKeyedArchiver archivedDataWithRootObject:_authState]; - [[NSUserDefaults standardUserDefaults] setObject:archivedAuthState - forKey:kAppAuthExampleAuthStateKey]; - [[NSUserDefaults standardUserDefaults] synchronize]; -} - -/*! @brief Loads the @c OIDAuthState from @c NSUSerDefaults. - */ -- (void)loadState { - // loads OIDAuthState from NSUSerDefaults - NSData *archivedAuthState = - [[NSUserDefaults standardUserDefaults] objectForKey:kAppAuthExampleAuthStateKey]; - OIDAuthState *authState = [NSKeyedUnarchiver unarchiveObjectWithData:archivedAuthState]; - [self setAuthState:authState]; -} - -- (void)setAuthState:(nullable OIDAuthState *)authState { - if (_authState == authState) { - return; - } - _authState = authState; - _authState.stateChangeDelegate = self; - [self stateChanged]; -} - -/*! @brief Refreshes UI, typically called after the auth state changed. - */ -- (void)updateUI { - _userinfoButton.enabled = [_authState isAuthorized]; - _clearAuthStateButton.enabled = _authState != nil; - _codeExchangeButton.enabled = _authState.lastAuthorizationResponse.authorizationCode - && !_authState.lastTokenResponse; - // dynamically changes authorize button text depending on authorized state - if (!_authState) { - [_authAutoButton setTitle:@"Authorize" forState:UIControlStateNormal]; - [_authAutoButton setTitle:@"Authorize" forState:UIControlStateHighlighted]; - [_authManual setTitle:@"Authorize (Manual)" forState:UIControlStateNormal]; - [_authManual setTitle:@"Authorize (Manual)" forState:UIControlStateHighlighted]; - } else { - [_authAutoButton setTitle:@"Re-authorize" forState:UIControlStateNormal]; - [_authAutoButton setTitle:@"Re-authorize" forState:UIControlStateHighlighted]; - [_authManual setTitle:@"Re-authorize (Manual)" forState:UIControlStateNormal]; - [_authManual setTitle:@"Re-authorize (Manual)" forState:UIControlStateHighlighted]; - } -} - -- (void)stateChanged { - [self saveState]; - [self updateUI]; -} - -- (void)didChangeState:(OIDAuthState *)state { - [self stateChanged]; -} - -- (void)authState:(OIDAuthState *)state didEncounterAuthorizationError:(nonnull NSError *)error { - [self logMessage:@"Received authorization error: %@", error]; -} - -- (void)viewDidAppear:(BOOL)animated { - [super viewDidAppear:animated]; -} - -- (void)doClientRegistration:(OIDServiceConfiguration *)configuration - callback:(PostRegistrationCallback)callback { - NSURL *redirectURI = [NSURL URLWithString:kRedirectURI]; - - OIDRegistrationRequest *request = - [[OIDRegistrationRequest alloc] initWithConfiguration:configuration - redirectURIs:@[ redirectURI ] - responseTypes:nil - grantTypes:nil - subjectType:nil - tokenEndpointAuthMethod:@"client_secret_post" - additionalParameters:nil]; - // performs registration request - [self logMessage:@"Initiating registration request"]; - - [OIDAuthorizationService performRegistrationRequest:request - completion:^(OIDRegistrationResponse *_Nullable regResp, NSError *_Nullable error) { - if (regResp) { - [self setAuthState:[[OIDAuthState alloc] initWithRegistrationResponse:regResp]]; - [self logMessage:@"Got registration response: [%@]", regResp]; - callback(configuration, regResp); - } else { - [self logMessage:@"Registration error: %@", [error localizedDescription]]; - [self setAuthState:nil]; - } - }]; -} - -- (void)doAuthWithAutoCodeExchange:(OIDServiceConfiguration *)configuration - clientID:(NSString *)clientID - clientSecret:(NSString *)clientSecret { - NSURL *redirectURI = [NSURL URLWithString:kRedirectURI]; - // builds authentication request - OIDAuthorizationRequest *request = - [[OIDAuthorizationRequest alloc] initWithConfiguration:configuration - clientId:clientID - clientSecret:clientSecret - scopes:@[ OIDScopeOpenID, OIDScopeProfile ] - redirectURL:redirectURI - responseType:OIDResponseTypeCode - additionalParameters:nil]; - // performs authentication request - AppDelegate *appDelegate = (AppDelegate *) [UIApplication sharedApplication].delegate; - [self logMessage:@"Initiating authorization request with scope: %@", request.scope]; - - appDelegate.currentAuthorizationFlow = - [OIDAuthState authStateByPresentingAuthorizationRequest:request - presentingViewController:self - callback:^(OIDAuthState *_Nullable authState, NSError *_Nullable error) { - if (authState) { - [self setAuthState:authState]; - [self logMessage:@"Got authorization tokens. Access token: %@", - authState.lastTokenResponse.accessToken]; - } else { - [self logMessage:@"Authorization error: %@", [error localizedDescription]]; - [self setAuthState:nil]; - } - }]; -} - -- (void)doAuthWithoutCodeExchange:(OIDServiceConfiguration *)configuration - clientID:(NSString *)clientID - clientSecret:(NSString *)clientSecret { - NSURL *redirectURI = [NSURL URLWithString:kRedirectURI]; - - // builds authentication request - OIDAuthorizationRequest *request = - [[OIDAuthorizationRequest alloc] initWithConfiguration:configuration - clientId:clientID - clientSecret:clientSecret - scopes:@[ OIDScopeOpenID, OIDScopeProfile ] - redirectURL:redirectURI - responseType:OIDResponseTypeCode - additionalParameters:nil]; - // performs authentication request - AppDelegate *appDelegate = (AppDelegate *) [UIApplication sharedApplication].delegate; - [self logMessage:@"Initiating authorization request %@", request]; - appDelegate.currentAuthorizationFlow = - [OIDAuthorizationService presentAuthorizationRequest:request - presentingViewController:self - callback:^(OIDAuthorizationResponse *_Nullable authorizationResponse, - NSError *_Nullable error) { - if (authorizationResponse) { - OIDAuthState *authState = - [[OIDAuthState alloc] initWithAuthorizationResponse:authorizationResponse]; - [self setAuthState:authState]; - - [self logMessage:@"Authorization response with code: %@", - authorizationResponse.authorizationCode]; - // could just call [self tokenExchange:nil] directly, but will let the user initiate it. - } else { - [self logMessage:@"Authorization error: %@", [error localizedDescription]]; - } - }]; -} - -- (IBAction)authWithAutoCodeExchange:(nullable id)sender { - [self verifyConfig]; - - NSURL *issuer = [NSURL URLWithString:kIssuer]; - - [self logMessage:@"Fetching configuration for issuer: %@", issuer]; - - // discovers endpoints - [OIDAuthorizationService discoverServiceConfigurationForIssuer:issuer - completion:^(OIDServiceConfiguration *_Nullable configuration, NSError *_Nullable error) { - if (!configuration) { - [self logMessage:@"Error retrieving discovery document: %@", [error localizedDescription]]; - [self setAuthState:nil]; - return; - } - - [self logMessage:@"Got configuration: %@", configuration]; - - if (!kClientID) { - [self doClientRegistration:configuration - callback:^(OIDServiceConfiguration *configuration, - OIDRegistrationResponse *registrationResponse) { - [self doAuthWithAutoCodeExchange:configuration - clientID:registrationResponse.clientID - clientSecret:registrationResponse.clientSecret]; - }]; - } else { - [self doAuthWithAutoCodeExchange:configuration clientID:kClientID clientSecret:nil]; - } - }]; -} - -- (IBAction)authNoCodeExchange:(nullable id)sender { - [self verifyConfig]; - - NSURL *issuer = [NSURL URLWithString:kIssuer]; - - [self logMessage:@"Fetching configuration for issuer: %@", issuer]; - - // discovers endpoints - [OIDAuthorizationService discoverServiceConfigurationForIssuer:issuer - completion:^(OIDServiceConfiguration *_Nullable configuration, NSError *_Nullable error) { - - if (!configuration) { - [self logMessage:@"Error retrieving discovery document: %@", [error localizedDescription]]; - return; - } - - [self logMessage:@"Got configuration: %@", configuration]; - - if (!kClientID) { - [self doClientRegistration:configuration - callback:^(OIDServiceConfiguration *configuration, - OIDRegistrationResponse *registrationResponse) { - [self doAuthWithoutCodeExchange:configuration - clientID:registrationResponse.clientID - clientSecret:registrationResponse.clientSecret]; - }]; - } else { - [self doAuthWithoutCodeExchange:configuration clientID:kClientID clientSecret:nil]; - } - }]; -} - -- (IBAction)codeExchange:(nullable id)sender { - // performs code exchange request - OIDTokenRequest *tokenExchangeRequest = - [_authState.lastAuthorizationResponse tokenExchangeRequest]; - - [self logMessage:@"Performing authorization code exchange with request [%@]", - tokenExchangeRequest]; - - [OIDAuthorizationService performTokenRequest:tokenExchangeRequest - callback:^(OIDTokenResponse *_Nullable tokenResponse, - NSError *_Nullable error) { - - if (!tokenResponse) { - [self logMessage:@"Token exchange error: %@", [error localizedDescription]]; - } else { - [self logMessage:@"Received token response with accessToken: %@", tokenResponse.accessToken]; - } - - [_authState updateWithTokenResponse:tokenResponse error:error]; - }]; -} - -- (IBAction)clearAuthState:(nullable id)sender { - [self setAuthState:nil]; -} - -- (IBAction)clearLog:(nullable id)sender { - _logTextView.text = @""; -} - -- (IBAction)userinfo:(nullable id)sender { - NSURL *userinfoEndpoint = - _authState.lastAuthorizationResponse.request.configuration.discoveryDocument.userinfoEndpoint; - if (!userinfoEndpoint) { - [self logMessage:@"Userinfo endpoint not declared in discovery document"]; - return; - } - NSString *currentAccessToken = _authState.lastTokenResponse.accessToken; - - [self logMessage:@"Performing userinfo request"]; - - [_authState performActionWithFreshTokens:^(NSString *_Nonnull accessToken, - NSString *_Nonnull idToken, - NSError *_Nullable error) { - if (error) { - [self logMessage:@"Error fetching fresh tokens: %@", [error localizedDescription]]; - return; - } - - // log whether a token refresh occurred - if (![currentAccessToken isEqual:accessToken]) { - [self logMessage:@"Access token was refreshed automatically (%@ to %@)", - currentAccessToken, - accessToken]; - } else { - [self logMessage:@"Access token was fresh and not updated [%@]", accessToken]; - } - - // creates request to the userinfo endpoint, with access token in the Authorization header - NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:userinfoEndpoint]; - NSString *authorizationHeaderValue = [NSString stringWithFormat:@"Bearer %@", accessToken]; - [request addValue:authorizationHeaderValue forHTTPHeaderField:@"Authorization"]; - - NSURLSessionConfiguration *configuration = - [NSURLSessionConfiguration defaultSessionConfiguration]; - NSURLSession *session = [NSURLSession sessionWithConfiguration:configuration - delegate:nil - delegateQueue:nil]; - - // performs HTTP request - NSURLSessionDataTask *postDataTask = - [session dataTaskWithRequest:request - completionHandler:^(NSData *_Nullable data, - NSURLResponse *_Nullable response, - NSError *_Nullable error) { - dispatch_async(dispatch_get_main_queue(), ^() { - if (error) { - [self logMessage:@"HTTP request failed %@", error]; - return; - } - if (![response isKindOfClass:[NSHTTPURLResponse class]]) { - [self logMessage:@"Non-HTTP response"]; - return; - } - - NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)response; - id jsonDictionaryOrArray = - [NSJSONSerialization JSONObjectWithData:data options:0 error:NULL]; - - if (httpResponse.statusCode != 200) { - // server replied with an error - NSString *responseText = [[NSString alloc] initWithData:data - encoding:NSUTF8StringEncoding]; - if (httpResponse.statusCode == 401) { - // "401 Unauthorized" generally indicates there is an issue with the authorization - // grant. Puts OIDAuthState into an error state. - NSError *oauthError = - [OIDErrorUtilities resourceServerAuthorizationErrorWithCode:0 - errorResponse:jsonDictionaryOrArray - underlyingError:error]; - [_authState updateWithAuthorizationError:oauthError]; - // log error - [self logMessage:@"Authorization Error (%@). Response: %@", oauthError, responseText]; - } else { - [self logMessage:@"HTTP: %d. Response: %@", - (int)httpResponse.statusCode, - responseText]; - } - return; - } - - // success response - [self logMessage:@"Success: %@", jsonDictionaryOrArray]; - }); - }]; - - [postDataTask resume]; - }]; -} - -/*! @brief Logs a message to stdout and the textfield. - @param format The format string and arguments. - */ -- (void)logMessage:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2) { - // gets message as string - va_list argp; - va_start(argp, format); - NSString *log = [[NSString alloc] initWithFormat:format arguments:argp]; - va_end(argp); - - // outputs to stdout - NSLog(@"%@", log); - - // appends to output log - NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; - dateFormatter.dateFormat = @"hh:mm:ss"; - NSString *dateString = [dateFormatter stringFromDate:[NSDate date]]; - _logTextView.text = [NSString stringWithFormat:@"%@%@%@: %@", - _logTextView.text, - ([_logTextView.text length] > 0) ? @"\n" : @"", - dateString, - log]; -} - -@end diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/AppAuthExampleViewController.xib b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/AppAuthExampleViewController.xib deleted file mode 100644 index 9eacc2d1..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/AppAuthExampleViewController.xib +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda. - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/AppDelegate.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/AppDelegate.h deleted file mode 100644 index ece00038..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/AppDelegate.h +++ /dev/null @@ -1,38 +0,0 @@ -/*! @file AppDelegate.h - @brief AppAuth iOS SDK Example - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ -#import - -@protocol OIDExternalUserAgentSession; - -/*! @brief The example application's delegate. - */ -@interface AppDelegate : UIResponder - -/*! @brief The sample application's @c UIWindow. - */ -@property(nonatomic, strong, nullable) UIWindow *window; - -/*! @brief The authorization flow session which receives the return URL from \SFSafariViewController. - @discussion We need to store this in the app delegate as it's that delegate which receives the - incoming URL on UIApplicationDelegate.application:openURL:options:. This property will be - nil, except when an authorization flow is in progress. - */ -@property(nonatomic, strong, nullable) id currentAuthorizationFlow; - -@end - diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/AppDelegate.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/AppDelegate.m deleted file mode 100644 index cbf861d4..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/AppDelegate.m +++ /dev/null @@ -1,76 +0,0 @@ -/*! @file AppDelegate.m - @brief AppAuth iOS SDK Example - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "AppDelegate.h" - -#import "AppAuth.h" -#import "AppAuthExampleViewController.h" - -@interface AppDelegate () - -@end - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application - didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - - UIWindow *window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; - UIViewController *mainViewController = - [[AppAuthExampleViewController alloc] initWithNibName:nil bundle:nil]; - window.rootViewController = mainViewController; - - _window = window; - [_window makeKeyAndVisible]; - - return YES; -} - -/*! @brief Handles inbound URLs. Checks if the URL matches the redirect URI for a pending - AppAuth authorization request. - */ -- (BOOL)application:(UIApplication *)app - openURL:(NSURL *)url - options:(NSDictionary *)options { - // Sends the URL to the current authorization flow (if any) which will process it if it relates to - // an authorization response. - if ([_currentAuthorizationFlow resumeExternalUserAgentFlowWithURL:url]) { - _currentAuthorizationFlow = nil; - return YES; - } - - // Your additional URL handling (if any) goes here. - - return NO; -} - -/*! @brief Forwards inbound URLs for iOS 8.x and below to @c application:openURL:options:. - @discussion When you drop support for versions of iOS earlier than 9.0, you can delete this - method. NB. this implementation doesn't forward the sourceApplication or annotations. If you - need these, then you may want @c application:openURL:options to call this method instead. - */ -- (BOOL)application:(UIApplication *)application - openURL:(NSURL *)url - sourceApplication:(NSString *)sourceApplication - annotation:(id)annotation { - return [self application:application - openURL:url - options:@{}]; -} - -@end diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_1024.png b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_1024.png deleted file mode 100644 index 9d74d657..00000000 Binary files a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_1024.png and /dev/null differ diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_120.png b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_120.png deleted file mode 100644 index f73edc78..00000000 Binary files a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_120.png and /dev/null differ diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_152.png b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_152.png deleted file mode 100644 index bdd5de3c..00000000 Binary files a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_152.png and /dev/null differ diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_167.png b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_167.png deleted file mode 100644 index 1bb56407..00000000 Binary files a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_167.png and /dev/null differ diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_180.png b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_180.png deleted file mode 100644 index 17535eb0..00000000 Binary files a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_180.png and /dev/null differ diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_76.png b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_76.png deleted file mode 100644 index dc824d5e..00000000 Binary files a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_76.png and /dev/null differ diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/Assets.xcassets/AppIcon.appiconset/Contents.json b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 0b6ca5ed..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "size" : "20x20", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "20x20", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "AppAuth_Icon_120.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "AppAuth_Icon_180.png", - "scale" : "3x" - }, - { - "idiom" : "ipad", - "size" : "20x20", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "20x20", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "40x40", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "40x40", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "AppAuth_Icon_76.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "AppAuth_Icon_152.png", - "scale" : "2x" - }, - { - "size" : "83.5x83.5", - "idiom" : "ipad", - "filename" : "AppAuth_Icon_167.png", - "scale" : "2x" - }, - { - "size" : "1024x1024", - "idiom" : "ios-marketing", - "filename" : "AppAuth_Icon_1024.png", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/Base.lproj/LaunchScreen.storyboard b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index e9366724..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/Info.plist b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/Info.plist deleted file mode 100644 index 74821a19..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/Info.plist +++ /dev/null @@ -1,69 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - AppAuth iOS - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleURLTypes - - - CFBundleTypeRole - Editor - CFBundleURLSchemes - - com.example.app - - - - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - NSAppTransportSecurity - - NSExceptionDomains - - localhost - - NSExceptionAllowsInsecureHTTPLoads - - - - - - diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/main.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/main.m deleted file mode 100644 index a4890425..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Source/main.m +++ /dev/null @@ -1,30 +0,0 @@ -/*! @file main.m - @brief AppAuth iOS SDK Example - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -#import "AppDelegate.h" - -/*! @brief Application main entry point. - @return Exit code. - */ -int main(int argc, char *argv[]) { - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Tests/AppAuthExampleTests.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Tests/AppAuthExampleTests.m deleted file mode 100644 index 0b5bd403..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Tests/AppAuthExampleTests.m +++ /dev/null @@ -1,43 +0,0 @@ -/*! @file AppAuthExampleTests.m - @brief AppAuth iOS SDK Example Tests - @copyright - Copyright 2017 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -@interface AppAuthExampleTests : XCTestCase - -@end - -@implementation AppAuthExampleTests - -- (void)setUp { - [super setUp]; - // Put setup code here. This method is called before the invocation of each test method in the class. -} - -- (void)tearDown { - // Put teardown code here. This method is called after the invocation of each test method in the class. - [super tearDown]; -} - -/*! @brief A smoke test, just to verify the target builds. - */ -- (void)testBuilt { - XCTAssert(true); -} - -@end diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Tests/Info.plist b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Tests/Info.plist deleted file mode 100644 index 6c6c23c4..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_ObjC/Tests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/.gitignore b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/.gitignore deleted file mode 100644 index 0d5a9388..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/.gitignore +++ /dev/null @@ -1,40 +0,0 @@ -## Build generated -build/ -DerivedData/ - -## Various settings -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata/ - -## Other -*.moved-aside -*.xccheckout -*.xcscmblueprint - -## Obj-C/Swift specific -*.hmap -*.ipa -*.dSYM.zip -*.dSYM - -# Pods are ignored in the samples as all Pods & their dependencies are either -# development Pods (this repo) or sourced from repos in the same organization. -# Generally we recommend committing Pod artifacts to version control, read about -# the pros & cons here: -# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control -Pods - -# Carthage -# -# Add these lines if you want to avoid checking in source code from Carthage -# dependencies. Generally we recommend committing Carthage artifacts to version -# control. -Carthage/Checkouts -Carthage/Build diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Cartfile b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Cartfile deleted file mode 100644 index 5cb5fda2..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Cartfile +++ /dev/null @@ -1,2 +0,0 @@ -github "openid/AppAuth-iOS" "master" - diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Example.xcodeproj/project.pbxproj b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Example.xcodeproj/project.pbxproj deleted file mode 100644 index 825c2a30..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Example.xcodeproj/project.pbxproj +++ /dev/null @@ -1,365 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 48; - objects = { - -/* Begin PBXBuildFile section */ - 9F265BD11F9AC69300DC14BF /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9F265BC91F9AC69300DC14BF /* Assets.xcassets */; }; - 9F265BD31F9AC69300DC14BF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9F265BCB1F9AC69300DC14BF /* LaunchScreen.storyboard */; }; - 9F265BD41F9AC69300DC14BF /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9F265BCD1F9AC69300DC14BF /* Main.storyboard */; }; - 9F265BD51F9AC69300DC14BF /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F265BCF1F9AC69300DC14BF /* AppDelegate.swift */; }; - 9F265BDA1F9AE50400DC14BF /* AppAuth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9F265BD91F9AE50400DC14BF /* AppAuth.framework */; }; - 9FD378231FB7C6F800436204 /* AppAuthExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FD378221FB7C6F800436204 /* AppAuthExampleViewController.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 9F265B971F9AC5D600DC14BF /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 9F265BC91F9AC69300DC14BF /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 9F265BCC1F9AC69300DC14BF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 9F265BCE1F9AC69300DC14BF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 9F265BCF1F9AC69300DC14BF /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 9F265BD01F9AC69300DC14BF /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 9F265BD91F9AE50400DC14BF /* AppAuth.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppAuth.framework; path = Carthage/Build/iOS/AppAuth.framework; sourceTree = ""; }; - 9FD378221FB7C6F800436204 /* AppAuthExampleViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppAuthExampleViewController.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 9F265B941F9AC5D600DC14BF /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 9F265BDA1F9AE50400DC14BF /* AppAuth.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 9F265B8E1F9AC5D600DC14BF = { - isa = PBXGroup; - children = ( - 9F265BC81F9AC69300DC14BF /* Source */, - 9F265BD81F9AE4CA00DC14BF /* Frameworks */, - 9F265B981F9AC5D600DC14BF /* Products */, - ); - sourceTree = ""; - }; - 9F265B981F9AC5D600DC14BF /* Products */ = { - isa = PBXGroup; - children = ( - 9F265B971F9AC5D600DC14BF /* Example.app */, - ); - name = Products; - sourceTree = ""; - }; - 9F265BC81F9AC69300DC14BF /* Source */ = { - isa = PBXGroup; - children = ( - 9F265BCF1F9AC69300DC14BF /* AppDelegate.swift */, - 9FD378221FB7C6F800436204 /* AppAuthExampleViewController.swift */, - 9F265BCB1F9AC69300DC14BF /* LaunchScreen.storyboard */, - 9F265BCD1F9AC69300DC14BF /* Main.storyboard */, - 9F265BC91F9AC69300DC14BF /* Assets.xcassets */, - 9F265BD01F9AC69300DC14BF /* Info.plist */, - ); - path = Source; - sourceTree = ""; - }; - 9F265BD81F9AE4CA00DC14BF /* Frameworks */ = { - isa = PBXGroup; - children = ( - 9F265BD91F9AE50400DC14BF /* AppAuth.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 9F265B961F9AC5D600DC14BF /* Example */ = { - isa = PBXNativeTarget; - buildConfigurationList = 9F265BBF1F9AC5D600DC14BF /* Build configuration list for PBXNativeTarget "Example" */; - buildPhases = ( - 9F265B931F9AC5D600DC14BF /* Sources */, - 9F265B941F9AC5D600DC14BF /* Frameworks */, - 9F265B951F9AC5D600DC14BF /* Resources */, - 9F265BDB1F9AE52C00DC14BF /* ShellScript */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Example; - productName = Example; - productReference = 9F265B971F9AC5D600DC14BF /* Example.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 9F265B8F1F9AC5D600DC14BF /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0900; - LastUpgradeCheck = 0900; - ORGANIZATIONNAME = "Google Inc."; - TargetAttributes = { - 9F265B961F9AC5D600DC14BF = { - CreatedOnToolsVersion = 9.0.1; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = 9F265B921F9AC5D600DC14BF /* Build configuration list for PBXProject "Example" */; - compatibilityVersion = "Xcode 8.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 9F265B8E1F9AC5D600DC14BF; - productRefGroup = 9F265B981F9AC5D600DC14BF /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 9F265B961F9AC5D600DC14BF /* Example */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 9F265B951F9AC5D600DC14BF /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 9F265BD41F9AC69300DC14BF /* Main.storyboard in Resources */, - 9F265BD11F9AC69300DC14BF /* Assets.xcassets in Resources */, - 9F265BD31F9AC69300DC14BF /* LaunchScreen.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 9F265BDB1F9AE52C00DC14BF /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "$(SRCROOT)/Carthage/Build/iOS/AppAuth.framework", - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/usr/local/bin/carthage copy-frameworks"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 9F265B931F9AC5D600DC14BF /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 9FD378231FB7C6F800436204 /* AppAuthExampleViewController.swift in Sources */, - 9F265BD51F9AC69300DC14BF /* AppDelegate.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 9F265BCB1F9AC69300DC14BF /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 9F265BCC1F9AC69300DC14BF /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; - 9F265BCD1F9AC69300DC14BF /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 9F265BCE1F9AC69300DC14BF /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 9F265BBD1F9AC5D600DC14BF /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - 9F265BBE1F9AC5D600DC14BF /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 9F265BC01F9AC5D600DC14BF /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_STYLE = Automatic; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); - INFOPLIST_FILE = Source/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = net.openid.appauth.Example; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 9F265BC11F9AC5D600DC14BF /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_STYLE = Automatic; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); - INFOPLIST_FILE = Source/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = net.openid.appauth.Example; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 9F265B921F9AC5D600DC14BF /* Build configuration list for PBXProject "Example" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 9F265BBD1F9AC5D600DC14BF /* Debug */, - 9F265BBE1F9AC5D600DC14BF /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 9F265BBF1F9AC5D600DC14BF /* Build configuration list for PBXNativeTarget "Example" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 9F265BC01F9AC5D600DC14BF /* Debug */, - 9F265BC11F9AC5D600DC14BF /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 9F265B8F1F9AC5D600DC14BF /* Project object */; -} diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/README.md b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/README.md deleted file mode 100644 index 8eb120fb..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/README.md +++ /dev/null @@ -1,45 +0,0 @@ -# Example Project - -## Setup & Open the Project - -You'll need to have [Carthage](https://github.com/Carthage/Carthage) installed -in order to pull the AppAuth dependency. - -So first run `carthage bootstrap` to build AppAuth framework then open the -`Example.xcodeproj` file. - -## Configuration - -The example doesn't work out of the box, you need to configure it with your own -client ID. - -### Information You'll Need - -* Issuer -* Client ID -* Redirect URI - -How to get this information varies by IdP, but we have -[instructions](../README.md#openid-certified-providers) for some OpenID -Certified providers. - -### Configure the Example - -#### In the file `AppAuthExampleViewController.swift` - -1. Update `kIssuer` with the IdP's issuer. -2. Update `kClientID` with your new client id. -3. Update `kRedirectURI` redirect URI - -#### In the file `Info.plist` - -Fully expand "URL types" (a.k.a. `CFBundleURLTypes`) and replace -`com.example.app` with the *scheme* of your redirect URI. -The scheme is everything before the colon (`:`). For example, if the redirect -URI is `com.example.app:/oauth2redirect/example-provider`, then the scheme -would be `com.example.app`. - -### Running the Example - -Now your example should be ready to run. - diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Source/AppAuthExampleViewController.swift b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Source/AppAuthExampleViewController.swift deleted file mode 100644 index c8845974..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Source/AppAuthExampleViewController.swift +++ /dev/null @@ -1,528 +0,0 @@ -// -// AppAuthExampleViewController.swift -// -// Copyright (c) 2017 The AppAuth Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import AppAuth -import UIKit - -typealias PostRegistrationCallback = (_ configuration: OIDServiceConfiguration?, _ registrationResponse: OIDRegistrationResponse?) -> Void - -/** - The OIDC issuer from which the configuration will be discovered. -*/ -let kIssuer: String = "https://issuer.example.com"; - -/** - The OAuth client ID. - - For client configuration instructions, see the [README](https://github.com/openid/AppAuth-iOS/blob/master/Examples/Example-iOS_Swift-Carthage/README.md). - Set to nil to use dynamic registration with this example. -*/ -let kClientID: String? = "YOUR_CLIENT_ID"; - -/** - The OAuth redirect URI for the client @c kClientID. - - For client configuration instructions, see the [README](https://github.com/openid/AppAuth-iOS/blob/master/Examples/Example-iOS_Swift-Carthage/README.md). -*/ -let kRedirectURI: String = "com.example.app:/oauth2redirect/example-provider"; - -/** - NSCoding key for the authState property. -*/ -let kAppAuthExampleAuthStateKey: String = "authState"; - - -class AppAuthExampleViewController: UIViewController { - - @IBOutlet private weak var authAutoButton: UIButton! - @IBOutlet private weak var authManual: UIButton! - @IBOutlet private weak var codeExchangeButton: UIButton! - @IBOutlet private weak var userinfoButton: UIButton! - @IBOutlet private weak var logTextView: UITextView! - @IBOutlet private weak var trashButton: UIBarButtonItem! - - private var authState: OIDAuthState? - - override func viewDidLoad() { - super.viewDidLoad() - - self.validateOAuthConfiguration() - - self.loadState() - self.updateUI() - } -} - -extension AppAuthExampleViewController { - - func validateOAuthConfiguration() { - - // The example needs to be configured with your own client details. - // See: https://github.com/openid/AppAuth-iOS/blob/master/Examples/Example-iOS_Swift-Carthage/README.md - - assert(kIssuer != "https://issuer.example.com", - "Update kIssuer with your own issuer.\n" + - "Instructions: https://github.com/openid/AppAuth-iOS/blob/master/Examples/Example-iOS_Swift-Carthage/README.md"); - - assert(kClientID != "YOUR_CLIENT_ID", - "Update kClientID with your own client ID.\n" + - "Instructions: https://github.com/openid/AppAuth-iOS/blob/master/Examples/Example-iOS_Swift-Carthage/README.md"); - - assert(kRedirectURI != "com.example.app:/oauth2redirect/example-provider", - "Update kRedirectURI with your own redirect URI.\n" + - "Instructions: https://github.com/openid/AppAuth-iOS/blob/master/Examples/Example-iOS_Swift-Carthage/README.md"); - - // verifies that the custom URI scheme has been updated in the Info.plist - guard let urlTypes: [AnyObject] = Bundle.main.object(forInfoDictionaryKey: "CFBundleURLTypes") as? [AnyObject], urlTypes.count > 0 else { - assertionFailure("No custom URI scheme has been configured for the project.") - return - } - - guard let items = urlTypes[0] as? [String: AnyObject], - let urlSchemes = items["CFBundleURLSchemes"] as? [AnyObject], urlSchemes.count > 0 else { - assertionFailure("No custom URI scheme has been configured for the project.") - return - } - - guard let urlScheme = urlSchemes[0] as? String else { - assertionFailure("No custom URI scheme has been configured for the project.") - return - } - - assert(urlScheme != "com.example.app", - "Configure the URI scheme in Info.plist (URL Types -> Item 0 -> URL Schemes -> Item 0) " + - "with the scheme of your redirect URI. Full instructions: " + - "https://github.com/openid/AppAuth-iOS/blob/master/Examples/Example-iOS_Swift-Carthage/README.md") - } - -} - -//MARK: IBActions -extension AppAuthExampleViewController { - - @IBAction func authWithAutoCodeExchange(_ sender: UIButton) { - - guard let issuer = URL(string: kIssuer) else { - self.logMessage("Error creating URL for : \(kIssuer)") - return - } - - self.logMessage("Fetching configuration for issuer: \(issuer)") - - // discovers endpoints - OIDAuthorizationService.discoverConfiguration(forIssuer: issuer) { configuration, error in - - guard let config = configuration else { - self.logMessage("Error retrieving discovery document: \(error?.localizedDescription ?? "DEFAULT_ERROR")") - self.setAuthState(nil) - return - } - - self.logMessage("Got configuration: \(config)") - - if let clientId = kClientID { - self.doAuthWithAutoCodeExchange(configuration: config, clientID: clientId, clientSecret: nil) - } else { - self.doClientRegistration(configuration: config) { configuration, response in - - guard let configuration = configuration, let clientID = response?.clientID else { - self.logMessage("Error retrieving configuration OR clientID") - return - } - - self.doAuthWithAutoCodeExchange(configuration: configuration, - clientID: clientID, - clientSecret: response?.clientSecret) - } - } - } - - } - - @IBAction func authNoCodeExchange(_ sender: UIButton) { - - guard let issuer = URL(string: kIssuer) else { - self.logMessage("Error creating URL for : \(kIssuer)") - return - } - - self.logMessage("Fetching configuration for issuer: \(issuer)") - - OIDAuthorizationService.discoverConfiguration(forIssuer: issuer) { configuration, error in - - if let error = error { - self.logMessage("Error retrieving discovery document: \(error.localizedDescription)") - return - } - - guard let configuration = configuration else { - self.logMessage("Error retrieving discovery document. Error & Configuration both are NIL!") - return - } - - self.logMessage("Got configuration: \(configuration)") - - if let clientId = kClientID { - - self.doAuthWithoutCodeExchange(configuration: configuration, clientID: clientId, clientSecret: nil) - - } else { - - self.doClientRegistration(configuration: configuration) { configuration, response in - - guard let configuration = configuration, let response = response else { - return - } - - self.doAuthWithoutCodeExchange(configuration: configuration, - clientID: response.clientID, - clientSecret: response.clientSecret) - } - } - } - } - - @IBAction func codeExchange(_ sender: UIButton) { - - guard let tokenExchangeRequest = self.authState?.lastAuthorizationResponse.tokenExchangeRequest() else { - self.logMessage("Error creating authorization code exchange request") - return - } - - self.logMessage("Performing authorization code exchange with request \(tokenExchangeRequest)") - - OIDAuthorizationService.perform(tokenExchangeRequest) { response, error in - - if let tokenResponse = response { - self.logMessage("Received token response with accessToken: \(tokenResponse.accessToken ?? "DEFAULT_TOKEN")") - } else { - self.logMessage("Token exchange error: \(error?.localizedDescription ?? "DEFAULT_ERROR")") - } - self.authState?.update(with: response, error: error) - } - } - - @IBAction func userinfo(_ sender: UIButton) { - - guard let userinfoEndpoint = self.authState?.lastAuthorizationResponse.request.configuration.discoveryDocument?.userinfoEndpoint else { - self.logMessage("Userinfo endpoint not declared in discovery document") - return - } - - self.logMessage("Performing userinfo request") - - let currentAccessToken: String? = self.authState?.lastTokenResponse?.accessToken - - self.authState?.performAction() { (accessToken, idTOken, error) in - - if error != nil { - self.logMessage("Error fetching fresh tokens: \(error?.localizedDescription ?? "ERROR")") - return - } - - guard let accessToken = accessToken else { - self.logMessage("Error getting accessToken") - return - } - - if currentAccessToken != accessToken { - self.logMessage("Access token was refreshed automatically (\(currentAccessToken ?? "CURRENT_ACCESS_TOKEN") to \(accessToken))") - } else { - self.logMessage("Access token was fresh and not updated \(accessToken)") - } - - var urlRequest = URLRequest(url: userinfoEndpoint) - urlRequest.allHTTPHeaderFields = ["Authorization":"Bearer \(accessToken)"] - - let task = URLSession.shared.dataTask(with: urlRequest) { data, response, error in - - DispatchQueue.main.async { - - guard error == nil else { - self.logMessage("HTTP request failed \(error?.localizedDescription ?? "ERROR")") - return - } - - guard let response = response as? HTTPURLResponse else { - self.logMessage("Non-HTTP response") - return - } - - guard let data = data else { - self.logMessage("HTTP response data is empty") - return - } - - var json: [AnyHashable: Any]? - - do { - json = try JSONSerialization.jsonObject(with: data, options: []) as? [String: Any] - } catch { - self.logMessage("JSON Serialization Error") - } - - if response.statusCode != 200 { - // server replied with an error - let responseText: String? = String(data: data, encoding: String.Encoding.utf8) - - if response.statusCode == 401 { - // "401 Unauthorized" generally indicates there is an issue with the authorization - // grant. Puts OIDAuthState into an error state. - let oauthError = OIDErrorUtilities.resourceServerAuthorizationError(withCode: 0, - errorResponse: json, - underlyingError: error) - self.authState?.update(withAuthorizationError: oauthError) - self.logMessage("Authorization Error (\(oauthError)). Response: \(responseText ?? "RESPONSE_TEXT")") - } else { - self.logMessage("HTTP: \(response.statusCode), Response: \(responseText ?? "RESPONSE_TEXT")") - } - - return - } - - if let json = json { - self.logMessage("Success: \(json)") - } - } - } - - task.resume() - } - } - - @IBAction func trashClicked(_ sender: UIBarButtonItem) { - - let alert = UIAlertController(title: nil, - message: nil, - preferredStyle: UIAlertControllerStyle.actionSheet) - - let clearAuthAction = UIAlertAction(title: "Clear OAuthState", style: .destructive) { (_: UIAlertAction) in - self.setAuthState(nil) - self.updateUI() - } - alert.addAction(clearAuthAction) - - let clearLogs = UIAlertAction(title: "Clear Logs", style: .default) { (_: UIAlertAction) in - DispatchQueue.main.async { - self.logTextView.text = "" - } - } - - let cancelAction = UIAlertAction(title: "Cancel", style: .cancel, handler: nil) - - - alert.addAction(clearLogs) - alert.addAction(cancelAction) - self.present(alert, animated: true, completion: nil) - - } -} - -//MARK: AppAuth Methods -extension AppAuthExampleViewController { - - func doClientRegistration(configuration: OIDServiceConfiguration, callback: @escaping PostRegistrationCallback) { - - guard let redirectURI = URL(string: kRedirectURI) else { - self.logMessage("Error creating URL for : \(kRedirectURI)") - return - } - - let request: OIDRegistrationRequest = OIDRegistrationRequest(configuration: configuration, - redirectURIs: [redirectURI], - responseTypes: nil, - grantTypes: nil, - subjectType: nil, - tokenEndpointAuthMethod: "client_secret_post", - additionalParameters: nil) - - // performs registration request - self.logMessage("Initiating registration request") - - OIDAuthorizationService.perform(request) { response, error in - - if let regResponse = response { - self.setAuthState(OIDAuthState(registrationResponse: regResponse)) - self.logMessage("Got registration response: \(regResponse)") - callback(configuration, regResponse) - } else { - self.logMessage("Registration error: \(error?.localizedDescription ?? "DEFAULT_ERROR")") - self.setAuthState(nil) - } - } - } - - func doAuthWithAutoCodeExchange(configuration: OIDServiceConfiguration, clientID: String, clientSecret: String?) { - - guard let redirectURI = URL(string: kRedirectURI) else { - self.logMessage("Error creating URL for : \(kRedirectURI)") - return - } - - guard let appDelegate = UIApplication.shared.delegate as? AppDelegate else { - self.logMessage("Error accessing AppDelegate") - return - } - - // builds authentication request - let request = OIDAuthorizationRequest(configuration: configuration, - clientId: clientID, - clientSecret: clientSecret, - scopes: [OIDScopeOpenID, OIDScopeProfile], - redirectURL: redirectURI, - responseType: OIDResponseTypeCode, - additionalParameters: nil) - - // performs authentication request - logMessage("Initiating authorization request with scope: \(request.scope ?? "DEFAULT_SCOPE")") - - appDelegate.currentAuthorizationFlow = OIDAuthState.authState(byPresenting: request, presenting: self) { authState, error in - - if let authState = authState { - self.setAuthState(authState) - self.logMessage("Got authorization tokens. Access token: \(authState.lastTokenResponse?.accessToken ?? "DEFAULT_TOKEN")") - } else { - self.logMessage("Authorization error: \(error?.localizedDescription ?? "DEFAULT_ERROR")") - self.setAuthState(nil) - } - } - } - - func doAuthWithoutCodeExchange(configuration: OIDServiceConfiguration, clientID: String, clientSecret: String?) { - - guard let redirectURI = URL(string: kRedirectURI) else { - self.logMessage("Error creating URL for : \(kRedirectURI)") - return - } - - guard let appDelegate = UIApplication.shared.delegate as? AppDelegate else { - self.logMessage("Error accessing AppDelegate") - return - } - - // builds authentication request - let request = OIDAuthorizationRequest(configuration: configuration, - clientId: clientID, - clientSecret: clientSecret, - scopes: [OIDScopeOpenID, OIDScopeProfile], - redirectURL: redirectURI, - responseType: OIDResponseTypeCode, - additionalParameters: nil) - - // performs authentication request - logMessage("Initiating authorization request with scope: \(request.scope ?? "DEFAULT_SCOPE")") - - appDelegate.currentAuthorizationFlow = OIDAuthorizationService.present(request, presenting: self) { (response, error) in - - if let response = response { - let authState = OIDAuthState(authorizationResponse: response) - self.setAuthState(authState) - self.logMessage("Authorization response with code: \(response.authorizationCode ?? "DEFAULT_CODE")") - // could just call [self tokenExchange:nil] directly, but will let the user initiate it. - } else { - self.logMessage("Authorization error: \(error?.localizedDescription ?? "DEFAULT_ERROR")") - } - } - } -} - -//MARK: OIDAuthState Delegate -extension AppAuthExampleViewController: OIDAuthStateChangeDelegate, OIDAuthStateErrorDelegate { - - func didChange(_ state: OIDAuthState) { - self.stateChanged() - } - - func authState(_ state: OIDAuthState, didEncounterAuthorizationError error: Error) { - self.logMessage("Received authorization error: \(error)") - } -} - -//MARK: Helper Methods -extension AppAuthExampleViewController { - - func saveState() { - - var data: Data? = nil - - if let authState = self.authState { - data = NSKeyedArchiver.archivedData(withRootObject: authState) - } - - UserDefaults.standard.set(data, forKey: kAppAuthExampleAuthStateKey) - UserDefaults.standard.synchronize() - } - - func loadState() { - guard let data = UserDefaults.standard.object(forKey: kAppAuthExampleAuthStateKey) as? Data else { - return - } - - if let authState = NSKeyedUnarchiver.unarchiveObject(with: data) as? OIDAuthState { - self.setAuthState(authState) - } - } - - func setAuthState(_ authState: OIDAuthState?) { - if (self.authState == authState) { - return; - } - self.authState = authState; - self.authState?.stateChangeDelegate = self; - self.stateChanged() - } - - func updateUI() { - - self.codeExchangeButton.isEnabled = self.authState?.lastAuthorizationResponse.authorizationCode != nil && !((self.authState?.lastTokenResponse) != nil) - - if let authState = self.authState { - self.authAutoButton.setTitle("1. Re-Auth", for: .normal) - self.authManual.setTitle("1(A) Re-Auth", for: .normal) - self.userinfoButton.isEnabled = authState.isAuthorized ? true : false - } else { - self.authAutoButton.setTitle("1. Auto", for: .normal) - self.authManual.setTitle("1(A) Manual", for: .normal) - self.userinfoButton.isEnabled = false - } - } - - func stateChanged() { - self.saveState() - self.updateUI() - } - - func logMessage(_ message: String?) { - - guard let message = message else { - return - } - - print(message); - - let dateFormatter = DateFormatter() - dateFormatter.dateFormat = "hh:mm:ss"; - let dateString = dateFormatter.string(from: Date()) - - // appends to output log - DispatchQueue.main.async { - let logText = "\(self.logTextView.text ?? "")\n\(dateString): \(message)" - self.logTextView.text = logText - } - } -} diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Source/AppDelegate.swift b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Source/AppDelegate.swift deleted file mode 100644 index 070c3d71..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Source/AppDelegate.swift +++ /dev/null @@ -1,44 +0,0 @@ -// -// AppDelegate.swift -// -// Copyright (c) 2017 The AppAuth Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import AppAuth -import UIKit - -@UIApplicationMain -class AppDelegate: UIResponder, UIApplicationDelegate { - - var window: UIWindow? - var currentAuthorizationFlow: OIDExternalUserAgentSession? - - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { - // Override point for customization after application launch. - return true - } - - func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool { - - if let authorizationFlow = self.currentAuthorizationFlow, authorizationFlow.resumeExternalUserAgentFlow(with: url) { - self.currentAuthorizationFlow = nil - return true - } - - return false - } - -} - diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_1024.png b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_1024.png deleted file mode 100644 index 9d74d657..00000000 Binary files a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_1024.png and /dev/null differ diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_120.png b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_120.png deleted file mode 100644 index f73edc78..00000000 Binary files a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_120.png and /dev/null differ diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_152.png b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_152.png deleted file mode 100644 index bdd5de3c..00000000 Binary files a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_152.png and /dev/null differ diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_167.png b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_167.png deleted file mode 100644 index 1bb56407..00000000 Binary files a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_167.png and /dev/null differ diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_180.png b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_180.png deleted file mode 100644 index 17535eb0..00000000 Binary files a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_180.png and /dev/null differ diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_76.png b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_76.png deleted file mode 100644 index dc824d5e..00000000 Binary files a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_Icon_76.png and /dev/null differ diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Source/Assets.xcassets/AppIcon.appiconset/Contents.json b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Source/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 0b6ca5ed..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Source/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "size" : "20x20", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "20x20", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "AppAuth_Icon_120.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "AppAuth_Icon_180.png", - "scale" : "3x" - }, - { - "idiom" : "ipad", - "size" : "20x20", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "20x20", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "40x40", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "40x40", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "AppAuth_Icon_76.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "AppAuth_Icon_152.png", - "scale" : "2x" - }, - { - "size" : "83.5x83.5", - "idiom" : "ipad", - "filename" : "AppAuth_Icon_167.png", - "scale" : "2x" - }, - { - "size" : "1024x1024", - "idiom" : "ios-marketing", - "filename" : "AppAuth_Icon_1024.png", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Source/Base.lproj/LaunchScreen.storyboard b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Source/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f83f6fd5..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Source/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Source/Base.lproj/Main.storyboard b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Source/Base.lproj/Main.storyboard deleted file mode 100644 index e85c973e..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Source/Base.lproj/Main.storyboard +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Source/Info.plist b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Source/Info.plist deleted file mode 100644 index 7df6bc8c..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-iOS_Swift-Carthage/Source/Info.plist +++ /dev/null @@ -1,56 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleURLTypes - - - CFBundleTypeRole - Editor - CFBundleURLSchemes - - com.example.app - - - - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/.gitignore b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/.gitignore deleted file mode 100644 index 42a22df4..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -## Build generated -build/ -DerivedData/ - -## Various settings -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata/ - -## Other -*.moved-aside -*.xcuserstate - -# Pods are ignored in the samples as all Pods & their dependencies are either -# development Pods (this repo) or sourced from repos in the same organization. -# Generally we recommend versioning Pods, see the pros & cons here: -# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control -Pods diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Example-macOS.xcodeproj/project.pbxproj b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Example-macOS.xcodeproj/project.pbxproj deleted file mode 100644 index 8990ba02..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Example-macOS.xcodeproj/project.pbxproj +++ /dev/null @@ -1,499 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 341AA4C31E7F2E5000FCA5C6 /* AppAuthExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 341AA4C21E7F2E5000FCA5C6 /* AppAuthExampleTests.m */; }; - EFEF6E9CC6F12EA4870987D5 /* libPods-Example-macOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FED92DEDC2639A35907A5D4D /* libPods-Example-macOS.a */; }; - F6016E951D2BD988003497D7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F6016E8B1D2BD988003497D7 /* AppDelegate.m */; }; - F6016E971D2BD988003497D7 /* AppAuthExampleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F6016E8D1D2BD988003497D7 /* AppAuthExampleViewController.m */; }; - F6016E981D2BD988003497D7 /* AppAuthExampleViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6016E8F1D2BD988003497D7 /* AppAuthExampleViewController.xib */; }; - F6016E991D2BD988003497D7 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6016E911D2BD988003497D7 /* MainMenu.xib */; }; - F6016E9A1D2BD988003497D7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = F6016E931D2BD988003497D7 /* main.m */; }; - F6016E9C1D2BD9C0003497D7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F6016E9B1D2BD9C0003497D7 /* Assets.xcassets */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 341AA4C51E7F2E5000FCA5C6 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = F6016E681D2AC11E003497D7 /* Project object */; - proxyType = 1; - remoteGlobalIDString = F6016E6F1D2AC11F003497D7; - remoteInfo = "Example-macOS"; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 341AA4C01E7F2E5000FCA5C6 /* Example-macOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Example-macOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - 341AA4C21E7F2E5000FCA5C6 /* AppAuthExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppAuthExampleTests.m; sourceTree = ""; }; - 341AA4C41E7F2E5000FCA5C6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 60553B3AB5BA3E1BB259E487 /* Pods-Example-macOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example-macOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-Example-macOS/Pods-Example-macOS.release.xcconfig"; sourceTree = ""; }; - 7FF583C8F7036437BE8875B3 /* Pods-Example-macOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example-macOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Example-macOS/Pods-Example-macOS.debug.xcconfig"; sourceTree = ""; }; - F6016E701D2AC11F003497D7 /* Example-macOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Example-macOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - F6016E8B1D2BD988003497D7 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Source/AppDelegate.m; sourceTree = ""; }; - F6016E8D1D2BD988003497D7 /* AppAuthExampleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppAuthExampleViewController.m; path = Source/AppAuthExampleViewController.m; sourceTree = ""; }; - F6016E8E1D2BD988003497D7 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Source/AppDelegate.h; sourceTree = ""; }; - F6016E901D2BD988003497D7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Source/Base.lproj/AppAuthExampleViewController.xib; sourceTree = ""; }; - F6016E921D2BD988003497D7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Source/Base.lproj/MainMenu.xib; sourceTree = ""; }; - F6016E931D2BD988003497D7 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Source/main.m; sourceTree = ""; }; - F6016E941D2BD988003497D7 /* AppAuthExampleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppAuthExampleViewController.h; path = Source/AppAuthExampleViewController.h; sourceTree = ""; }; - F6016E9B1D2BD9C0003497D7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Source/Assets.xcassets; sourceTree = ""; }; - F6016E9D1D2BD9C7003497D7 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Source/Info.plist; sourceTree = ""; }; - FED92DEDC2639A35907A5D4D /* libPods-Example-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Example-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 341AA4BD1E7F2E5000FCA5C6 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - F6016E6D1D2AC11F003497D7 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - EFEF6E9CC6F12EA4870987D5 /* libPods-Example-macOS.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 186006823FF563B11A81B036 /* Pods */ = { - isa = PBXGroup; - children = ( - 7FF583C8F7036437BE8875B3 /* Pods-Example-macOS.debug.xcconfig */, - 60553B3AB5BA3E1BB259E487 /* Pods-Example-macOS.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; - 27454E5D219A9EBB94F74197 /* Frameworks */ = { - isa = PBXGroup; - children = ( - FED92DEDC2639A35907A5D4D /* libPods-Example-macOS.a */, - ); - name = Frameworks; - sourceTree = ""; - }; - 341AA4C11E7F2E5000FCA5C6 /* Tests */ = { - isa = PBXGroup; - children = ( - 341AA4C21E7F2E5000FCA5C6 /* AppAuthExampleTests.m */, - 341AA4C41E7F2E5000FCA5C6 /* Info.plist */, - ); - path = Tests; - sourceTree = ""; - }; - F6016E671D2AC11E003497D7 = { - isa = PBXGroup; - children = ( - F6016E8A1D2BD973003497D7 /* Source */, - 341AA4C11E7F2E5000FCA5C6 /* Tests */, - F6016E711D2AC11F003497D7 /* Products */, - 186006823FF563B11A81B036 /* Pods */, - 27454E5D219A9EBB94F74197 /* Frameworks */, - ); - sourceTree = ""; - }; - F6016E711D2AC11F003497D7 /* Products */ = { - isa = PBXGroup; - children = ( - F6016E701D2AC11F003497D7 /* Example-macOS.app */, - 341AA4C01E7F2E5000FCA5C6 /* Example-macOSTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - F6016E8A1D2BD973003497D7 /* Source */ = { - isa = PBXGroup; - children = ( - F6016E9D1D2BD9C7003497D7 /* Info.plist */, - F6016E8E1D2BD988003497D7 /* AppDelegate.h */, - F6016E8B1D2BD988003497D7 /* AppDelegate.m */, - F6016E941D2BD988003497D7 /* AppAuthExampleViewController.h */, - F6016E8D1D2BD988003497D7 /* AppAuthExampleViewController.m */, - F6016E8F1D2BD988003497D7 /* AppAuthExampleViewController.xib */, - F6016E911D2BD988003497D7 /* MainMenu.xib */, - F6016E9B1D2BD9C0003497D7 /* Assets.xcassets */, - F6016E931D2BD988003497D7 /* main.m */, - ); - name = Source; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 341AA4BF1E7F2E5000FCA5C6 /* Example-macOSTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 341AA4C91E7F2E5000FCA5C6 /* Build configuration list for PBXNativeTarget "Example-macOSTests" */; - buildPhases = ( - 341AA4BC1E7F2E5000FCA5C6 /* Sources */, - 341AA4BD1E7F2E5000FCA5C6 /* Frameworks */, - 341AA4BE1E7F2E5000FCA5C6 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 341AA4C61E7F2E5000FCA5C6 /* PBXTargetDependency */, - ); - name = "Example-macOSTests"; - productName = "Example-macOSTests"; - productReference = 341AA4C01E7F2E5000FCA5C6 /* Example-macOSTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - F6016E6F1D2AC11F003497D7 /* Example-macOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = F6016E811D2AC11F003497D7 /* Build configuration list for PBXNativeTarget "Example-macOS" */; - buildPhases = ( - C9395BB900D0A44A3F7EB0BE /* [CP] Check Pods Manifest.lock */, - F6016E6C1D2AC11F003497D7 /* Sources */, - F6016E6D1D2AC11F003497D7 /* Frameworks */, - F6016E6E1D2AC11F003497D7 /* Resources */, - 52872C7E76CB3EA69F4392F7 /* [CP] Embed Pods Frameworks */, - 1C5B2EF60536044DE119E500 /* [CP] Copy Pods Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "Example-macOS"; - productName = "Example-macOS"; - productReference = F6016E701D2AC11F003497D7 /* Example-macOS.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - F6016E681D2AC11E003497D7 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0730; - ORGANIZATIONNAME = Google; - TargetAttributes = { - 341AA4BF1E7F2E5000FCA5C6 = { - CreatedOnToolsVersion = 8.2.1; - ProvisioningStyle = Automatic; - TestTargetID = F6016E6F1D2AC11F003497D7; - }; - F6016E6F1D2AC11F003497D7 = { - CreatedOnToolsVersion = 7.3.1; - }; - }; - }; - buildConfigurationList = F6016E6B1D2AC11E003497D7 /* Build configuration list for PBXProject "Example-macOS" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = F6016E671D2AC11E003497D7; - productRefGroup = F6016E711D2AC11F003497D7 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - F6016E6F1D2AC11F003497D7 /* Example-macOS */, - 341AA4BF1E7F2E5000FCA5C6 /* Example-macOSTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 341AA4BE1E7F2E5000FCA5C6 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - F6016E6E1D2AC11F003497D7 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - F6016E981D2BD988003497D7 /* AppAuthExampleViewController.xib in Resources */, - F6016E9C1D2BD9C0003497D7 /* Assets.xcassets in Resources */, - F6016E991D2BD988003497D7 /* MainMenu.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 1C5B2EF60536044DE119E500 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Example-macOS/Pods-Example-macOS-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 52872C7E76CB3EA69F4392F7 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Example-macOS/Pods-Example-macOS-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - C9395BB900D0A44A3F7EB0BE /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 341AA4BC1E7F2E5000FCA5C6 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 341AA4C31E7F2E5000FCA5C6 /* AppAuthExampleTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - F6016E6C1D2AC11F003497D7 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - F6016E951D2BD988003497D7 /* AppDelegate.m in Sources */, - F6016E9A1D2BD988003497D7 /* main.m in Sources */, - F6016E971D2BD988003497D7 /* AppAuthExampleViewController.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 341AA4C61E7F2E5000FCA5C6 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = F6016E6F1D2AC11F003497D7 /* Example-macOS */; - targetProxy = 341AA4C51E7F2E5000FCA5C6 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - F6016E8F1D2BD988003497D7 /* AppAuthExampleViewController.xib */ = { - isa = PBXVariantGroup; - children = ( - F6016E901D2BD988003497D7 /* Base */, - ); - name = AppAuthExampleViewController.xib; - sourceTree = ""; - }; - F6016E911D2BD988003497D7 /* MainMenu.xib */ = { - isa = PBXVariantGroup; - children = ( - F6016E921D2BD988003497D7 /* Base */, - ); - name = MainMenu.xib; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 341AA4C71E7F2E5000FCA5C6 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = Tests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.12; - PRODUCT_BUNDLE_IDENTIFIER = "net.openid.Example-macOSTests"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example-macOS.app/Contents/MacOS/Example-macOS"; - }; - name = Debug; - }; - 341AA4C81E7F2E5000FCA5C6 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = Tests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.12; - PRODUCT_BUNDLE_IDENTIFIER = "net.openid.Example-macOSTests"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example-macOS.app/Contents/MacOS/Example-macOS"; - }; - name = Release; - }; - F6016E7F1D2AC11F003497D7 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "-"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - }; - name = Debug; - }; - F6016E801D2AC11F003497D7 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "-"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = macosx; - }; - name = Release; - }; - F6016E821D2AC11F003497D7 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7FF583C8F7036437BE8875B3 /* Pods-Example-macOS.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "net.openid.appauth.Example-macOS"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - F6016E831D2AC11F003497D7 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 60553B3AB5BA3E1BB259E487 /* Pods-Example-macOS.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "net.openid.appauth.Example-macOS"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 341AA4C91E7F2E5000FCA5C6 /* Build configuration list for PBXNativeTarget "Example-macOSTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 341AA4C71E7F2E5000FCA5C6 /* Debug */, - 341AA4C81E7F2E5000FCA5C6 /* Release */, - ); - defaultConfigurationIsVisible = 0; - }; - F6016E6B1D2AC11E003497D7 /* Build configuration list for PBXProject "Example-macOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - F6016E7F1D2AC11F003497D7 /* Debug */, - F6016E801D2AC11F003497D7 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - F6016E811D2AC11F003497D7 /* Build configuration list for PBXNativeTarget "Example-macOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - F6016E821D2AC11F003497D7 /* Debug */, - F6016E831D2AC11F003497D7 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = F6016E681D2AC11E003497D7 /* Project object */; -} diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Example-macOS.xcworkspace/contents.xcworkspacedata b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Example-macOS.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index fcb7198e..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Example-macOS.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Podfile b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Podfile deleted file mode 100644 index 5b8ce01a..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Podfile +++ /dev/null @@ -1,7 +0,0 @@ -target 'Example-macOS' do - platform :osx, '10.10' - - # AppAuth Pod - # In production, just use `pod 'AppAuth'` without the path reference. - pod 'AppAuth', :path => '../../' -end diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/README.md b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/README.md deleted file mode 100644 index 78c5cfc8..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/README.md +++ /dev/null @@ -1,57 +0,0 @@ -# Example Project - -## Setup & Open the Project - -1. In the `Example-macOS` folder, run the following command to install the -AppAuth pod. - -``` -pod install -``` - -2. Open the `Example-macOS.xcworkspace` workspace - -``` -open Example-macOS.xcworkspace -``` - -This workspace is configured to include AppAuth via CocoaPods. You can also -directly include AppAuth as a static library using the build targets in the -`AppAuth.xcodeproj` project. - -## Configuration - -The example doesn't work out of the box, you need to configure it with your own -client ID. - -### Information You'll Need - -* Issuer -* Client ID -* Client Secret -* Redirect URI (optional: if not using loopback). - -How to get this information varies by IdP, but we have -[instructions](../README.md#openid-certified-providers) for some OpenID -Certified providers. - -### Configure the Example - -#### In the file `AppAuthExampleViewController.m` - -1. Update `kIssuer` with the IdP's issuer. -2. Update `kClientID` with your new client id. -3. Update `kClientSecret` with your client id's secret. -4. Update `kRedirectURI` redirect URI (optional: if not using loopback) - -#### In the file `Info.plist` - -Fully expand "URL types" (a.k.a. `CFBundleURLTypes`) and replace -`com.example.app` with the *scheme* of your redirect URI. -The scheme is everything before the colon (`:`). For example, if the redirect -URI is `com.example.app:/oauth2redirect/example-provider`, then the scheme -would be `com.example.app`. - -### Running the Example - -Now your example should be ready to run. diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Source/AppAuthExampleViewController.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Source/AppAuthExampleViewController.h deleted file mode 100644 index 99a460a7..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Source/AppAuthExampleViewController.h +++ /dev/null @@ -1,87 +0,0 @@ -/*! @file AppAuthExampleViewController.h - @brief AppAuth macOS SDK Example - @copyright - Copyright 2016 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ -#import - -@class AppDelegate; -@class OIDAuthState; -@class OIDServiceConfiguration; - -NS_ASSUME_NONNULL_BEGIN - -/*! @brief The example application's view controller. - */ -@interface AppAuthExampleViewController : NSViewController - -@property(nullable) IBOutlet NSButton *authAutoButton; -@property(nullable) IBOutlet NSButton *authManual; -@property(nullable) IBOutlet NSButton *authAutoHTTPButton; -@property(nullable) IBOutlet NSButton *codeExchangeButton; -@property(nullable) IBOutlet NSButton *userinfoButton; -@property(nullable) IBOutlet NSButton *clearAuthStateButton; -@property(nullable) IBOutlet NSTextView *logTextView; - -/*! @brief The application delegate. This is used to store the current authorization flow. - */ -@property (nonatomic, weak, nullable) AppDelegate *appDelegate; - -/*! @brief The authorization state. This is the AppAuth object that you should keep around and - serialize to disk. - */ -@property(nonatomic, readonly, nullable) OIDAuthState *authState; - -/*! @brief Authorization code flow using @c OIDAuthState automatic code exchanges and a custom URI - scheme-based redirect. - @param sender IBAction sender. - */ -- (IBAction)authWithAutoCodeExchange:(nullable id)sender; - -/*! @brief Authorization code flow using a manual code exchanges and a custom URI scheme-based - redirect. - @param sender IBAction sender. - */ -- (IBAction)authNoCodeExchange:(nullable id)sender; - -/*! @brief Authorization code flow using @c OIDAuthState automatic code exchanges and a - loopback HTTP-based redirect. - @param sender IBAction sender. - */ -- (IBAction)authWithAutoCodeExchangeHTTP:(nullable id)sender; - -/*! @brief Performs the authorization code exchange at the token endpoint. - @param sender IBAction sender. - */ -- (IBAction)codeExchange:(nullable id)sender; - -/*! @brief Performs a Userinfo API call using @c OIDAuthState.performActionWithFreshTokens. - @param sender IBAction sender. - */ -- (IBAction)userinfo:(nullable id)sender; - -/*! @brief Nils the @c OIDAuthState object. - @param sender IBAction sender. - */ -- (IBAction)clearAuthState:(nullable id)sender; - -/*! @brief Clears the UI log. - @param sender IBAction sender. - */ -- (IBAction)clearLog:(nullable id)sender; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Source/AppAuthExampleViewController.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Source/AppAuthExampleViewController.m deleted file mode 100644 index 0cc8064b..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Source/AppAuthExampleViewController.m +++ /dev/null @@ -1,494 +0,0 @@ -/*! @file AppAuthExampleViewController.m - @brief AppAuth macOS SDK Example - @copyright - Copyright 2016 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "AppAuthExampleViewController.h" - -#import - -#import -#import "AppDelegate.h" - -/*! @brief The OIDC issuer from which the configuration will be discovered. - */ -static NSString *const kIssuer = @"https://issuer.example.com"; - -/*! @brief The OAuth client ID. - @discussion For client configuration instructions, see the README. - @see https://github.com/openid/AppAuth-iOS/blob/master/Examples/Example-macOS/README.md - */ -static NSString *const kClientID = @"YOUR_CLIENT_ID"; - -/*! @brief The OAuth client secret. - @discussion For client configuration instructions, see the README. - @see https://github.com/openid/AppAuth-iOS/blob/master/Examples/Example-macOS/README.md - */ -static NSString *const kClientSecret = @"YOUR_CLIENT_SECRET"; - -/*! @brief The OAuth redirect URI for the client @c kClientID. - @discussion For client configuration instructions, see the README. - @see https://github.com/openid/AppAuth-iOS/blob/master/Examples/Example-macOS/README.md - */ -static NSString *const kRedirectURI = @"com.example.app:/oauth2redirect/example-provider"; - -/*! @brief Post-authorization redirect URI. - @discussion This is the URL that users will be redirected to after the OAuth flow is complete. - Generally you will point them at a nice page on your site that instructs them to return to - the app. It's best when that page is uncluttered and to the point. - */ -static NSString *const kSuccessURLString = @"http://openid.github.io/AppAuth-iOS/redirect/"; - -/*! @var kAppAuthExampleAuthStateKey - @brief NSCoding key for the authState property. - */ -static NSString *const kAppAuthExampleAuthStateKey = @"authState"; - -@interface AppAuthExampleViewController () -@end - -@implementation AppAuthExampleViewController { - OIDRedirectHTTPHandler *_redirectHTTPHandler; -} - -- (void)viewDidLoad { - [super viewDidLoad]; - -#if !defined(NS_BLOCK_ASSERTIONS) - - // The example needs to be configured with your own Client ID. - // See: https://github.com/openid/AppAuth-iOS/blob/master/Examples/Example-macOS/README.md - - NSAssert(![kClientID isEqualToString:@"YOUR_CLIENT_ID"], - @"Update kClientID with your own client ID. " - "Instructions: " - "https://github.com/openid/AppAuth-iOS/blob/master/Examples/Example-macOS/README.md" - ); - -#endif // !defined(NS_BLOCK_ASSERTIONS) - - _logTextView.layer.borderColor = [NSColor colorWithWhite:0.8 alpha:1.0].CGColor; - _logTextView.layer.borderWidth = 1.0f; - _logTextView.textContainer.lineBreakMode = NSLineBreakByCharWrapping; - - [self loadState]; - [self updateUI]; -} - -/*! @fn saveState - @brief Saves the @c OIDAuthState to @c NSUSerDefaults. - */ -- (void)saveState { - // for production usage consider using the OS Keychain instead - NSData *archivedAuthState = [ NSKeyedArchiver archivedDataWithRootObject:_authState]; - [[NSUserDefaults standardUserDefaults] setObject:archivedAuthState - forKey:kAppAuthExampleAuthStateKey]; - [[NSUserDefaults standardUserDefaults] synchronize]; -} - -/*! @fn loadState - @brief Loads the @c OIDAuthState from @c NSUSerDefaults. - */ -- (void)loadState { - // loads OIDAuthState from NSUSerDefaults - NSData *archivedAuthState = - [[NSUserDefaults standardUserDefaults] objectForKey:kAppAuthExampleAuthStateKey]; - OIDAuthState *authState = [NSKeyedUnarchiver unarchiveObjectWithData:archivedAuthState]; - [self setAuthState:authState]; -} - -- (void)setAuthState:(nullable OIDAuthState *)authState { - if (_authState == authState) { - return; - } - _authState = authState; - _authState.stateChangeDelegate = self; - [self stateChanged]; -} - -/*! @fn updateUI - @brief Refreshes UI, typically called after the auth state changed. - */ -- (void)updateUI { - _userinfoButton.enabled = [_authState isAuthorized]; - _clearAuthStateButton.enabled = _authState != nil; - _codeExchangeButton.enabled = _authState.lastAuthorizationResponse.authorizationCode - && !_authState.lastTokenResponse; - // dynamically changes authorize button text depending on authorized state - if (!_authState) { - _authAutoButton.title = @"Authorize (Custom URI Scheme Redirect)"; - _authManual.title = @"Authorize (Custom URI Scheme Redirect, Manual)"; - _authAutoHTTPButton.title = @"Authorize (HTTP Redirect)"; - } else { - _authAutoButton.title = @"Re-authorize (Custom URI Scheme Redirect)"; - _authManual.title = @"Re-authorize (Custom URI Scheme, Manual)"; - _authAutoHTTPButton.title = @"Re-authorize (HTTP Redirect)"; - } -} - -- (void)stateChanged { - [self saveState]; - [self updateUI]; -} - -- (void)didChangeState:(OIDAuthState *)state { - [self stateChanged]; -} - -- (void)authState:(OIDAuthState *)state didEncounterAuthorizationError:(nonnull NSError *)error { - [self logMessage:@"Received authorization error: %@", error]; -} - -- (IBAction)authWithAutoCodeExchange:(nullable id)sender { - -#if !defined(NS_BLOCK_ASSERTIONS) - - // The example needs to be configured with your own client details. - // See: https://github.com/openid/AppAuth-iOS/blob/master/Examples/Example-macOS/README.md - - NSAssert(![kClientID isEqualToString:@"YOUR_CLIENT_ID"], - @"Update kClientID with your own client ID. " - "Instructions: " - "https://github.com/openid/AppAuth-iOS/blob/master/Examples/Example-macOS/README.md"); - - NSAssert(![kRedirectURI isEqualToString:@"com.example.app:/oauth2redirect/example-provider"], - @"Update kRedirectURI with your own redirect URI. " - "Instructions: " - "https://github.com/openid/AppAuth-iOS/blob/master/Examples/Example-macOS/README.md"); - - // verifies that the custom URI scheme has been updated in the Info.plist - NSArray __unused* urlTypes = - [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleURLTypes"]; - NSAssert([urlTypes count] > 0, @"No custom URI scheme has been configured for the project."); - NSArray *urlSchemes = - [(NSDictionary *)[urlTypes objectAtIndex:0] objectForKey:@"CFBundleURLSchemes"]; - NSAssert([urlSchemes count] > 0, @"No custom URI scheme has been configured for the project."); - NSString *urlScheme = [urlSchemes objectAtIndex:0]; - - NSAssert(![urlScheme isEqualToString:@"com.example.app"], - @"Configure the URI scheme in Info.plist (URL Types -> Item 0 -> URL Schemes -> Item 0) " - "with the scheme of your redirect URI. Full instructions: " - "https://github.com/openid/AppAuth-iOS/blob/master/Examples/Example-macOS/README.md"); - -#endif // !defined(NS_BLOCK_ASSERTIONS) - - NSURL *issuer = [NSURL URLWithString:kIssuer]; - NSURL *redirectURI = [NSURL URLWithString:kRedirectURI]; - - [self logMessage:@"Fetching configuration for issuer: %@", issuer]; - - // discovers endpoints - [OIDAuthorizationService discoverServiceConfigurationForIssuer:issuer - completion:^(OIDServiceConfiguration *_Nullable configuration, NSError *_Nullable error) { - - if (!configuration) { - [self logMessage:@"Error retrieving discovery document: %@", [error localizedDescription]]; - [self setAuthState:nil]; - return; - } - - [self logMessage:@"Got configuration: %@", configuration]; - - // builds authentication request - OIDAuthorizationRequest *request = - [[OIDAuthorizationRequest alloc] initWithConfiguration:configuration - clientId:kClientID - clientSecret:kClientSecret - scopes:@[OIDScopeOpenID, OIDScopeProfile] - redirectURL:redirectURI - responseType:OIDResponseTypeCode - additionalParameters:nil]; - // performs authentication request - self.appDelegate.currentAuthorizationFlow = - [OIDAuthState authStateByPresentingAuthorizationRequest:request - callback:^(OIDAuthState *_Nullable authState, - NSError *_Nullable error) { - if (authState) { - [self setAuthState:authState]; - [self logMessage:@"Got authorization tokens. Access token: %@", - authState.lastTokenResponse.accessToken]; - } else { - [self logMessage:@"Authorization error: %@", [error localizedDescription]]; - [self setAuthState:nil]; - } - }]; - }]; -} - -- (IBAction)authWithAutoCodeExchangeHTTP:(nullable id)sender { - -#if !defined(NS_BLOCK_ASSERTIONS) - - // The example needs to be configured with your own client details. - // See: https://github.com/openid/AppAuth-iOS/blob/master/Examples/Example-macOS/README.md - - NSAssert(![kClientSecret isEqualToString:@"YOUR_CLIENT_SECRET"], - @"Update kClientSecret with your own client ID secret. " - "Instructions: " - "https://github.com/openid/AppAuth-iOS/blob/master/Examples/Example-macOS/README.md"); - -#endif // !defined(NS_BLOCK_ASSERTIONS) - - NSURL *issuer = [NSURL URLWithString:kIssuer]; - - [self logMessage:@"Starting HTTP loopback listener..."]; - - NSURL *successURL = [NSURL URLWithString:kSuccessURLString]; - - // Starts a loopback HTTP redirect listener to receive the code. This needs to be started first, - // as the exact redurect URI (including port) must be passed in the authorization request. - _redirectHTTPHandler = [[OIDRedirectHTTPHandler alloc] initWithSuccessURL:successURL]; - NSURL *redirectURI = [_redirectHTTPHandler startHTTPListener:nil]; - - [self logMessage:@"Listening on %@", redirectURI]; - - [self logMessage:@"Fetching configuration for issuer: %@", issuer]; - - // discovers endpoints - [OIDAuthorizationService discoverServiceConfigurationForIssuer:issuer - completion:^(OIDServiceConfiguration *_Nullable configuration, NSError *_Nullable error) { - - if (!configuration) { - [self logMessage:@"Error retrieving discovery document: %@", [error localizedDescription]]; - [self setAuthState:nil]; - return; - } - - [self logMessage:@"Got configuration: %@", configuration]; - - // builds authentication request - OIDAuthorizationRequest *request = - [[OIDAuthorizationRequest alloc] initWithConfiguration:configuration - clientId:kClientID - clientSecret:kClientSecret - scopes:@[OIDScopeOpenID, OIDScopeProfile] - redirectURL:redirectURI - responseType:OIDResponseTypeCode - additionalParameters:nil]; - // performs authentication request - __weak __typeof(self) weakSelf = self; - _redirectHTTPHandler.currentAuthorizationFlow = - [OIDAuthState authStateByPresentingAuthorizationRequest:request - callback:^(OIDAuthState *_Nullable authState, - NSError *_Nullable error) { - // Brings this app to the foreground. - [[NSRunningApplication currentApplication] - activateWithOptions:(NSApplicationActivateAllWindows | - NSApplicationActivateIgnoringOtherApps)]; - - // Processes the authorization response. - if (authState) { - [weakSelf logMessage:@"Got authorization tokens. Access token: %@", - authState.lastTokenResponse.accessToken]; - } else { - [weakSelf logMessage:@"Authorization error: %@", error.localizedDescription]; - } - [weakSelf setAuthState:authState]; - }]; - }]; -} - -- (IBAction)authNoCodeExchange:(nullable id)sender { - NSURL *issuer = [NSURL URLWithString:kIssuer]; - NSURL *redirectURI = [NSURL URLWithString:kRedirectURI]; - - [self logMessage:@"Fetching configuration for issuer: %@", issuer]; - - // discovers endpoints - [OIDAuthorizationService discoverServiceConfigurationForIssuer:issuer - completion:^(OIDServiceConfiguration *_Nullable configuration, NSError *_Nullable error) { - - if (!configuration) { - [self logMessage:@"Error retrieving discovery document: %@", error.localizedDescription]; - return; - } - - [self logMessage:@"Got configuration: %@", configuration]; - - // builds authentication request - OIDAuthorizationRequest *request = - [[OIDAuthorizationRequest alloc] initWithConfiguration:configuration - clientId:kClientID - clientSecret:kClientSecret - scopes:@[OIDScopeOpenID, OIDScopeProfile] - redirectURL:redirectURI - responseType:OIDResponseTypeCode - additionalParameters:nil]; - // performs authentication request - [self logMessage:@"Initiating authorization request %@", request]; - self.appDelegate.currentAuthorizationFlow = - [OIDAuthorizationService presentAuthorizationRequest:request - callback:^(OIDAuthorizationResponse *_Nullable authorizationResponse, - NSError *_Nullable error) { - - if (authorizationResponse) { - OIDAuthState *authState = - [[OIDAuthState alloc] initWithAuthorizationResponse:authorizationResponse]; - [self setAuthState:authState]; - - [self logMessage:@"Authorization response with code: %@", - authorizationResponse.authorizationCode]; - // could just call [self tokenExchange:nil] directly, but will let the user initiate it. - } else { - [self logMessage:@"Authorization error: %@", [error localizedDescription]]; - } - }]; - }]; -} - -- (IBAction)codeExchange:(nullable id)sender { - // performs code exchange request - OIDTokenRequest *tokenExchangeRequest = - [_authState.lastAuthorizationResponse tokenExchangeRequest]; - - [self logMessage:@"Performing authorization code exchange with request [%@]", - tokenExchangeRequest]; - - [OIDAuthorizationService performTokenRequest:tokenExchangeRequest - callback:^(OIDTokenResponse *_Nullable tokenResponse, - NSError *_Nullable error) { - if (!tokenResponse) { - [self logMessage:@"Token exchange error: %@", [error localizedDescription]]; - } else { - [self logMessage:@"Received token response with accessToken: %@", tokenResponse.accessToken]; - } - - [_authState updateWithTokenResponse:tokenResponse error:error]; - }]; -} - -- (IBAction)clearAuthState:(nullable id)sender { - [self setAuthState:nil]; -} - -- (IBAction)clearLog:(nullable id)sender { - [_logTextView.textStorage setAttributedString:[[NSAttributedString alloc] initWithString:@""]]; -} - -- (IBAction)userinfo:(nullable id)sender { - NSURL *userinfoEndpoint = - _authState.lastAuthorizationResponse.request.configuration.discoveryDocument.userinfoEndpoint; - if (!userinfoEndpoint) { - [self logMessage:@"Userinfo endpoint not declared in discovery document"]; - return; - } - NSString *currentAccessToken = _authState.lastTokenResponse.accessToken; - - [self logMessage:@"Performing userinfo request"]; - - [_authState performActionWithFreshTokens:^(NSString *_Nullable accessToken, - NSString *_Nullable idToken, - NSError *_Nullable error) { - if (error) { - [self logMessage:@"Error fetching fresh tokens: %@", [error localizedDescription]]; - return; - } - - // log whether a token refresh occurred - if (![currentAccessToken isEqual:accessToken]) { - [self logMessage:@"Access token was refreshed automatically (%@ to %@)", - currentAccessToken, - accessToken]; - } else { - [self logMessage:@"Access token was fresh and not updated [%@]", accessToken]; - } - - // creates request to the userinfo endpoint, with access token in the Authorization header - NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:userinfoEndpoint]; - NSString *authorizationHeaderValue = [NSString stringWithFormat:@"Bearer %@", accessToken]; - [request addValue:authorizationHeaderValue forHTTPHeaderField:@"Authorization"]; - - NSURLSessionConfiguration *configuration = - [NSURLSessionConfiguration defaultSessionConfiguration]; - NSURLSession *session = [NSURLSession sessionWithConfiguration:configuration - delegate:nil - delegateQueue:nil]; - - // performs HTTP request - NSURLSessionDataTask *postDataTask = - [session dataTaskWithRequest:request - completionHandler:^(NSData *_Nullable data, - NSURLResponse *_Nullable response, - NSError *_Nullable error) { - dispatch_async(dispatch_get_main_queue(), ^() { - if (error) { - [self logMessage:@"HTTP request failed %@", error]; - return; - } - if (![response isKindOfClass:[NSHTTPURLResponse class]]) { - [self logMessage:@"Non-HTTP response"]; - return; - } - - NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)response; - id jsonDictionaryOrArray = - [NSJSONSerialization JSONObjectWithData:data options:0 error:NULL]; - - if (httpResponse.statusCode != 200) { - // server replied with an error - NSString *responseText = [[NSString alloc] initWithData:data - encoding:NSUTF8StringEncoding]; - if (httpResponse.statusCode == 401) { - // "401 Unauthorized" generally indicates there is an issue with the authorization - // grant. Puts OIDAuthState into an error state. - NSError *oauthError = - [OIDErrorUtilities resourceServerAuthorizationErrorWithCode:0 - errorResponse:jsonDictionaryOrArray - underlyingError:error]; - [_authState updateWithAuthorizationError:oauthError]; - // log error - [self logMessage:@"Authorization Error (%@). Response: %@", oauthError, responseText]; - } else { - [self logMessage:@"HTTP: %d. Response: %@", - (int)httpResponse.statusCode, - responseText]; - } - return; - } - - // success response - [self logMessage:@"Success: %@", jsonDictionaryOrArray]; - }); - }]; - - [postDataTask resume]; - }]; -} - -/*! @fn logMessage - @brief Logs a message to stdout and the textfield. - @param format The format string and arguments. - */ -- (void)logMessage:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2) { - // gets message as string - va_list argp; - va_start(argp, format); - NSString *log = [[NSString alloc] initWithFormat:format arguments:argp]; - va_end(argp); - - // outputs to stdout - NSLog(@"%@", log); - - // appends to output log - NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; - dateFormatter.dateFormat = @"hh:mm:ss"; - NSString *dateString = [dateFormatter stringFromDate:[NSDate date]]; - NSString *logLine = [NSString stringWithFormat:@"\n%@: %@", dateString, log]; - NSAttributedString* logLineAttr = [[NSAttributedString alloc] initWithString:logLine]; - [[_logTextView textStorage] appendAttributedString:logLineAttr]; -} - -@end diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Source/AppDelegate.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Source/AppDelegate.h deleted file mode 100644 index 8d7b65f0..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Source/AppDelegate.h +++ /dev/null @@ -1,39 +0,0 @@ -/*! @file AppDelegate.h - @brief AppAuth macOS SDK Example - @copyright - Copyright 2016 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -NS_ASSUME_NONNULL_BEGIN - -@protocol OIDExternalUserAgentSession; - -/*! @class AppDelegate - @brief The example application's delegate. - */ -@interface AppDelegate : NSObject - -/*! @property currentAuthorizationFlow - @brief The authorization flow session which receives the return URL from the browser. - @discussion We need to store this in the app delegate as it's that delegate which receives the - incoming URL. This property will be nil, except when an authorization flow is in progress. - */ -@property(nonatomic, strong, nullable) id currentAuthorizationFlow; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Source/AppDelegate.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Source/AppDelegate.m deleted file mode 100644 index 7e5a8068..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Source/AppDelegate.m +++ /dev/null @@ -1,57 +0,0 @@ -/*! @file AppDelegate.m - @brief AppAuth macOS SDK Example - @copyright - Copyright 2016 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "AppDelegate.h" - -#import - -#import "AppAuthExampleViewController.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface AppDelegate () -@property(nullable) IBOutlet NSWindow *window; -@end - -@implementation AppDelegate - -- (void)applicationDidFinishLaunching:(NSNotification *)aNotification { - _window.title = @"AppAuth Example for macOS"; - AppAuthExampleViewController *contentViewController = - [[AppAuthExampleViewController alloc] initWithNibName:nil bundle:nil]; - contentViewController.appDelegate = self; - _window.contentViewController = contentViewController; - - // Register for GetURL events. - NSAppleEventManager *appleEventManager = [NSAppleEventManager sharedAppleEventManager]; - [appleEventManager setEventHandler:self - andSelector:@selector(handleGetURLEvent:withReplyEvent:) - forEventClass:kInternetEventClass - andEventID:kAEGetURL]; -} - -- (void)handleGetURLEvent:(NSAppleEventDescriptor *)event - withReplyEvent:(NSAppleEventDescriptor *)replyEvent { - NSString *URLString = [[event paramDescriptorForKeyword:keyDirectObject] stringValue]; - NSURL *URL = [NSURL URLWithString:URLString]; - [_currentAuthorizationFlow resumeExternalUserAgentFlowWithURL:URL]; -} - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_macOS_Icon_1024.png b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_macOS_Icon_1024.png deleted file mode 100644 index b7883fbc..00000000 Binary files a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_macOS_Icon_1024.png and /dev/null differ diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_macOS_Icon_512.png b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_macOS_Icon_512.png deleted file mode 100644 index a38111fa..00000000 Binary files a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Source/Assets.xcassets/AppIcon.appiconset/AppAuth_macOS_Icon_512.png and /dev/null differ diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Source/Assets.xcassets/AppIcon.appiconset/Contents.json b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Source/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index be30d8e1..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Source/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "images" : [ - { - "idiom" : "mac", - "size" : "16x16", - "scale" : "1x" - }, - { - "idiom" : "mac", - "size" : "16x16", - "scale" : "2x" - }, - { - "idiom" : "mac", - "size" : "32x32", - "scale" : "1x" - }, - { - "idiom" : "mac", - "size" : "32x32", - "scale" : "2x" - }, - { - "idiom" : "mac", - "size" : "128x128", - "scale" : "1x" - }, - { - "idiom" : "mac", - "size" : "128x128", - "scale" : "2x" - }, - { - "idiom" : "mac", - "size" : "256x256", - "scale" : "1x" - }, - { - "idiom" : "mac", - "size" : "256x256", - "scale" : "2x" - }, - { - "size" : "512x512", - "idiom" : "mac", - "filename" : "AppAuth_macOS_Icon_512.png", - "scale" : "1x" - }, - { - "size" : "512x512", - "idiom" : "mac", - "filename" : "AppAuth_macOS_Icon_1024.png", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Source/Base.lproj/AppAuthExampleViewController.xib b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Source/Base.lproj/AppAuthExampleViewController.xib deleted file mode 100644 index 51acf2b5..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Source/Base.lproj/AppAuthExampleViewController.xib +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Source/Base.lproj/MainMenu.xib b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Source/Base.lproj/MainMenu.xib deleted file mode 100644 index 91b19526..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Source/Base.lproj/MainMenu.xib +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # AppAuth Example for macOS - -## Configuration - -The example doesn't work out of the box, you need to configure your own client ID. - -### Creating a Google OAuth Client - -To configure the sample with a Google OAuth client, visit https://console.developers.google.com/apis/credentials?project=_ and create a new project. Then tap "Create credentials" and select "OAuth client ID". Follow the instructions to configure the consent screen (just the Product Name is needed). - -Then, complete the OAuth client creation by selecting "Other" as the Application type. - -Copy the client ID to the clipboard. - -### Configure the Example-Mac Xcode project - -1. In the Example-Mac folder, run the following command to install the required library pods. -$ pod install - -2. Open the open Example-Mac.xcworkspace/: -$ open Example-Mac.xcworkspace - -### Configure the Example - -In `AppAuthExampleViewController.m` update `kClientID` and 'kClientSecret' with your new client ID and client secret. - -In the same file, update `kRedirectURI` with the *reverse DNS notation* form of the client ID. For example, if the client ID is `YOUR_CLIENT.apps.googleusercontent.com`, the reverse DNS notation would be `com.googleusercontent.apps.YOUR_CLIENT`. A path component is added resulting in `com.googleusercontent.apps.YOUR_CLIENT:/oauthredirect`. - -Finally, open `Info.plist` and fully expand "URL types" (a.k.a. "CFBundleURLTypes") and replace `com.googleusercontent.apps.YOUR_CLIENT` with the reverse DNS notation form of your client ID (not including the `:/oauthredirect` path component). - -Once you have made those three changes, the sample should be ready to try with your new OAuth client. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Source/Info.plist b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Source/Info.plist deleted file mode 100644 index 016f79f1..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Source/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIconFile - - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSMinimumSystemVersion - $(MACOSX_DEPLOYMENT_TARGET) - NSHumanReadableCopyright - Copyright © 2016 Google. All rights reserved. - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - CFBundleURLTypes - - - CFBundleTypeRole - Editor - CFBundleURLSchemes - - com.example.app - - - - - diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Source/main.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Source/main.m deleted file mode 100644 index 3d21f3ba..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Source/main.m +++ /dev/null @@ -1,23 +0,0 @@ -/*! @file main.m - @brief Application main entry point. - @copyright - Copyright 2016 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -int main(int argc, const char * argv[]) { - return NSApplicationMain(argc, argv); -} diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Tests/AppAuthExampleTests.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Tests/AppAuthExampleTests.m deleted file mode 100644 index a21cf01a..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/Example-macOS/Tests/AppAuthExampleTests.m +++ /dev/null @@ -1,43 +0,0 @@ -/*! @file AppAuthExampleTests.m - @brief AppAuth macOS SDK Example Tests - @copyright - Copyright 2017 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -@interface AppAuthExampleTests : XCTestCase - -@end - -@implementation AppAuthExampleTests - -- (void)setUp { - [super setUp]; - // Put setup code here. This method is called before the invocation of each test method in the class. -} - -- (void)tearDown { - // Put teardown code here. This method is called after the invocation of each test method in the class. - [super tearDown]; -} - -/*! @brief A smoke test, just to verify the target builds. - */ -- (void)testBuilt { - XCTAssert(true); -} - -@end diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/README-Google.md b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/README-Google.md deleted file mode 100644 index 5a9c3f72..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/README-Google.md +++ /dev/null @@ -1,38 +0,0 @@ -# Using AppAuth for iOS and macOS with Google - -To configure the sample with a Google OAuth client, first visit -https://console.developers.google.com/apis/credentials?project=_ and create a -new project. Then tap "Create credentials" and select "OAuth client ID". - -Follow the instructions to configure the consent screen (just the Product Name -is needed). - -Then follow the instructions for your platform: - -## iOS - -Select "iOS" as the application type, and enter your Bundle ID. - -Then, setup the example with your configuration: - -| Configuration | Description | -|---------------|------------------| -| Issuer | `https://accounts.google.com`| -| Client ID | The value named `Client ID` in the console, has the format `IDENTIFIER.apps.googleusercontent.com`.| -| Client Secret | Google's iOS clients do not have a secret.| -| Redirect URI | The value for `iOS URL scheme` wil be the scheme of your redirect URI. This is the Client ID in reverse domain name notation, e.g. ` com.googleusercontent.apps.IDENTIFIER`. To construct the redirect URI, add your own path component. E.g. ` com.googleusercontent.apps.IDENTIFIER:/oauth2redirect/google`. Note that there is only a single slash (`/`) after the scheme.| -| - -## macOS - -Select "Other" as the application type. - -Then, setup the example with your configuration: - -| Configuration | Description | -|---------------|------------------| -| Issuer | `https://accounts.google.com`| -| Client ID | The value named `Client ID` in the console, has the format `IDENTIFIER.apps.googleusercontent.com`.| -| Client Secret | The value named `Client secret` in the console.| -| Redirect URI | For macOS, you can use either the loopback interface (where AppAuth will generate the redirect URI for you), or a custom scheme. To create a custom scheme redirect URI, reverse the client id to get the URI scheme, for example ` com.googleusercontent.apps.IDENTIFIER` and, add your own path component. E.g. `com.googleusercontent.apps.IDENTIFIER:/oauth2redirect/google`. Note that there is only a single slash (`/`) after the scheme.| - diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/README-IdentityServer.md b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/README-IdentityServer.md deleted file mode 100644 index c634ea50..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/README-IdentityServer.md +++ /dev/null @@ -1,45 +0,0 @@ -# Using AppAuth with [IdentityServer4](https://github.com/IdentityServer/IdentityServer4) - -Since IdentityServer4 is a certified OpenID Connect implementation and supports PKCE, there are no special steps needed to use it with AppAuth. - -Sample IdentityServer client definition that works OOB with the AppAuth sample: - -```csharp -var client = new Client -{ - ClientId = "native.code", - ClientName = "Native Client (Code with PKCE)", - RequireClientSecret = false, - - RedirectUris = { "io.identityserver.demo:/oauthredirect" }, - - AllowedGrantTypes = GrantTypes.Code, - RequirePkce = true, - AllowedScopes = { "openid", "profile" }, - AllowOfflineAccess = true -}; -``` - -## Connecting the AppAuth sample to the IdentityServer4 demo instance - -You can find a demo instance of IdentityServer4 at [https://demo.identityserver.io](https://demo.identityserver.io). -On the main page you can find a number of registered clients and their configuration (all clients can use arbitrary redirect URIs). - -The following changes are required for the AppAuth sample: - -``` -// set the issuer -static NSString *const kIssuer = @"https://demo.identityserver.io"; - -// client ID for code flow + PKCE -static NSString *const kClientID = - @"native.code"; - -// some redirect URI (must match the plist setting) -static NSString *const kRedirectURI = - @"io.identityserver.demo:/oauthredirect"; -``` - -## Getting support for IdentityServer -The IdentityServer project has an [issue tracker](https://github.com/IdentityServer/IdentityServer4/issues) and [documentation](https://identityserver4.readthedocs.io/en/release/). Feel free to open an issue when you think you found a bug or unexpected behavior. -There's also a pretty active community on [StackOverflow](https://stackoverflow.com/questions/tagged/identityserver4) that can help out with more general questions. diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/README-Okta.md b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/README-Okta.md deleted file mode 100644 index 90e5ea4c..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/README-Okta.md +++ /dev/null @@ -1,35 +0,0 @@ -# Using AppAuth with [Okta](https://developer.okta.com/docs/api/resources/oidc.html) - -Since Okta is a certified OpenID Connect provider and supports PKCE by default, configuration is quick and simple. There are no additional libraries or tools required. - -## Add an OpenID Connect Client - -You can create an Okta developer account at [https://developer.okta.com/](https://developer.okta.com/). - - 1. After login, navigate to https://{{yourOrg}}-admin.oktapreview.com/admin/apps/add-app and select **Create New App** - 1. Choose **Native** as the platform, Sign on method as **OpenID Connect** then select **Create**. - 1. Populate your new OpenID Connect application with values similar to: - -| Setting | Value | -| ------------------- | --------------------------------------------------- | -| Application Name | OpenId Connect App *(must be unique)* | -| Redirect URIs | com.oktapreview.yoursubdomain://callback_url| -| Allowed grant types | Authorization Code | - -4. Click **Finish** to redirect back to the *General Settings* of your application. -5. Copy the **Client ID**, as it will be needed for the client configuration. - -**Note:** *As with any Okta application, make sure you assign Users or Groups to the OpenID Connect Client. Otherwise, no one can use it.* - -The following changes are required for the AppAuth sample: - -``` -// set the issuer -// This will be your specific subdomain.okta.com or subdomain.oktapreview.com -static NSString *const kIssuer = @"https://subdomain.okta.com”; - -// client ID for code flow + PKCE -// This is available from your OpenID Connect Client page -static NSString *const kClientID = @“YourClientID”; - -static NSString *const kRedirectURI = @"com.oktapreview.yoursubdomain:/oauth"; diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/README-PingFederate.md b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/README-PingFederate.md deleted file mode 100644 index 3b1a5101..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/README-PingFederate.md +++ /dev/null @@ -1,58 +0,0 @@ -# Using AppAuth for iOS and macOS with PingFederate - -This example uses the *PingFederate OAuth2 Playground* sample application to quickly stand up a new PingFederate server as an OpenID Connect Provider. - -Developer licenses and the PingFederate software can be found at https://developer.pingidentity.com/get-started. - - - -## You will need - -* PingFederate server & license ([download developer software and licenses](https://developer.pingidentity.com/get-started)) -* PingFederate OAuth2 Playground (available from [product downloads](https://www.pingidentity.com/en/products/downloads/pingfederate.html)) - - - -## PingFederate configuration - -* Install PingFederate and the OAuth2 Playground (see the readme in the OAuth2 Playground distribution) -* Modify the OAuth client `Authorization Code Client` in the PingFederate console: - * Edit the `Redirect URIs` option to add the example redirect URI (e.g. com.example.appauth://cb) - * If using the loopback interface with the macOS example, add the following redirect URI: `http://127.0.0.1:*/` -* Save your changes - -Single sign-on using the SFSafariViewController expects a persistent session cookie to be used. This is not the default configuration for PingFederate, however there are [simple instructions to switch from using session cookies to persistent cookies](https://docs.pingidentity.com/bundle/pf_sm_extendLifetimeOfPfCookie_pf83/page/concept/extendingLifetimeOfPfCookie.html). - -**Note**: Due to the Application Transport Security (ATS) features of iOS9+, your PingFederate server must have a valid SSL certificate. Developers may disable ATS by following [Apple directions](https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html), however this should only be done so in development environments. - - - -## Configure the example app - -Use the following information to configure the examples. - -### iOS - -| Configuration | Description | -|---------------|------------------| -| Issuer | The hostname of your PingFederate server, include the port if applicable (e.g. `https://pf.example.com:9031`). | -| Client ID | The `Client ID` from the OAuth client configuration (e.g. `ac_client`). | -| Client Secret | Blank. The authorization code client does not have a secret. | -| Redirect URI | The `Redirect URI` from the OAuth client configuration (e.g. `com.example.appauth://cb`). | - - -### macOS - -| Configuration | Description | -|---------------|------------------| -| Issuer | The hostname of your PingFederate server, include the port if applicable (e.g. `https://pf.example.com:9031`). | -| Client ID | The `Client ID` from the OAuth client configuration (e.g. `ac_client`). | -| Client Secret | Blank. The authorization code client does not have a secret. | -| Redirect URI | For macOS, you can use either the loopback interface (where AppAuth will generate the redirect URI for you), or a custom scheme. For a custom scheme, use the `Redirect URI` from the OAuth client configuration (e.g. `com.example.appauth://cb`). | - - - -## Support Information - -For help and support visit the [Ping Identity developers site](https://developer.pingidentity.com/en/support.html) or contact your account team. - diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/README.md b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/README.md deleted file mode 100644 index 2361d3d4..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Examples/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# AppAuth for iOS and macOS Examples - -The examples need to be configured with an OpenID Connect issuer (or -Authorization and Token endpoints manually), and the OAuth client information -like the Client ID and Redirect URI. - -## Examples - -Each example has docs on how to configure: - -* [Example for iOS (Objective-C)](Example-iOS_ObjC/README.md) -* [Example for iOS w/ Carthage (Objective-C)](Example-iOS_ObjC-Carthage/README.md) -* [Example for macOS](Example-macOS/README.md) - -To get the Issuer, Client ID, and Redirect URI, for your particular IdP, you -may view the IdP-specific information in the next section. - -## OpenID Certified Providers - -All [Certified OpenID providers](http://openid.net/certification/) that support -[RFC 8252](https://tools.ietf.org/html/rfc8252#appendix-A) -are welcome to submit a README with IdP information. - -Those with instructions on file: - -* [Google](README-Google.md) -* [IdentityServer](README-IdentityServer.md) -* [Okta](README-Okta.md) -* [PingFederate](README-PingFederate.md) diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/LICENSE b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/LICENSE deleted file mode 100644 index d6456956..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/README.md b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/README.md deleted file mode 100644 index ebf645a7..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/README.md +++ /dev/null @@ -1,352 +0,0 @@ -![AppAuth for iOS and macOS](https://rawgit.com/openid/AppAuth-iOS/master/appauth_lockup.svg) -[![Build Status](https://travis-ci.org/openid/AppAuth-iOS.svg?branch=master)](https://travis-ci.org/openid/AppAuth-iOS) -[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) - -AppAuth for iOS and macOS is a client SDK for communicating with -[OAuth 2.0](https://tools.ietf.org/html/rfc6749) and -[OpenID Connect](http://openid.net/specs/openid-connect-core-1_0.html) providers. -It strives to -directly map the requests and responses of those specifications, while following -the idiomatic style of the implementation language. In addition to mapping the -raw protocol flows, convenience methods are available to assist with common -tasks like performing an action with fresh tokens. - -It follows the best practices set out in -[RFC 8252 - OAuth 2.0 for Native Apps](https://tools.ietf.org/html/rfc8252) -including using `SFAuthenticationSession` and `SFSafariViewController` on iOS -for the auth request. `UIWebView` and `WKWebView` are explicitly *not* -supported due to the security and usability reasons explained in -[Section 8.12 of RFC 8252](https://tools.ietf.org/html/rfc8252#section-8.12). - -It also supports the [PKCE](https://tools.ietf.org/html/rfc7636) extension to -OAuth which was created to secure authorization codes in public clients when -custom URI scheme redirects are used. The library is friendly to other -extensions (standard or otherwise) with the ability to handle additional params -in all protocol requests and responses. - -## Specification - -### iOS - -#### Supported Versions - -AppAuth supports iOS 7 and above. - -iOS 9+ uses the in-app browser tab pattern -(via `SFSafariViewController`), and falls back to the system browser (mobile -Safari) on earlier versions. - -#### Authorization Server Requirements - -Both Custom URI Schemes (all supported versions of iOS) and Universal Links -(iOS 9+) can be used with the library. - -In general, AppAuth can work with any Authorization Server (AS) that supports -native apps as documented in [RFC 8252](https://tools.ietf.org/html/rfc8252), -either through custom URI scheme redirects, or universal links. -AS's that assume all clients are web-based or require clients to maintain -confidentiality of the client secrets may not work well. - -### macOS - -#### Supported Versions - -AppAuth supports macOS (OS X) 10.9 and above. - -#### Authorization Server Requirements - -AppAuth for macOS supports both custom schemes, a loopback HTTP redirects -via a small embedded server. - -In general, AppAuth can work with any Authorization Server (AS) that supports -native apps as documented in [RFC 8252](https://tools.ietf.org/html/rfc8252), -either through custom URI scheme, or loopback HTTP redirects. -AS's that assume all clients are web-based or require clients to maintain -confidentiality of the client secrets may not work well. - -## Try - -Want to try out AppAuth? Just run: - - pod try AppAuth - -Follow the instructions in [Examples/README.md](Examples/README.md) to configure -with your own OAuth client (you need to update 3 configuration points with your -client info to try the demo). - -## Setup - -AppAuth supports three options for dependency management. - -### CocoaPods - -With [CocoaPods](https://guides.cocoapods.org/using/getting-started.html), -add the following line to your `Podfile`: - - pod 'AppAuth' - -Then run `pod install`. - -### Carthage - -With [Carthage](https://github.com/Carthage/Carthage), add the following -line to your `Cartfile`: - - github "openid/AppAuth-iOS" "master" - -Then run `carthage bootstrap`. - -### Static Library - -You can also use AppAuth as a static library. This requires linking the library -and your project and including the headers. Suggested configuration: - -1. Create an Xcode Workspace. -2. Add `AppAuth.xcodeproj` to your Workspace. -3. Include libAppAuth as a linked library for your target (in the "General -> -Linked Framework and Libraries" section of your target). -4. Add `AppAuth-iOS/Source` to your search paths of your target ("Build Settings -> -"Header Search Paths"). - -## Auth Flow - -AppAuth supports both manual interaction with the Authorization Server -where you need to perform your own token exchanges, as well as convenience -methods that perform some of this logic for you. This example uses the -convenience method which returns either an `OIDAuthState` object, or an error. - -`OIDAuthState` is a class that keeps track of the authorization and token -requests and responses, and provides a convenience method to call an API with -fresh tokens. This is the only object that you need to serialize to retain the -authorization state of the session. - -### Configuration - -You can configure AppAuth by specifying the endpoints directly: - -```objc -NSURL *authorizationEndpoint = - [NSURL URLWithString:@"https://accounts.google.com/o/oauth2/v2/auth"]; -NSURL *tokenEndpoint = - [NSURL URLWithString:@"https://www.googleapis.com/oauth2/v4/token"]; - -OIDServiceConfiguration *configuration = - [[OIDServiceConfiguration alloc] - initWithAuthorizationEndpoint:authorizationEndpoint - tokenEndpoint:tokenEndpoint]; - -// perform the auth request... -``` - -Or through discovery: - -```objc -NSURL *issuer = [NSURL URLWithString:@"https://accounts.google.com"]; - -[OIDAuthorizationService discoverServiceConfigurationForIssuer:issuer - completion:^(OIDServiceConfiguration *_Nullable configuration, - NSError *_Nullable error) { - - if (!configuration) { - NSLog(@"Error retrieving discovery document: %@", - [error localizedDescription]); - return; - } - - // perform the auth request... -}]; -``` - -### Authorizing – iOS - -First you need to have a property in your AppDelegate to hold the session, in -order to continue the authorization flow from the redirect. - -```objc -// property of the app's AppDelegate -@property(nonatomic, strong, nullable) - id currentAuthorizationFlow; -``` - -And your main class, a property to store the auth state: - -```objc -// property of the containing class -@property(nonatomic, strong, nullable) OIDAuthState *authState; -``` - -Then, initiate the authorization request. By using the -`authStateByPresentingAuthorizationRequest` convenience method, the token -exchange will be performed automatically, and everything will be protected with -PKCE (if the server supports it). AppAuth also allows you to perform these -requests manually. See the `authNoCodeExchange` method in the included Example -app for a demonstration. - -```objc -// builds authentication request -OIDAuthorizationRequest *request = - [[OIDAuthorizationRequest alloc] initWithConfiguration:configuration - clientId:kClientID - scopes:@[OIDScopeOpenID, - OIDScopeProfile] - redirectURL:KRedirectURI - responseType:OIDResponseTypeCode - additionalParameters:nil]; - -// performs authentication request -AppDelegate *appDelegate = - (AppDelegate *)[UIApplication sharedApplication].delegate; -appDelegate.currentAuthorizationFlow = - [OIDAuthState authStateByPresentingAuthorizationRequest:request - presentingViewController:self - callback:^(OIDAuthState *_Nullable authState, - NSError *_Nullable error) { - if (authState) { - NSLog(@"Got authorization tokens. Access token: %@", - authState.lastTokenResponse.accessToken); - [self setAuthState:authState]; - } else { - NSLog(@"Authorization error: %@", [error localizedDescription]); - [self setAuthState:nil]; - } -}]; -``` - -*Handling the Redirect* - -The authorization response URL is returned to the app via the iOS openURL -app delegate method, so you need to pipe this through to the current -authorization session (created in the previous session). - -```objc -- (BOOL)application:(UIApplication *)app - openURL:(NSURL *)url - options:(NSDictionary *)options { - // Sends the URL to the current authorization flow (if any) which will - // process it if it relates to an authorization response. - if ([_currentAuthorizationFlow resumeExternalUserAgentFlowWithURL:url]) { - _currentAuthorizationFlow = nil; - return YES; - } - - // Your additional URL handling (if any) goes here. - - return NO; -} -``` - -### Authorizing – MacOS - -On macOS, the most popular way to get the authorization response redirect is to -start a local HTTP server on the loopback interface (limited to incoming -requests from the user's machine only). When the authorization is complete, the -user is redirected to that local server, and the authorization response can be -processed by the app. AppAuth takes care of managing the local HTTP server -lifecycle for you. - -> #### :bulb: Alternative: Custom URI Schemes -> Custom URI schemes are also supported on macOS, but some browsers display -> an interstitial which reduces the usability. For an example on using custom -> URI schemes with macOS, See `Example-Mac`. - -To receive the authorization response using a local HTTP server, first you need -to have an instance variable in your main class to retain the HTTP redirect -handler. - -```objc -OIDRedirectHTTPHandler *_redirectHTTPHandler; -``` - -Then, as the port used by the local HTTP server varies, you need to start it -before building the authorization request in order to get the exact redirect -URI to use. - -```objc -static NSString *const kSuccessURLString = - @"http://openid.github.io/AppAuth-iOS/redirect/"; -NSURL *successURL = [NSURL URLWithString:kSuccessURLString]; - -// Starts a loopback HTTP redirect listener to receive the code. This needs to be started first, -// as the exact redirect URI (including port) must be passed in the authorization request. -_redirectHTTPHandler = [[OIDRedirectHTTPHandler alloc] initWithSuccessURL:successURL]; -NSURL *redirectURI = [_redirectHTTPHandler startHTTPListener:nil]; -``` - -Then, initiate the authorization request. By using the -`authStateByPresentingAuthorizationRequest` convenience method, the token -exchange will be performed automatically, and everything will be protected with -PKCE (if the server supports it). By assigning the return value to the -`OIDRedirectHTTPHandler`'s `currentAuthorizationFlow`, the authorization will -continue automatically once the user makes their choice. - -```objc -// builds authentication request -OIDAuthorizationRequest *request = - [[OIDAuthorizationRequest alloc] initWithConfiguration:configuration - clientId:kClientID - clientSecret:kClientSecret - scopes:@[ OIDScopeOpenID ] - redirectURL:redirectURI - responseType:OIDResponseTypeCode - additionalParameters:nil]; -// performs authentication request -__weak __typeof(self) weakSelf = self; -_redirectHTTPHandler.currentAuthorizationFlow = - [OIDAuthState authStateByPresentingAuthorizationRequest:request - callback:^(OIDAuthState *_Nullable authState, - NSError *_Nullable error) { - // Brings this app to the foreground. - [[NSRunningApplication currentApplication] - activateWithOptions:(NSApplicationActivateAllWindows | - NSApplicationActivateIgnoringOtherApps)]; - - // Processes the authorization response. - if (authState) { - NSLog(@"Got authorization tokens. Access token: %@", - authState.lastTokenResponse.accessToken); - } else { - NSLog(@"Authorization error: %@", error.localizedDescription); - } - [weakSelf setAuthState:authState]; -}]; -``` - -### Making API Calls - -AppAuth gives you the raw token information, if you need it. However we -recommend that users of the `OIDAuthState` convenience wrapper use the provided -`performActionWithFreshTokens:` method to perform their API calls to avoid -needing to worry about token freshness. - -```objc -[_authState performActionWithFreshTokens:^(NSString *_Nonnull accessToken, - NSString *_Nonnull idToken, - NSError *_Nullable error) { - if (error) { - NSLog(@"Error fetching fresh tokens: %@", [error localizedDescription]); - return; - } - - // perform your API request using the tokens -}]; -``` - -## API Documentation - -Browse the [API documentation](http://openid.github.io/AppAuth-iOS/docs/latest/annotated.html). - -## Included Samples - -You can try out the iOS sample included in the source distribution by opening -`Example/Example.xcworkspace`. You can easily convert the Example -workspace to a Pod workspace by deleting the `AppAuth` project, and -[configuring the pod](#setup). You can also -[try out the sample via CocoaPods](#try). Be sure to follow the instructions in -[Example/README.md](Example/README.md) to configure your own OAuth client ID -for use with the example. - -You can try out the macOS sample included in the source distribution by -executing `pod install` in the `Example-Mac` folder, then opening -`Example-Mac.xcworkspace`. Be sure to follow the instructions in -[Example-Mac/README.md](Example-Mac/README.md) to configure your own OAuth -client ID for use with the example. diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/AppAuth.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/AppAuth.h deleted file mode 100644 index e7f7faa6..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/AppAuth.h +++ /dev/null @@ -1,90 +0,0 @@ -/*! @file AppAuth.h - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDAuthState.h" -#import "OIDAuthStateChangeDelegate.h" -#import "OIDAuthStateErrorDelegate.h" -#import "OIDAuthorizationRequest.h" -#import "OIDAuthorizationResponse.h" -#import "OIDAuthorizationService.h" -#import "OIDError.h" -#import "OIDErrorUtilities.h" -#import "OIDExternalUserAgent.h" -#import "OIDExternalUserAgentRequest.h" -#import "OIDExternalUserAgentSession.h" -#import "OIDGrantTypes.h" -#import "OIDIDToken.h" -#import "OIDRegistrationRequest.h" -#import "OIDRegistrationResponse.h" -#import "OIDResponseTypes.h" -#import "OIDScopes.h" -#import "OIDScopeUtilities.h" -#import "OIDServiceConfiguration.h" -#import "OIDServiceDiscovery.h" -#import "OIDTokenRequest.h" -#import "OIDTokenResponse.h" -#import "OIDTokenUtilities.h" -#import "OIDURLSessionProvider.h" - -#if TARGET_OS_TV -#elif TARGET_OS_WATCH -#elif TARGET_OS_IOS -#import "OIDAuthState+IOS.h" -#import "OIDAuthorizationService+IOS.h" -#import "OIDExternalUserAgentIOS.h" -#import "OIDExternalUserAgentIOSCustomBrowser.h" -#elif TARGET_OS_MAC -#import "OIDAuthState+Mac.h" -#import "OIDAuthorizationService+Mac.h" -#import "OIDExternalUserAgentMac.h" -#import "OIDRedirectHTTPHandler.h" -#else -#error "Platform Undefined" -#endif - - -/*! @mainpage AppAuth for iOS and macOS - - @section introduction Introduction - - AppAuth for iOS and macOS is a client SDK for communicating with [OAuth 2.0] - (https://tools.ietf.org/html/rfc6749) and [OpenID Connect] - (http://openid.net/specs/openid-connect-core-1_0.html) providers. It strives to - directly map the requests and responses of those specifications, while following - the idiomatic style of the implementation language. In addition to mapping the - raw protocol flows, convenience methods are available to assist with common - tasks like performing an action with fresh tokens. - - It follows the best practices set out in - [RFC 8252 - OAuth 2.0 for Native Apps](https://tools.ietf.org/html/rfc8252) - including using `SFAuthenticationSession` and `SFSafariViewController` on iOS - for the auth request. `UIWebView` and `WKWebView` are explicitly *not* - supported due to the security and usability reasons explained in - [Section 8.12 of RFC 8252](https://tools.ietf.org/html/rfc8252#section-8.12). - - It also supports the [PKCE](https://tools.ietf.org/html/rfc7636) extension to - OAuth which was created to secure authorization codes in public clients when - custom URI scheme redirects are used. The library is friendly to other - extensions (standard or otherwise) with the ability to handle additional params - in all protocol requests and responses. - - Homepage: http://openid.github.io/AppAuth-iOS/
- API Documentation: http://openid.github.io/AppAuth-iOS/docs/latest
- Git Repository: https://github.com/openid/AppAuth-iOS
- - */ diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/Framework/AppAuth.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/Framework/AppAuth.h deleted file mode 100644 index 4541a1ce..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/Framework/AppAuth.h +++ /dev/null @@ -1,67 +0,0 @@ -/*! @file AppAuth.h - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -//! Project version number for AppAuthFramework-iOS. -FOUNDATION_EXPORT double AppAuthVersionNumber; - -//! Project version string for AppAuthFramework-iOS. -FOUNDATION_EXPORT const unsigned char AppAuthVersionString[]; - -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import - -#if TARGET_OS_TV -#elif TARGET_OS_WATCH -#elif TARGET_OS_IOS -#import -#import -#import -#import -#elif TARGET_OS_MAC -#import -#import -#import -#import -#else -#error "Platform Undefined" -#endif - diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/Framework/Info.plist b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/Framework/Info.plist deleted file mode 100644 index 4c93b0d3..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/Framework/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSHumanReadableCopyright - Copyright © 2017 The AppAuth Authors - NSPrincipalClass - - - diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDAuthState.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDAuthState.h deleted file mode 100644 index 68697d2c..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDAuthState.h +++ /dev/null @@ -1,272 +0,0 @@ -/*! @file OIDAuthState.h - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ -#import - -@class OIDAuthorizationRequest; -@class OIDAuthorizationResponse; -@class OIDAuthState; -@class OIDRegistrationResponse; -@class OIDTokenResponse; -@class OIDTokenRequest; -@protocol OIDAuthStateChangeDelegate; -@protocol OIDAuthStateErrorDelegate; -@protocol OIDExternalUserAgent; -@protocol OIDExternalUserAgentSession; - -NS_ASSUME_NONNULL_BEGIN - -/*! @brief Represents a block used to call an action with a fresh access token. - @param accessToken A valid access token if available. - @param idToken A valid ID token if available. - @param error The error if an error occurred. - */ -typedef void (^OIDAuthStateAction)(NSString *_Nullable accessToken, - NSString *_Nullable idToken, - NSError *_Nullable error); - -/*! @brief The method called when the @c - OIDAuthState.authStateByPresentingAuthorizationRequest:presentingViewController:callback: - method has completed or failed. - @param authState The auth state, if the authorization request succeeded. - @param error The error if an error occurred. - */ -typedef void (^OIDAuthStateAuthorizationCallback)(OIDAuthState *_Nullable authState, - NSError *_Nullable error); - -/*! @brief A convenience class that retains the auth state between @c OIDAuthorizationResponse%s - and @c OIDTokenResponse%s. - */ -@interface OIDAuthState : NSObject - -/*! @brief The most recent refresh token received from the server. - @discussion Rather than using this property directly, you should call - @c OIDAuthState.performActionWithFreshTokens:. - @remarks refresh_token - @see https://tools.ietf.org/html/rfc6749#section-5.1 - */ -@property(nonatomic, readonly, nullable) NSString *refreshToken; - -/*! @brief The scope of the current authorization grant. - @discussion This represents the latest scope returned by the server and may be a subset of the - scope that was initially granted. - @remarks scope - */ -@property(nonatomic, readonly, nullable) NSString *scope; - -/*! @brief The most recent authorization response used to update the authorization state. For the - implicit flow, this will contain the latest access token. - */ -@property(nonatomic, readonly) OIDAuthorizationResponse *lastAuthorizationResponse; - -/*! @brief The most recent token response used to update this authorization state. This will - contain the latest access token. - */ -@property(nonatomic, readonly, nullable) OIDTokenResponse *lastTokenResponse; - -/*! @brief The most recent registration response used to update this authorization state. This will - contain the latest client credentials. - */ -@property(nonatomic, readonly, nullable) OIDRegistrationResponse *lastRegistrationResponse; - -/*! @brief The authorization error that invalidated this @c OIDAuthState. - @discussion The authorization error encountered by @c OIDAuthState or set by the user via - @c OIDAuthState.updateWithAuthorizationError: that invalidated this @c OIDAuthState. - Authorization errors from @c OIDAuthState will always have a domain of - @c ::OIDOAuthAuthorizationErrorDomain or @c ::OIDOAuthTokenErrorDomain. Note: that after - unarchiving the @c OIDAuthState object, the \NSError_userInfo property of this error will - be nil. - */ -@property(nonatomic, readonly, nullable) NSError *authorizationError; - -/*! @brief Returns YES if the authorization state is not known to be invalid. - @discussion Returns YES if no OAuth errors have been received, and the last call resulted in a - successful access token or id token. This does not mean that the access is fresh - just - that it was valid the last time it was used. Note that network and other transient errors - do not invalidate the authorized state. If NO, you should authenticate the user again, - using a fresh authorization request. Invalid @c OIDAuthState objects may still be useful in - that case, to hint at the previously authorized user and streamline the re-authentication - experience. - */ -@property(nonatomic, readonly) BOOL isAuthorized; - -/*! @brief The @c OIDAuthStateChangeDelegate delegate. - @discussion Use the delegate to observe state changes (and update storage) as well as error - states. - */ -@property(nonatomic, weak, nullable) id stateChangeDelegate; - -/*! @brief The @c OIDAuthStateErrorDelegate delegate. - @discussion Use the delegate to observe state changes (and update storage) as well as error - states. - */ -@property(nonatomic, weak, nullable) id errorDelegate; - -/*! @brief Convenience method to create a @c OIDAuthState by presenting an authorization request - and performing the authorization code exchange in the case of code flow requests. For - the hybrid flow, the caller should validate the id_token and c_hash, then perform the token - request (@c OIDAuthorizationService.performTokenRequest:callback:) - and update the OIDAuthState with the results (@c - OIDAuthState.updateWithTokenResponse:error:). - @param authorizationRequest The authorization request to present. - @param externalUserAgent A external user agent that can present an external user-agent request. - @param callback The method called when the request has completed or failed. - @return A @c OIDExternalUserAgentSession instance which will terminate when it - receives a @c OIDExternalUserAgentSession.cancel message, or after processing a - @c OIDExternalUserAgentSession.resumeExternalUserAgentFlowWithURL: message. - */ -+ (id) - authStateByPresentingAuthorizationRequest:(OIDAuthorizationRequest *)authorizationRequest - externalUserAgent:(id)externalUserAgent - callback:(OIDAuthStateAuthorizationCallback)callback; - -/*! @internal - @brief Unavailable. Please use @c initWithAuthorizationResponse:. - */ -- (instancetype)init NS_UNAVAILABLE; - -/*! @brief Creates an auth state from an authorization response. - @param authorizationResponse The authorization response. - */ -- (instancetype)initWithAuthorizationResponse:(OIDAuthorizationResponse *)authorizationResponse; - -/*! @brief Creates an auth state from an authorization and token response. - @param authorizationResponse The authorization response. - @param tokenResponse The token response. - */ -- (instancetype)initWithAuthorizationResponse:(OIDAuthorizationResponse *)authorizationResponse - tokenResponse:(nullable OIDTokenResponse *)tokenResponse; - -/*! @brief Creates an auth state from an registration response. - @param registrationResponse The registration response. - */ -- (instancetype)initWithRegistrationResponse:(OIDRegistrationResponse *)registrationResponse; - -/*! @brief Creates an auth state from an authorization, token and registration response. - @param authorizationResponse The authorization response. - @param tokenResponse The token response. - @param registrationResponse The registration response. - */ -- (instancetype)initWithAuthorizationResponse: - (nullable OIDAuthorizationResponse *)authorizationResponse - tokenResponse:(nullable OIDTokenResponse *)tokenResponse - registrationResponse:(nullable OIDRegistrationResponse *)registrationResponse - NS_DESIGNATED_INITIALIZER; - -/*! @brief Updates the authorization state based on a new authorization response. - @param authorizationResponse The new authorization response to update the state with. - @param error Any error encountered when performing the authorization request. Errors in the - domain @c ::OIDOAuthAuthorizationErrorDomain are reflected in the auth state, other errors - are assumed to be transient, and ignored. - @discussion Typically called with the response from an incremental authorization request, - or if using the implicit flow. Will clear the @c #lastTokenResponse property. - */ -- (void)updateWithAuthorizationResponse:(nullable OIDAuthorizationResponse *)authorizationResponse - error:(nullable NSError *)error; - -/*! @brief Updates the authorization state based on a new token response. - @param tokenResponse The new token response to update the state from. - @param error Any error encountered when performing the authorization request. Errors in the - domain @c ::OIDOAuthTokenErrorDomain are reflected in the auth state, other errors - are assumed to be transient, and ignored. - @discussion Typically called with the response from an authorization code exchange, or a token - refresh. - */ -- (void)updateWithTokenResponse:(nullable OIDTokenResponse *)tokenResponse - error:(nullable NSError *)error; - -/*! @brief Updates the authorization state based on a new registration response. - @param registrationResponse The new registration response to update the state with. - @discussion Typically called with the response from a successful client registration - request. Will reset the auth state. - */ -- (void)updateWithRegistrationResponse:(nullable OIDRegistrationResponse *)registrationResponse; - -/*! @brief Updates the authorization state based on an authorization error. - @param authorizationError The authorization error. - @discussion Call this method if you receive an authorization error during an API call to - invalidate the authentication state of this @c OIDAuthState. Don't call with errors - unrelated to authorization, such as transient network errors. - The OIDAuthStateErrorDelegate.authState:didEncounterAuthorizationError: method of - @c #errorDelegate will be called with the error. - You may optionally use the convenience method - OIDErrorUtilities.resourceServerAuthorizationErrorWithCode:errorResponse:underlyingError: - to create \NSError objects for use here. - The latest error received is stored in @c #authorizationError. Note: that after unarchiving - this object, the \NSError_userInfo property of this error will be nil. - */ -- (void)updateWithAuthorizationError:(NSError *)authorizationError; - -/*! @brief Calls the block with a valid access token (refreshing it first, if needed), or if a - refresh was needed and failed, with the error that caused it to fail. - @param action The block to execute with a fresh token. This block will be executed on the main - thread. - */ -- (void)performActionWithFreshTokens:(OIDAuthStateAction)action; - -/*! @brief Calls the block with a valid access token (refreshing it first, if needed), or if a - refresh was needed and failed, with the error that caused it to fail. - @param action The block to execute with a fresh token. This block will be executed on the main - thread. - @param additionalParameters Additional parameters for the token request if token is - refreshed. - */ -- (void)performActionWithFreshTokens:(OIDAuthStateAction)action - additionalRefreshParameters: - (nullable NSDictionary *)additionalParameters; - -/*! @brief Calls the block with a valid access token (refreshing it first, if needed), or if a - refresh was needed and failed, with the error that caused it to fail. - @param action The block to execute with a fresh token. This block will be executed on the main - thread. - @param additionalParameters Additional parameters for the token request if token is - refreshed. - @param dispatchQueue The dispatchQueue on which to dispatch the action block. - */ -- (void)performActionWithFreshTokens:(OIDAuthStateAction)action - additionalRefreshParameters: - (nullable NSDictionary *)additionalParameters - dispatchQueue:(dispatch_queue_t)dispatchQueue; - -/*! @brief Forces a token refresh the next time @c OIDAuthState.performActionWithFreshTokens: is - called, even if the current tokens are considered valid. - */ -- (void)setNeedsTokenRefresh; - -/*! @brief Creates a token request suitable for refreshing an access token. - @return A @c OIDTokenRequest suitable for using a refresh token to obtain a new access token. - @discussion After performing the refresh, call @c OIDAuthState.updateWithTokenResponse:error: - to update the authorization state based on the response. Rather than doing the token refresh - yourself, you should use @c OIDAuthState.performActionWithFreshTokens:. - @see https://tools.ietf.org/html/rfc6749#section-1.5 - */ -- (nullable OIDTokenRequest *)tokenRefreshRequest; - -/*! @brief Creates a token request suitable for refreshing an access token. - @param additionalParameters Additional parameters for the token request. - @return A @c OIDTokenRequest suitable for using a refresh token to obtain a new access token. - @discussion After performing the refresh, call @c OIDAuthState.updateWithTokenResponse:error: - to update the authorization state based on the response. Rather than doing the token refresh - yourself, you should use @c OIDAuthState.performActionWithFreshTokens:. - @see https://tools.ietf.org/html/rfc6749#section-1.5 - */ -- (nullable OIDTokenRequest *)tokenRefreshRequestWithAdditionalParameters: - (nullable NSDictionary *)additionalParameters; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDAuthState.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDAuthState.m deleted file mode 100644 index fe8a1622..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDAuthState.m +++ /dev/null @@ -1,570 +0,0 @@ -/*! @file OIDAuthState.m - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDAuthState.h" - -#import "OIDAuthStateChangeDelegate.h" -#import "OIDAuthStateErrorDelegate.h" -#import "OIDAuthorizationRequest.h" -#import "OIDAuthorizationResponse.h" -#import "OIDAuthorizationService.h" -#import "OIDDefines.h" -#import "OIDError.h" -#import "OIDErrorUtilities.h" -#import "OIDRegistrationResponse.h" -#import "OIDTokenRequest.h" -#import "OIDTokenResponse.h" -#import "OIDTokenUtilities.h" - -/*! @brief Key used to encode the @c refreshToken property for @c NSSecureCoding. - */ -static NSString *const kRefreshTokenKey = @"refreshToken"; - -/*! @brief Key used to encode the @c needsTokenRefresh property for @c NSSecureCoding. - */ -static NSString *const kNeedsTokenRefreshKey = @"needsTokenRefresh"; - -/*! @brief Key used to encode the @c scope property for @c NSSecureCoding. - */ -static NSString *const kScopeKey = @"scope"; - -/*! @brief Key used to encode the @c lastAuthorizationResponse property for @c NSSecureCoding. - */ -static NSString *const kLastAuthorizationResponseKey = @"lastAuthorizationResponse"; - -/*! @brief Key used to encode the @c lastTokenResponse property for @c NSSecureCoding. - */ -static NSString *const kLastTokenResponseKey = @"lastTokenResponse"; - -/*! @brief Key used to encode the @c lastOAuthError property for @c NSSecureCoding. - */ -static NSString *const kAuthorizationErrorKey = @"authorizationError"; - -/*! @brief The exception thrown when a developer tries to create a refresh request from an - authorization request with no authorization code. - */ -static NSString *const kRefreshTokenRequestException = - @"Attempted to create a token refresh request from a token response with no refresh token."; - -/*! @brief Number of seconds the access token is refreshed before it actually expires. - */ -static const NSUInteger kExpiryTimeTolerance = 60; - -/*! @brief Object to hold OIDAuthState pending actions. - */ -@interface OIDAuthStatePendingAction : NSObject -@property(nonatomic, readonly, nullable) OIDAuthStateAction action; -@property(nonatomic, readonly, nullable) dispatch_queue_t dispatchQueue; -@end -@implementation OIDAuthStatePendingAction -- (id)initWithAction:(OIDAuthStateAction)action andDispatchQueue:(dispatch_queue_t)dispatchQueue { - self = [super init]; - if (self) { - _action = action; - _dispatchQueue = dispatchQueue; - } - return self; -} -@end - -@interface OIDAuthState () - -/*! @brief The access token generated by the authorization server. - @discussion Rather than using this property directly, you should call - @c OIDAuthState.withFreshTokenPerformAction:. - */ -@property(nonatomic, readonly, nullable) NSString *accessToken; - -/*! @brief The approximate expiration date & time of the access token. - @discussion Rather than using this property directly, you should call - @c OIDAuthState.withFreshTokenPerformAction:. - */ -@property(nonatomic, readonly, nullable) NSDate *accessTokenExpirationDate; - -/*! @brief ID Token value associated with the authenticated session. - @discussion Rather than using this property directly, you should call - OIDAuthState.withFreshTokenPerformAction:. - */ -@property(nonatomic, readonly, nullable) NSString *idToken; - -/*! @brief Private method, called when the internal state changes. - */ -- (void)didChangeState; - -@end - - -@implementation OIDAuthState { - /*! @brief Array of pending actions (use @c _pendingActionsSyncObject to synchronize access). - */ - NSMutableArray *_pendingActions; - - /*! @brief Object for synchronizing access to @c pendingActions. - */ - id _pendingActionsSyncObject; - - /*! @brief If YES, tokens will be refreshed on the next API call regardless of expiry. - */ - BOOL _needsTokenRefresh; -} - -#pragma mark - Convenience initializers - -+ (id) - authStateByPresentingAuthorizationRequest:(OIDAuthorizationRequest *)authorizationRequest - externalUserAgent:(id)externalUserAgent - callback:(OIDAuthStateAuthorizationCallback)callback { - // presents the authorization request - id authFlowSession = [OIDAuthorizationService - presentAuthorizationRequest:authorizationRequest - externalUserAgent:externalUserAgent - callback:^(OIDAuthorizationResponse *_Nullable authorizationResponse, - NSError *_Nullable authorizationError) { - // inspects response and processes further if needed (e.g. authorization - // code exchange) - if (authorizationResponse) { - if ([authorizationRequest.responseType - isEqualToString:OIDResponseTypeCode]) { - // if the request is for the code flow (NB. not hybrid), assumes the - // code is intended for this client, and performs the authorization - // code exchange - OIDTokenRequest *tokenExchangeRequest = - [authorizationResponse tokenExchangeRequest]; - [OIDAuthorizationService performTokenRequest:tokenExchangeRequest - originalAuthorizationResponse:authorizationResponse - callback:^(OIDTokenResponse *_Nullable tokenResponse, - NSError *_Nullable tokenError) { - OIDAuthState *authState; - if (tokenResponse) { - authState = [[OIDAuthState alloc] - initWithAuthorizationResponse: - authorizationResponse - tokenResponse:tokenResponse]; - } - callback(authState, tokenError); - }]; - } else { - // hybrid flow (code id_token). Two possible cases: - // 1. The code is not for this client, ie. will be sent to a - // webservice that performs the id token verification and token - // exchange - // 2. The code is for this client and, for security reasons, the - // application developer must verify the id_token signature and - // c_hash before calling the token endpoint - OIDAuthState *authState = [[OIDAuthState alloc] - initWithAuthorizationResponse:authorizationResponse]; - callback(authState, authorizationError); - } - } else { - callback(nil, authorizationError); - } - }]; - return authFlowSession; -} - -#pragma mark - Initializers - -- (nonnull instancetype)init - OID_UNAVAILABLE_USE_INITIALIZER(@selector(initWithAuthorizationResponse:tokenResponse:)) - -/*! @brief Creates an auth state from an authorization response. - @param authorizationResponse The authorization response. - */ -- (instancetype)initWithAuthorizationResponse:(OIDAuthorizationResponse *)authorizationResponse { - return [self initWithAuthorizationResponse:authorizationResponse tokenResponse:nil]; -} - - -/*! @brief Designated initializer. - @param authorizationResponse The authorization response. - @discussion Creates an auth state from an authorization response and token response. - */ -- (instancetype)initWithAuthorizationResponse:(OIDAuthorizationResponse *)authorizationResponse - tokenResponse:(nullable OIDTokenResponse *)tokenResponse { - return [self initWithAuthorizationResponse:authorizationResponse - tokenResponse:tokenResponse - registrationResponse:nil]; -} - -/*! @brief Creates an auth state from an registration response. - @param registrationResponse The registration response. - */ -- (instancetype)initWithRegistrationResponse:(OIDRegistrationResponse *)registrationResponse { - return [self initWithAuthorizationResponse:nil - tokenResponse:nil - registrationResponse:registrationResponse]; -} - -- (instancetype)initWithAuthorizationResponse: - (nullable OIDAuthorizationResponse *)authorizationResponse - tokenResponse:(nullable OIDTokenResponse *)tokenResponse - registrationResponse:(nullable OIDRegistrationResponse *)registrationResponse { - self = [super init]; - if (self) { - _pendingActionsSyncObject = [[NSObject alloc] init]; - - if (registrationResponse) { - [self updateWithRegistrationResponse:registrationResponse]; - } - - if (authorizationResponse) { - [self updateWithAuthorizationResponse:authorizationResponse error:nil]; - } - - if (tokenResponse) { - [self updateWithTokenResponse:tokenResponse error:nil]; - } - } - return self; -} - -#pragma mark - NSObject overrides - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@: %p, isAuthorized: %@, refreshToken: \"%@\", " - "scope: \"%@\", accessToken: \"%@\", " - "accessTokenExpirationDate: %@, idToken: \"%@\", " - "lastAuthorizationResponse: %@, lastTokenResponse: %@, " - "lastRegistrationResponse: %@, authorizationError: %@>", - NSStringFromClass([self class]), - (void *)self, - (self.isAuthorized) ? @"YES" : @"NO", - [OIDTokenUtilities redact:_refreshToken], - _scope, - [OIDTokenUtilities redact:self.accessToken], - self.accessTokenExpirationDate, - [OIDTokenUtilities redact:self.idToken], - _lastAuthorizationResponse, - _lastTokenResponse, - _lastRegistrationResponse, - _authorizationError]; -} - -#pragma mark - NSSecureCoding - -+ (BOOL)supportsSecureCoding { - return YES; -} - -- (instancetype)initWithCoder:(NSCoder *)aDecoder { - _lastAuthorizationResponse = [aDecoder decodeObjectOfClass:[OIDAuthorizationResponse class] - forKey:kLastAuthorizationResponseKey]; - _lastTokenResponse = [aDecoder decodeObjectOfClass:[OIDTokenResponse class] - forKey:kLastTokenResponseKey]; - self = [self initWithAuthorizationResponse:_lastAuthorizationResponse - tokenResponse:_lastTokenResponse]; - if (self) { - _authorizationError = - [aDecoder decodeObjectOfClass:[NSError class] forKey:kAuthorizationErrorKey]; - _scope = [aDecoder decodeObjectOfClass:[NSString class] forKey:kScopeKey]; - _refreshToken = [aDecoder decodeObjectOfClass:[NSString class] forKey:kRefreshTokenKey]; - _needsTokenRefresh = [aDecoder decodeBoolForKey:kNeedsTokenRefreshKey]; - } - return self; -} - -- (void)encodeWithCoder:(NSCoder *)aCoder { - [aCoder encodeObject:_lastAuthorizationResponse forKey:kLastAuthorizationResponseKey]; - [aCoder encodeObject:_lastTokenResponse forKey:kLastTokenResponseKey]; - if (_authorizationError) { - NSError *codingSafeAuthorizationError = [NSError errorWithDomain:_authorizationError.domain - code:_authorizationError.code - userInfo:nil]; - [aCoder encodeObject:codingSafeAuthorizationError forKey:kAuthorizationErrorKey]; - } - [aCoder encodeObject:_scope forKey:kScopeKey]; - [aCoder encodeObject:_refreshToken forKey:kRefreshTokenKey]; - [aCoder encodeBool:_needsTokenRefresh forKey:kNeedsTokenRefreshKey]; -} - -#pragma mark - Private convenience getters - -- (NSString *)accessToken { - if (_authorizationError) { - return nil; - } - return _lastTokenResponse ? _lastTokenResponse.accessToken - : _lastAuthorizationResponse.accessToken; -} - -- (NSString *)tokenType { - if (_authorizationError) { - return nil; - } - return _lastTokenResponse ? _lastTokenResponse.tokenType - : _lastAuthorizationResponse.tokenType; -} - -- (NSDate *)accessTokenExpirationDate { - if (_authorizationError) { - return nil; - } - return _lastTokenResponse ? _lastTokenResponse.accessTokenExpirationDate - : _lastAuthorizationResponse.accessTokenExpirationDate; -} - -- (NSString *)idToken { - if (_authorizationError) { - return nil; - } - return _lastTokenResponse ? _lastTokenResponse.idToken - : _lastAuthorizationResponse.idToken; -} - -#pragma mark - Getters - -- (BOOL)isAuthorized { - return !self.authorizationError && (self.accessToken || self.idToken || self.refreshToken); -} - -#pragma mark - Updating the state - -- (void)updateWithRegistrationResponse:(OIDRegistrationResponse *)registrationResponse { - _lastRegistrationResponse = registrationResponse; - _refreshToken = nil; - _scope = nil; - _lastAuthorizationResponse = nil; - _lastTokenResponse = nil; - _authorizationError = nil; - [self didChangeState]; -} - -- (void)updateWithAuthorizationResponse:(nullable OIDAuthorizationResponse *)authorizationResponse - error:(nullable NSError *)error { - // If the error is an OAuth authorization error, updates the state. Other errors are ignored. - if (error.domain == OIDOAuthAuthorizationErrorDomain) { - [self updateWithAuthorizationError:error]; - return; - } - if (!authorizationResponse) { - return; - } - - _lastAuthorizationResponse = authorizationResponse; - - // clears the last token response and refresh token as these now relate to an old authorization - // that is no longer relevant - _lastTokenResponse = nil; - _refreshToken = nil; - _authorizationError = nil; - - // if the response's scope is nil, it means that it equals that of the request - // see: https://tools.ietf.org/html/rfc6749#section-5.1 - _scope = (authorizationResponse.scope) ? authorizationResponse.scope - : authorizationResponse.request.scope; - - [self didChangeState]; -} - -- (void)updateWithTokenResponse:(nullable OIDTokenResponse *)tokenResponse - error:(nullable NSError *)error { - if (_authorizationError) { - // Calling updateWithTokenResponse while in an error state probably means the developer obtained - // a new token and did the exchange without also calling updateWithAuthorizationResponse. - // Attempts to handle gracefully, but warns the developer that this is unexpected. - NSLog(@"OIDAuthState:updateWithTokenResponse should not be called in an error state [%@] call" - "updateWithAuthorizationResponse with the result of the fresh authorization response" - "first", - _authorizationError); - - _authorizationError = nil; - } - - // If the error is an OAuth authorization error, updates the state. Other errors are ignored. - if (error.domain == OIDOAuthTokenErrorDomain) { - [self updateWithAuthorizationError:error]; - return; - } - if (!tokenResponse) { - return; - } - - _lastTokenResponse = tokenResponse; - - // updates the scope and refresh token if they are present on the TokenResponse. - // according to the spec, these may be changed by the server, including when refreshing the - // access token. See: https://tools.ietf.org/html/rfc6749#section-5.1 and - // https://tools.ietf.org/html/rfc6749#section-6 - if (tokenResponse.scope) { - _scope = tokenResponse.scope; - } - if (tokenResponse.refreshToken) { - _refreshToken = tokenResponse.refreshToken; - } - - [self didChangeState]; -} - -- (void)updateWithAuthorizationError:(NSError *)oauthError { - _authorizationError = oauthError; - - [self didChangeState]; - - [_errorDelegate authState:self didEncounterAuthorizationError:oauthError]; -} - -#pragma mark - OAuth Requests - -- (OIDTokenRequest *)tokenRefreshRequest { - return [self tokenRefreshRequestWithAdditionalParameters:nil]; -} - -- (OIDTokenRequest *)tokenRefreshRequestWithAdditionalParameters: - (NSDictionary *)additionalParameters { - - // TODO: Add unit test to confirm exception is thrown when expected - - if (!_refreshToken) { - [OIDErrorUtilities raiseException:kRefreshTokenRequestException]; - } - return [[OIDTokenRequest alloc] - initWithConfiguration:_lastAuthorizationResponse.request.configuration - grantType:OIDGrantTypeRefreshToken - authorizationCode:nil - redirectURL:nil - clientID:_lastAuthorizationResponse.request.clientID - clientSecret:_lastAuthorizationResponse.request.clientSecret - scope:nil - refreshToken:_refreshToken - codeVerifier:nil - additionalParameters:additionalParameters]; -} - -#pragma mark - Stateful Actions - -- (void)didChangeState { - [_stateChangeDelegate didChangeState:self]; -} - -- (void)setNeedsTokenRefresh { - _needsTokenRefresh = YES; -} - -- (void)performActionWithFreshTokens:(OIDAuthStateAction)action { - [self performActionWithFreshTokens:action additionalRefreshParameters:nil]; -} - -- (void)performActionWithFreshTokens:(OIDAuthStateAction)action - additionalRefreshParameters: - (nullable NSDictionary *)additionalParameters { - [self performActionWithFreshTokens:action - additionalRefreshParameters:additionalParameters - dispatchQueue:dispatch_get_main_queue()]; -} - -- (void)performActionWithFreshTokens:(OIDAuthStateAction)action - additionalRefreshParameters: - (nullable NSDictionary *)additionalParameters - dispatchQueue:(dispatch_queue_t)dispatchQueue { - - if ([self isTokenFresh]) { - // access token is valid within tolerance levels, perform action - dispatch_async(dispatchQueue, ^{ - action(self.accessToken, self.idToken, nil); - }); - return; - } - - if (!_refreshToken) { - // no refresh token available and token has expired - NSError *tokenRefreshError = [ - OIDErrorUtilities errorWithCode:OIDErrorCodeTokenRefreshError - underlyingError:nil - description:@"Unable to refresh expired token without a refresh token."]; - dispatch_async(dispatchQueue, ^{ - action(nil, nil, tokenRefreshError); - }); - return; - } - - // access token is expired, first refresh the token, then perform action - NSAssert(_pendingActionsSyncObject, @"_pendingActionsSyncObject cannot be nil", @""); - OIDAuthStatePendingAction* pendingAction = - [[OIDAuthStatePendingAction alloc] initWithAction:action andDispatchQueue:dispatchQueue]; - @synchronized(_pendingActionsSyncObject) { - // if a token is already in the process of being refreshed, adds to pending actions - if (_pendingActions) { - [_pendingActions addObject:pendingAction]; - return; - } - - // creates a list of pending actions, starting with this one - _pendingActions = [NSMutableArray arrayWithObject:pendingAction]; - } - - // refresh the tokens - OIDTokenRequest *tokenRefreshRequest = - [self tokenRefreshRequestWithAdditionalParameters:additionalParameters]; - [OIDAuthorizationService performTokenRequest:tokenRefreshRequest - originalAuthorizationResponse:_lastAuthorizationResponse - callback:^(OIDTokenResponse *_Nullable response, - NSError *_Nullable error) { - // update OIDAuthState based on response - if (response) { - self->_needsTokenRefresh = NO; - [self updateWithTokenResponse:response error:nil]; - } else { - if (error.domain == OIDOAuthTokenErrorDomain) { - self->_needsTokenRefresh = NO; - [self updateWithAuthorizationError:error]; - } else { - if ([self->_errorDelegate respondsToSelector: - @selector(authState:didEncounterTransientError:)]) { - [self->_errorDelegate authState:self didEncounterTransientError:error]; - } - } - } - - // nil the pending queue and process everything that was queued up - NSArray *actionsToProcess; - @synchronized(self->_pendingActionsSyncObject) { - actionsToProcess = self->_pendingActions; - self->_pendingActions = nil; - } - for (OIDAuthStatePendingAction* actionToProcess in actionsToProcess) { - dispatch_async(actionToProcess.dispatchQueue, ^{ - actionToProcess.action(self.accessToken, self.idToken, error); - }); - } - }]; -} - -#pragma mark - - -/*! @fn isTokenFresh - @brief Determines whether a token refresh request must be made to refresh the tokens. - */ -- (BOOL)isTokenFresh { - if (_needsTokenRefresh) { - // forced refresh - return NO; - } - - if (!self.accessTokenExpirationDate) { - // if there is no expiration time but we have an access token, it is assumed to never expire - return !!self.accessToken; - } - - // has the token expired? - BOOL tokenFresh = [self.accessTokenExpirationDate timeIntervalSinceNow] > kExpiryTimeTolerance; - return tokenFresh; -} - -@end - - diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDAuthStateChangeDelegate.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDAuthStateChangeDelegate.h deleted file mode 100644 index 2570df13..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDAuthStateChangeDelegate.h +++ /dev/null @@ -1,39 +0,0 @@ -/*! @file OIDAuthStateChangeDelegate.h - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -@class OIDAuthState; - -NS_ASSUME_NONNULL_BEGIN - -/*! @protocol OIDAuthStateChangeDelegate - @brief Delegate of the OIDAuthState used to monitor various changes in state. - */ -@protocol OIDAuthStateChangeDelegate - -/*! @brief Called when the authorization state changes and any backing storage needs to be updated. - @param state The @c OIDAuthState that changed. - @discussion If you are storing the authorization state, you should update the storage when the - state changes. - */ -- (void)didChangeState:(OIDAuthState *)state; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDAuthStateErrorDelegate.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDAuthStateErrorDelegate.h deleted file mode 100644 index 91a9b1cd..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDAuthStateErrorDelegate.h +++ /dev/null @@ -1,62 +0,0 @@ -/*! @file OIDAuthStateErrorDelegate.h - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -@class OIDAuthState; - -NS_ASSUME_NONNULL_BEGIN - -/*! @protocol OIDAuthStateErrorDelegate - @brief Delegate of the OIDAuthState used to monitor errors. - */ -@protocol OIDAuthStateErrorDelegate - -/*! @brief Called when an authentication occurs, which indicates the auth session is invalid. - @param state The @c OIDAuthState on which the error occurred. - @param error The authorization error. - @discussion This is a hard error (not a transient network issue) that indicates a problem with - the authorization. You should stop using the @c OIDAuthState when such an error is - encountered. If the \NSError_code is @c ::OIDErrorCodeOAuthInvalidGrant then - the session may be recoverable with user interaction (i.e. re-authentication). In all cases - you should consider the user unauthorized, and remove locally cached resources that require - that authorization. @c OIDAuthState will call this method automatically if it encounters - an OAuth error (that is, an HTTP 400 response with a valid OAuth error response) during - authorization or token refresh (such as performed automatically when using - @c OIDAuthState.performActionWithFreshTokens:). You can signal authorization errors with - @c OIDAuthState.updateWithAuthorizationError:. - @see https://tools.ietf.org/html/rfc6749#section-5.2 - */ -- (void)authState:(OIDAuthState *)state didEncounterAuthorizationError:(NSError *)error; - -@optional - -/*! @brief Called when a network or other transient error occurs. - @param state The @c OIDAuthState on which the error occurred. - @param error The transient error. - @discussion This is a soft error, typically network related. The @c OIDAuthState is likely - still valid, and should not be discarded. Retry the request using an incremental backoff - strategy. This is only called when using the @c OIDAuthState convenience methods such as - @c OIDAuthState.performActionWithFreshTokens:. If you are refreshing the tokens yourself - outside of @c OIDAuthState class, it will never be called. - */ -- (void)authState:(OIDAuthState *)state didEncounterTransientError:(NSError *)error; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDAuthorizationRequest.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDAuthorizationRequest.h deleted file mode 100644 index eff3c648..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDAuthorizationRequest.h +++ /dev/null @@ -1,250 +0,0 @@ -/*! @file OIDAuthorizationRequest.h - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -// These files only declare string constants useful for constructing a @c OIDAuthorizationRequest, -// so they are imported here for convenience. -#import "OIDExternalUserAgentRequest.h" -#import "OIDResponseTypes.h" -#import "OIDScopes.h" - -@class OIDServiceConfiguration; - -NS_ASSUME_NONNULL_BEGIN - -/*! @brief The @c code_challenge_method value for the S256 code challenge. - @see https://tools.ietf.org/html/rfc7636#section-4.3 - */ -extern NSString *const OIDOAuthorizationRequestCodeChallengeMethodS256; - - -/*! @brief Represents an authorization request. - @see https://tools.ietf.org/html/rfc6749#section-4 - @see https://tools.ietf.org/html/rfc6749#section-4.1.1 - */ -@interface OIDAuthorizationRequest : - NSObject - -/*! @brief The service's configuration. - @remarks This configuration specifies how to connect to a particular OAuth provider. - Configurations may be created manually, or via an OpenID Connect Discovery Document. - */ -@property(nonatomic, readonly) OIDServiceConfiguration *configuration; - -/*! @brief The expected response type. - @remarks response_type - @discussion Generally 'code' if pure OAuth, otherwise a space-delimited list of of response - types including 'code', 'token', and 'id_token' for OpenID Connect. - @see https://tools.ietf.org/html/rfc6749#section-3.1.1 - @see http://openid.net/specs/openid-connect-core-1_0.html#rfc.section.3 - */ -@property(nonatomic, readonly) NSString *responseType; - -/*! @brief The client identifier. - @remarks client_id - @see https://tools.ietf.org/html/rfc6749#section-2.2 - */ -@property(nonatomic, readonly) NSString *clientID; - -/*! @brief The client secret. - @remarks client_secret - @discussion The client secret is used to prove that identity of the client when exchaning an - authorization code for an access token. - The client secret is not passed in the authorizationRequestURL. It is only used when - exchanging the authorization code for an access token. - @see https://tools.ietf.org/html/rfc6749#section-2.3.1 - */ -@property(nonatomic, readonly, nullable) NSString *clientSecret; - -/*! @brief The value of the scope parameter is expressed as a list of space-delimited, - case-sensitive strings. - @remarks scope - @see https://tools.ietf.org/html/rfc6749#section-3.3 - */ -@property(nonatomic, readonly, nullable) NSString *scope; - -/*! @brief The client's redirect URI. - @remarks redirect_uri - @see https://tools.ietf.org/html/rfc6749#section-3.1.2 - */ -@property(nonatomic, readonly, nullable) NSURL *redirectURL; - -/*! @brief An opaque value used by the client to maintain state between the request and callback. - @remarks state - @discussion If this value is not explicitly set, this library will automatically add state and - perform appropriate validation of the state in the authorization response. It is recommended - that the default implementation of this parameter be used wherever possible. Typically used - to prevent CSRF attacks, as recommended in RFC6819 Section 5.3.5. - @see https://tools.ietf.org/html/rfc6749#section-4.1.1 - @see https://tools.ietf.org/html/rfc6819#section-5.3.5 - */ -@property(nonatomic, readonly, nullable) NSString *state; - -/*! @brief String value used to associate a Client session with an ID Token, and to mitigate replay - attacks. The value is passed through unmodified from the Authentication Request to the ID - Token. Sufficient entropy MUST be present in the nonce values used to prevent attackers from - guessing values. - @remarks nonce - @discussion If this value is not explicitly set, this library will automatically add nonce and - perform appropriate validation of the nonce in the ID Token. - @see https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest - */ -@property(nonatomic, readonly, nullable) NSString *nonce; - -/*! @brief The PKCE code verifier. - @remarks code_verifier - @discussion The code verifier itself is not included in the authorization request that is sent - on the wire, but needs to be in the token exchange request. - @c OIDAuthorizationResponse.tokenExchangeRequest will create a @c OIDTokenRequest that - includes this parameter automatically. - @see https://tools.ietf.org/html/rfc7636#section-4.1 - */ -@property(nonatomic, readonly, nullable) NSString *codeVerifier; - -/*! @brief The PKCE code challenge, derived from #codeVerifier. - @remarks code_challenge - @see https://tools.ietf.org/html/rfc7636#section-4.2 - */ -@property(nonatomic, readonly, nullable) NSString *codeChallenge; - -/*! @brief The method used to compute the @c #codeChallenge - @remarks code_challenge_method - @see https://tools.ietf.org/html/rfc7636#section-4.3 - */ -@property(nonatomic, readonly, nullable) NSString *codeChallengeMethod; - -/*! @brief The client's additional authorization parameters. - @see https://tools.ietf.org/html/rfc6749#section-3.1 - */ -@property(nonatomic, readonly, nullable) NSDictionary *additionalParameters; - -/*! @internal - @brief Unavailable. Please use - @c initWithConfiguration:clientId:scopes:redirectURL:additionalParameters:. - */ -- (instancetype)init NS_UNAVAILABLE; - -/*! @brief Creates an authorization request with opinionated defaults (a secure @c state, and - PKCE with S256 as the @c code_challenge_method). - @param configuration The service's configuration. - @param clientID The client identifier. - @param scopes An array of scopes to combine into a single scope string per the OAuth2 spec. - @param redirectURL The client's redirect URI. - @param responseType The expected response type. - @param additionalParameters The client's additional authorization parameters. - @remarks This convenience initializer generates a state parameter and PKCE challenges - automatically. - */ -- (instancetype) - initWithConfiguration:(OIDServiceConfiguration *)configuration - clientId:(NSString *)clientID - scopes:(nullable NSArray *)scopes - redirectURL:(NSURL *)redirectURL - responseType:(NSString *)responseType - additionalParameters:(nullable NSDictionary *)additionalParameters; - -/*! @brief Creates an authorization request with opinionated defaults (a secure @c state, @c nonce, - and PKCE with S256 as the @c code_challenge_method). - @param configuration The service's configuration. - @param clientID The client identifier. - @param clientSecret The client secret. - @param scopes An array of scopes to combine into a single scope string per the OAuth2 spec. - @param redirectURL The client's redirect URI. - @param responseType The expected response type. - @param additionalParameters The client's additional authorization parameters. - @remarks This convenience initializer generates a state parameter and PKCE challenges - automatically. - */ -- (instancetype) - initWithConfiguration:(OIDServiceConfiguration *)configuration - clientId:(NSString *)clientID - clientSecret:(nullable NSString *)clientSecret - scopes:(nullable NSArray *)scopes - redirectURL:(NSURL *)redirectURL - responseType:(NSString *)responseType - additionalParameters:(nullable NSDictionary *)additionalParameters; - -/*! @brief Designated initializer. - @param configuration The service's configuration. - @param clientID The client identifier. - @param scope A scope string per the OAuth2 spec (a space-delimited set of scopes). - @param redirectURL The client's redirect URI. - @param responseType The expected response type. - @param state An opaque value used by the client to maintain state between the request and - callback. - @param nonce String value used to associate a Client session with an ID Token. Can be set to nil - if not using OpenID Connect, although pure OAuth servers should ignore params they don't - understand anyway. - @param codeVerifier The PKCE code verifier. See @c OIDAuthorizationRequest.generateCodeVerifier. - @param codeChallenge The PKCE code challenge, calculated from the code verifier such as with - @c OIDAuthorizationRequest.codeChallengeS256ForVerifier:. - @param codeChallengeMethod The PKCE code challenge method. - ::OIDOAuthorizationRequestCodeChallengeMethodS256 when - @c OIDAuthorizationRequest.codeChallengeS256ForVerifier: is used to create the code - challenge. - @param additionalParameters The client's additional authorization parameters. - */ -- (instancetype) - initWithConfiguration:(OIDServiceConfiguration *)configuration - clientId:(NSString *)clientID - clientSecret:(nullable NSString *)clientSecret - scope:(nullable NSString *)scope - redirectURL:(nullable NSURL *)redirectURL - responseType:(NSString *)responseType - state:(nullable NSString *)state - nonce:(nullable NSString *)nonce - codeVerifier:(nullable NSString *)codeVerifier - codeChallenge:(nullable NSString *)codeChallenge - codeChallengeMethod:(nullable NSString *)codeChallengeMethod - additionalParameters:(nullable NSDictionary *)additionalParameters - NS_DESIGNATED_INITIALIZER; - -/*! @brief Constructs the request URI by adding the request parameters to the query component of the - authorization endpoint URI using the "application/x-www-form-urlencoded" format. - @return A URL representing the authorization request. - @see https://tools.ietf.org/html/rfc6749#section-4.1.1 - */ -- (NSURL *)authorizationRequestURL; - -/*! @brief Generates an OAuth state param using a random source. - @return The generated state. - @see https://tools.ietf.org/html/rfc6819#section-5.3.5 - */ -+ (nullable NSString *)generateState; - -/*! @brief Constructs a PKCE-compliant code verifier. - @return The generated code verifier. - @see https://tools.ietf.org/html/rfc7636#section-4.1 - */ -+ (nullable NSString *)generateCodeVerifier; - -/*! @brief Creates a PKCE S256 codeChallenge from the codeVerifier. - @param codeVerifier The code verifier from which the code challenge will be derived. - @return The generated code challenge. - @details Generate a secure code verifier to pass into this method with - @c OIDAuthorizationRequest.generateCodeVerifier. The matching @c #codeChallengeMethod for - @c #codeChallenge%s created by this method is - ::OIDOAuthorizationRequestCodeChallengeMethodS256. - @see https://tools.ietf.org/html/rfc7636#section-4.1 - */ -+ (nullable NSString *)codeChallengeS256ForVerifier:(nullable NSString *)codeVerifier; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDAuthorizationRequest.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDAuthorizationRequest.m deleted file mode 100644 index ccfacda0..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDAuthorizationRequest.m +++ /dev/null @@ -1,351 +0,0 @@ -/*! @file OIDAuthorizationRequest.m - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDAuthorizationRequest.h" - -#import "OIDDefines.h" -#import "OIDScopeUtilities.h" -#import "OIDServiceConfiguration.h" -#import "OIDTokenUtilities.h" -#import "OIDURLQueryComponent.h" - -/*! @brief The key for the @c configuration property for @c NSSecureCoding - */ -static NSString *const kConfigurationKey = @"configuration"; - -/*! @brief Key used to encode the @c responseType property for @c NSSecureCoding, and on the URL - request. - */ -static NSString *const kResponseTypeKey = @"response_type"; - -/*! @brief Key used to encode the @c clientID property for @c NSSecureCoding, and on the URL - request. - */ -static NSString *const kClientIDKey = @"client_id"; - -/*! @brief Key used to encode the @c clientSecret property for @c NSSecureCoding. - */ -static NSString *const kClientSecretKey = @"client_secret"; - -/*! @brief Key used to encode the @c scope property for @c NSSecureCoding, and on the URL request. - */ -static NSString *const kScopeKey = @"scope"; - -/*! @brief Key used to encode the @c redirectURL property for @c NSSecureCoding, and on the URL - request. - */ -static NSString *const kRedirectURLKey = @"redirect_uri"; - -/*! @brief Key used to encode the @c state property for @c NSSecureCoding, and on the URL request. - */ -static NSString *const kStateKey = @"state"; - -/*! @brief Key used to encode the @c nonce property for @c NSSecureCoding, and on the URL request. - */ -static NSString *const kNonceKey = @"nonce"; - -/*! @brief Key used to encode the @c codeVerifier property for @c NSSecureCoding. - */ -static NSString *const kCodeVerifierKey = @"code_verifier"; - -/*! @brief Key used to send the @c codeChallenge on the URL request. - */ -static NSString *const kCodeChallengeKey = @"code_challenge"; - -/*! @brief Key used to send the @c codeChallengeMethod on the URL request. - */ -static NSString *const kCodeChallengeMethodKey = @"code_challenge_method"; - -/*! @brief Key used to encode the @c additionalParameters property for - @c NSSecureCoding - */ -static NSString *const kAdditionalParametersKey = @"additionalParameters"; - -/*! @brief Number of random bytes generated for the @ state. - */ -static NSUInteger const kStateSizeBytes = 32; - -/*! @brief Number of random bytes generated for the @ codeVerifier. - */ -static NSUInteger const kCodeVerifierBytes = 32; - -/*! @brief Assertion text for unsupported response types. - */ -static NSString *const OIDOAuthUnsupportedResponseTypeMessage = - @"The response_type \"%@\" isn't supported. AppAuth only supports the \"code\" or \"code id_token\" response_type."; - -/*! @brief Code challenge request method. - */ -NSString *const OIDOAuthorizationRequestCodeChallengeMethodS256 = @"S256"; - -@implementation OIDAuthorizationRequest - -- (instancetype)init - OID_UNAVAILABLE_USE_INITIALIZER( - @selector(initWithConfiguration: - clientId: - scopes: - redirectURL: - responseType: - additionalParameters:) - ) - -/*! @brief Check if the response type is one AppAuth supports - @remarks AppAuth only supports the `code` and `code id_token` response types. - @see https://github.com/openid/AppAuth-iOS/issues/98 - @see https://github.com/openid/AppAuth-iOS/issues/292 - */ -+ (BOOL)isSupportedResponseType:(NSString *)responseType -{ - NSString *codeIdToken = [@[OIDResponseTypeCode, OIDResponseTypeIDToken] - componentsJoinedByString:@" "]; - NSString *idTokenCode = [@[OIDResponseTypeIDToken, OIDResponseTypeCode] - componentsJoinedByString:@" "]; - - return [responseType isEqualToString:OIDResponseTypeCode] - || [responseType isEqualToString:codeIdToken] - || [responseType isEqualToString:idTokenCode]; -} - -- (instancetype)initWithConfiguration:(OIDServiceConfiguration *)configuration - clientId:(NSString *)clientID - clientSecret:(nullable NSString *)clientSecret - scope:(nullable NSString *)scope - redirectURL:(NSURL *)redirectURL - responseType:(NSString *)responseType - state:(nullable NSString *)state - nonce:(nullable NSString *)nonce - codeVerifier:(nullable NSString *)codeVerifier - codeChallenge:(nullable NSString *)codeChallenge - codeChallengeMethod:(nullable NSString *)codeChallengeMethod - additionalParameters:(nullable NSDictionary *)additionalParameters -{ - self = [super init]; - if (self) { - _configuration = [configuration copy]; - _clientID = [clientID copy]; - _clientSecret = [clientSecret copy]; - _scope = [scope copy]; - _redirectURL = [redirectURL copy]; - _responseType = [responseType copy]; - if (![[self class] isSupportedResponseType:_responseType]) { - NSAssert(NO, OIDOAuthUnsupportedResponseTypeMessage, _responseType); - return nil; - } - _state = [state copy]; - _nonce = [nonce copy]; - _codeVerifier = [codeVerifier copy]; - _codeChallenge = [codeChallenge copy]; - _codeChallengeMethod = [codeChallengeMethod copy]; - - _additionalParameters = - [[NSDictionary alloc] initWithDictionary:additionalParameters copyItems:YES]; - } - return self; -} - -- (instancetype) - initWithConfiguration:(OIDServiceConfiguration *)configuration - clientId:(NSString *)clientID - clientSecret:(NSString *)clientSecret - scopes:(nullable NSArray *)scopes - redirectURL:(NSURL *)redirectURL - responseType:(NSString *)responseType - additionalParameters:(nullable NSDictionary *)additionalParameters { - - // generates PKCE code verifier and challenge - NSString *codeVerifier = [[self class] generateCodeVerifier]; - NSString *codeChallenge = [[self class] codeChallengeS256ForVerifier:codeVerifier]; - - return [self initWithConfiguration:configuration - clientId:clientID - clientSecret:clientSecret - scope:[OIDScopeUtilities scopesWithArray:scopes] - redirectURL:redirectURL - responseType:responseType - state:[[self class] generateState] - nonce:[[self class] generateState] - codeVerifier:codeVerifier - codeChallenge:codeChallenge - codeChallengeMethod:OIDOAuthorizationRequestCodeChallengeMethodS256 - additionalParameters:additionalParameters]; -} - -- (instancetype) - initWithConfiguration:(OIDServiceConfiguration *)configuration - clientId:(NSString *)clientID - scopes:(nullable NSArray *)scopes - redirectURL:(NSURL *)redirectURL - responseType:(NSString *)responseType - additionalParameters:(nullable NSDictionary *)additionalParameters { - return [self initWithConfiguration:configuration - clientId:clientID - clientSecret:nil - scopes:scopes - redirectURL:redirectURL - responseType:responseType - additionalParameters:additionalParameters]; -} - -#pragma mark - NSCopying - -- (instancetype)copyWithZone:(nullable NSZone *)zone { - // The documentation for NSCopying specifically advises us to return a reference to the original - // instance in the case where instances are immutable (as ours is): - // "Implement NSCopying by retaining the original instead of creating a new copy when the class - // and its contents are immutable." - return self; -} - -#pragma mark - NSSecureCoding - -+ (BOOL)supportsSecureCoding { - return YES; -} - -- (instancetype)initWithCoder:(NSCoder *)aDecoder { - OIDServiceConfiguration *configuration = - [aDecoder decodeObjectOfClass:[OIDServiceConfiguration class] - forKey:kConfigurationKey]; - NSString *responseType = [aDecoder decodeObjectOfClass:[NSString class] forKey:kResponseTypeKey]; - NSString *clientID = [aDecoder decodeObjectOfClass:[NSString class] forKey:kClientIDKey]; - NSString *clientSecret = [aDecoder decodeObjectOfClass:[NSString class] forKey:kClientSecretKey]; - NSString *scope = [aDecoder decodeObjectOfClass:[NSString class] forKey:kScopeKey]; - NSURL *redirectURL = [aDecoder decodeObjectOfClass:[NSURL class] forKey:kRedirectURLKey]; - NSString *state = [aDecoder decodeObjectOfClass:[NSString class] forKey:kStateKey]; - NSString *nonce = [aDecoder decodeObjectOfClass:[NSString class] forKey:kNonceKey]; - NSString *codeVerifier = [aDecoder decodeObjectOfClass:[NSString class] forKey:kCodeVerifierKey]; - NSString *codeChallenge = - [aDecoder decodeObjectOfClass:[NSString class] forKey:kCodeChallengeKey]; - NSString *codeChallengeMethod = - [aDecoder decodeObjectOfClass:[NSString class] forKey:kCodeChallengeMethodKey]; - NSSet *additionalParameterCodingClasses = [NSSet setWithArray:@[ - [NSDictionary class], - [NSString class] - ]]; - NSDictionary *additionalParameters = - [aDecoder decodeObjectOfClasses:additionalParameterCodingClasses - forKey:kAdditionalParametersKey]; - - self = [self initWithConfiguration:configuration - clientId:clientID - clientSecret:clientSecret - scope:scope - redirectURL:redirectURL - responseType:responseType - state:state - nonce:nonce - codeVerifier:codeVerifier - codeChallenge:codeChallenge - codeChallengeMethod:codeChallengeMethod - additionalParameters:additionalParameters]; - return self; -} - -- (void)encodeWithCoder:(NSCoder *)aCoder { - [aCoder encodeObject:_configuration forKey:kConfigurationKey]; - [aCoder encodeObject:_responseType forKey:kResponseTypeKey]; - [aCoder encodeObject:_clientID forKey:kClientIDKey]; - [aCoder encodeObject:_clientSecret forKey:kClientSecretKey]; - [aCoder encodeObject:_scope forKey:kScopeKey]; - [aCoder encodeObject:_redirectURL forKey:kRedirectURLKey]; - [aCoder encodeObject:_state forKey:kStateKey]; - [aCoder encodeObject:_nonce forKey:kNonceKey]; - [aCoder encodeObject:_codeVerifier forKey:kCodeVerifierKey]; - [aCoder encodeObject:_codeChallenge forKey:kCodeChallengeKey]; - [aCoder encodeObject:_codeChallengeMethod forKey:kCodeChallengeMethodKey]; - [aCoder encodeObject:_additionalParameters forKey:kAdditionalParametersKey]; -} - -#pragma mark - NSObject overrides - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@: %p, request: %@>", - NSStringFromClass([self class]), - (void *)self, - self.authorizationRequestURL]; -} - -#pragma mark - State and PKCE verifier/challenge generation Methods - -+ (nullable NSString *)generateCodeVerifier { - return [OIDTokenUtilities randomURLSafeStringWithSize:kCodeVerifierBytes]; -} - -+ (nullable NSString *)generateState { - return [OIDTokenUtilities randomURLSafeStringWithSize:kStateSizeBytes]; -} - -+ (nullable NSString *)codeChallengeS256ForVerifier:(NSString *)codeVerifier { - if (!codeVerifier) { - return nil; - } - // generates the code_challenge per spec https://tools.ietf.org/html/rfc7636#section-4.2 - // code_challenge = BASE64URL-ENCODE(SHA256(ASCII(code_verifier))) - // NB. the ASCII conversion on the code_verifier entropy was done at time of generation. - NSData *sha256Verifier = [OIDTokenUtilities sha256:codeVerifier]; - return [OIDTokenUtilities encodeBase64urlNoPadding:sha256Verifier]; -} - -#pragma mark - - -- (NSURL *)authorizationRequestURL { - OIDURLQueryComponent *query = [[OIDURLQueryComponent alloc] init]; - - // Required parameters. - [query addParameter:kResponseTypeKey value:_responseType]; - [query addParameter:kClientIDKey value:_clientID]; - - // Add any additional parameters the client has specified. - [query addParameters:_additionalParameters]; - - // Add optional parameters, as applicable. - if (_redirectURL) { - [query addParameter:kRedirectURLKey value:_redirectURL.absoluteString]; - } - if (_scope) { - [query addParameter:kScopeKey value:_scope]; - } - if (_state) { - [query addParameter:kStateKey value:_state]; - } - if (_nonce) { - [query addParameter:kNonceKey value:_nonce]; - } - if (_codeChallenge) { - [query addParameter:kCodeChallengeKey value:_codeChallenge]; - } - if (_codeChallengeMethod) { - [query addParameter:kCodeChallengeMethodKey value:_codeChallengeMethod]; - } - - // Construct the URL: - return [query URLByReplacingQueryInURL:_configuration.authorizationEndpoint]; -} - -#pragma mark - OIDExternalUserAgentRequest - -- (NSURL *)externalUserAgentRequestURL { - return [self authorizationRequestURL]; -} - -- (NSString *)redirectScheme { - return [[self redirectURL] scheme]; -} - -@end diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDAuthorizationResponse.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDAuthorizationResponse.h deleted file mode 100644 index 8aa7d06f..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDAuthorizationResponse.h +++ /dev/null @@ -1,128 +0,0 @@ -/*! @file OIDAuthorizationResponse.h - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -@class OIDAuthorizationRequest; -@class OIDTokenRequest; - -NS_ASSUME_NONNULL_BEGIN - -/*! @brief Represents the response to an authorization request. - @see https://tools.ietf.org/html/rfc6749#section-4.1.2 - @see https://tools.ietf.org/html/rfc6749#section-5.1 - @see http://openid.net/specs/openid-connect-core-1_0.html#ImplicitAuthResponse - */ -@interface OIDAuthorizationResponse : NSObject - -/*! @brief The request which was serviced. - */ -@property(nonatomic, readonly) OIDAuthorizationRequest *request; - -/*! @brief The authorization code generated by the authorization server. - @discussion Set when the response_type requested includes 'code'. - @remarks code - */ -@property(nonatomic, readonly, nullable) NSString *authorizationCode; - -/*! @brief REQUIRED if the "state" parameter was present in the client authorization request. The - exact value received from the client. - @remarks state - */ -@property(nonatomic, readonly, nullable) NSString *state; - -/*! @brief The access token generated by the authorization server. - @discussion Set when the response_type requested includes 'token'. - @remarks access_token - @see http://openid.net/specs/openid-connect-core-1_0.html#ImplicitAuthResponse - */ -@property(nonatomic, readonly, nullable) NSString *accessToken; - -/*! @brief The approximate expiration date & time of the access token. - @discussion Set when the response_type requested includes 'token'. - @remarks expires_in - @seealso OIDAuthorizationResponse.accessToken - @see http://openid.net/specs/openid-connect-core-1_0.html#ImplicitAuthResponse - */ -@property(nonatomic, readonly, nullable) NSDate *accessTokenExpirationDate; - -/*! @brief Typically "Bearer" when present. Otherwise, another token_type value that the Client has - negotiated with the Authorization Server. - @discussion Set when the response_type requested includes 'token'. - @remarks token_type - @see http://openid.net/specs/openid-connect-core-1_0.html#ImplicitAuthResponse - */ -@property(nonatomic, readonly, nullable) NSString *tokenType; - -/*! @brief ID Token value associated with the authenticated session. - @discussion Set when the response_type requested includes 'id_token'. - @remarks id_token - @see http://openid.net/specs/openid-connect-core-1_0.html#IDToken - @see http://openid.net/specs/openid-connect-core-1_0.html#ImplicitAuthResponse - */ -@property(nonatomic, readonly, nullable) NSString *idToken; - -/*! @brief The scope of the access token. OPTIONAL, if identical to the scopes requested, otherwise, - REQUIRED. - @remarks scope - @see https://tools.ietf.org/html/rfc6749#section-5.1 - */ -@property(nonatomic, readonly, nullable) NSString *scope; - -/*! @brief Additional parameters returned from the authorization server. - */ -@property(nonatomic, readonly, nullable) - NSDictionary *> *additionalParameters; - -/*! @internal - @brief Unavailable. Please use initWithParameters:. - */ -- (instancetype)init NS_UNAVAILABLE; - -/*! @brief Designated initializer. - @param request The serviced request. - @param parameters The decoded parameters returned from the Authorization Server. - @remarks Known parameters are extracted from the @c parameters parameter and the normative - properties are populated. Non-normative parameters are placed in the - @c #additionalParameters dictionary. - */ -- (instancetype)initWithRequest:(OIDAuthorizationRequest *)request - parameters:(NSDictionary *> *)parameters - NS_DESIGNATED_INITIALIZER; - -/*! @brief Creates a token request suitable for exchanging an authorization code for an access - token. - @return A @c OIDTokenRequest suitable for exchanging an authorization code for an access - token. - @see https://tools.ietf.org/html/rfc6749#section-4.1.3 - */ -- (nullable OIDTokenRequest *)tokenExchangeRequest; - -/*! @brief Creates a token request suitable for exchanging an authorization code for an access - token. - @param additionalParameters Additional parameters for the token request. - @return A @c OIDTokenRequest suitable for exchanging an authorization code for an access - token. - @see https://tools.ietf.org/html/rfc6749#section-4.1.3 - */ -- (nullable OIDTokenRequest *)tokenExchangeRequestWithAdditionalParameters: - (nullable NSDictionary *)additionalParameters; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDAuthorizationResponse.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDAuthorizationResponse.m deleted file mode 100644 index a8f92c75..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDAuthorizationResponse.m +++ /dev/null @@ -1,210 +0,0 @@ -/*! @file OIDAuthorizationResponse.m - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDAuthorizationResponse.h" - -#import "OIDAuthorizationRequest.h" -#import "OIDDefines.h" -#import "OIDError.h" -#import "OIDFieldMapping.h" -#import "OIDTokenRequest.h" -#import "OIDTokenUtilities.h" - -/*! @brief The key for the @c authorizationCode property in the incoming parameters and for - @c NSSecureCoding. - */ -static NSString *const kAuthorizationCodeKey = @"code"; - -/*! @brief The key for the @c state property in the incoming parameters and for @c NSSecureCoding. - */ -static NSString *const kStateKey = @"state"; - -/*! @brief The key for the @c accessToken property in the incoming parameters and for - @c NSSecureCoding. - */ -static NSString *const kAccessTokenKey = @"access_token"; - -/*! @brief The key for the @c accessTokenExpirationDate property in the incoming parameters and for - @c NSSecureCoding. - */ -static NSString *const kExpiresInKey = @"expires_in"; - -/*! @brief The key for the @c tokenType property in the incoming parameters and for - @c NSSecureCoding. - */ -static NSString *const kTokenTypeKey = @"token_type"; - -/*! @brief The key for the @c idToken property in the incoming parameters and for @c NSSecureCoding. - */ -static NSString *const kIDTokenKey = @"id_token"; - -/*! @brief The key for the @c scope property in the incoming parameters and for @c NSSecureCoding. - */ -static NSString *const kScopeKey = @"scope"; - -/*! @brief Key used to encode the @c additionalParameters property for @c NSSecureCoding - */ -static NSString *const kAdditionalParametersKey = @"additionalParameters"; - -/*! @brief Key used to encode the @c request property for @c NSSecureCoding - */ -static NSString *const kRequestKey = @"request"; - -/*! @brief The exception thrown when a developer tries to create a token exchange request from an - authorization request with no authorization code. - */ -static NSString *const kTokenExchangeRequestException = - @"Attempted to create a token exchange request from an authorization response with no " - "authorization code."; - -@implementation OIDAuthorizationResponse - -/*! @brief Returns a mapping of incoming parameters to instance variables. - @return A mapping of incoming parameters to instance variables. - */ -+ (NSDictionary *)fieldMap { - static NSMutableDictionary *fieldMap; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - fieldMap = [NSMutableDictionary dictionary]; - fieldMap[kStateKey] = - [[OIDFieldMapping alloc] initWithName:@"_state" type:[NSString class]]; - fieldMap[kAuthorizationCodeKey] = - [[OIDFieldMapping alloc] initWithName:@"_authorizationCode" type:[NSString class]]; - fieldMap[kAccessTokenKey] = - [[OIDFieldMapping alloc] initWithName:@"_accessToken" type:[NSString class]]; - fieldMap[kExpiresInKey] = - [[OIDFieldMapping alloc] initWithName:@"_accessTokenExpirationDate" - type:[NSDate class] - conversion:^id _Nullable(NSObject *_Nullable value) { - if (![value isKindOfClass:[NSNumber class]]) { - return value; - } - NSNumber *valueAsNumber = (NSNumber *)value; - return [NSDate dateWithTimeIntervalSinceNow:[valueAsNumber longLongValue]]; - }]; - fieldMap[kTokenTypeKey] = - [[OIDFieldMapping alloc] initWithName:@"_tokenType" type:[NSString class]]; - fieldMap[kIDTokenKey] = - [[OIDFieldMapping alloc] initWithName:@"_idToken" type:[NSString class]]; - fieldMap[kScopeKey] = - [[OIDFieldMapping alloc] initWithName:@"_scope" type:[NSString class]]; - }); - return fieldMap; -} - -#pragma mark - Initializers - -- (instancetype)init - OID_UNAVAILABLE_USE_INITIALIZER(@selector(initWithRequest:parameters:)) - -- (instancetype)initWithRequest:(OIDAuthorizationRequest *)request - parameters:(NSDictionary *> *)parameters { - self = [super init]; - if (self) { - _request = [request copy]; - NSDictionary *> *additionalParameters = - [OIDFieldMapping remainingParametersWithMap:[[self class] fieldMap] - parameters:parameters - instance:self]; - _additionalParameters = additionalParameters; - } - return self; -} - -#pragma mark - NSCopying - -- (instancetype)copyWithZone:(nullable NSZone *)zone { - // The documentation for NSCopying specifically advises us to return a reference to the original - // instance in the case where instances are immutable (as ours is): - // "Implement NSCopying by retaining the original instead of creating a new copy when the class - // and its contents are immutable." - return self; -} - -#pragma mark - NSSecureCoding - -+ (BOOL)supportsSecureCoding { - return YES; -} - -- (instancetype)initWithCoder:(NSCoder *)aDecoder { - OIDAuthorizationRequest *request = - [aDecoder decodeObjectOfClass:[OIDAuthorizationRequest class] forKey:kRequestKey]; - self = [self initWithRequest:request parameters:@{ }]; - if (self) { - [OIDFieldMapping decodeWithCoder:aDecoder map:[[self class] fieldMap] instance:self]; - _additionalParameters = [aDecoder decodeObjectOfClasses:[OIDFieldMapping JSONTypes] - forKey:kAdditionalParametersKey]; - } - return self; -} - -- (void)encodeWithCoder:(NSCoder *)aCoder { - [aCoder encodeObject:_request forKey:kRequestKey]; - [OIDFieldMapping encodeWithCoder:aCoder map:[[self class] fieldMap] instance:self]; - [aCoder encodeObject:_additionalParameters forKey:kAdditionalParametersKey]; -} - -#pragma mark - NSObject overrides - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@: %p, authorizationCode: %@, state: \"%@\", accessToken: " - "\"%@\", accessTokenExpirationDate: %@, tokenType: %@, " - "idToken: \"%@\", scope: \"%@\", additionalParameters: %@, " - "request: %@>", - NSStringFromClass([self class]), - (void *)self, - _authorizationCode, - _state, - [OIDTokenUtilities redact:_accessToken], - _accessTokenExpirationDate, - _tokenType, - [OIDTokenUtilities redact:_idToken], - _scope, - _additionalParameters, - _request]; -} - -#pragma mark - - -- (OIDTokenRequest *)tokenExchangeRequest { - return [self tokenExchangeRequestWithAdditionalParameters:nil]; -} - -- (OIDTokenRequest *)tokenExchangeRequestWithAdditionalParameters: - (NSDictionary *)additionalParameters { - // TODO: add a unit test to confirm exception is thrown when expected and the request is created - // with the correct parameters. - if (!_authorizationCode) { - [NSException raise:kTokenExchangeRequestException - format:kTokenExchangeRequestException]; - } - return [[OIDTokenRequest alloc] initWithConfiguration:_request.configuration - grantType:OIDGrantTypeAuthorizationCode - authorizationCode:_authorizationCode - redirectURL:_request.redirectURL - clientID:_request.clientID - clientSecret:_request.clientSecret - scope:nil - refreshToken:nil - codeVerifier:_request.codeVerifier - additionalParameters:additionalParameters]; -} - -@end diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDAuthorizationService.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDAuthorizationService.h deleted file mode 100644 index 31c79031..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDAuthorizationService.h +++ /dev/null @@ -1,147 +0,0 @@ -/*! @file OIDAuthorizationService.h - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -@class OIDAuthorization; -@class OIDAuthorizationRequest; -@class OIDAuthorizationResponse; -@class OIDRegistrationRequest; -@class OIDRegistrationResponse; -@class OIDServiceConfiguration; -@class OIDTokenRequest; -@class OIDTokenResponse; -@protocol OIDExternalUserAgent; -@protocol OIDExternalUserAgentSession; - -NS_ASSUME_NONNULL_BEGIN - -/*! @brief Represents the type of block used as a callback for creating a service configuration from - a remote OpenID Connect Discovery document. - @param configuration The service configuration, if available. - @param error The error if an error occurred. - */ -typedef void (^OIDDiscoveryCallback)(OIDServiceConfiguration *_Nullable configuration, - NSError *_Nullable error); - -/*! @brief Represents the type of block used as a callback for various methods of - @c OIDAuthorizationService. - @param authorizationResponse The authorization response, if available. - @param error The error if an error occurred. - */ -typedef void (^OIDAuthorizationCallback)(OIDAuthorizationResponse *_Nullable authorizationResponse, - NSError *_Nullable error); - -/*! @brief Represents the type of block used as a callback for various methods of - @c OIDAuthorizationService. - @param tokenResponse The token response, if available. - @param error The error if an error occurred. - */ -typedef void (^OIDTokenCallback)(OIDTokenResponse *_Nullable tokenResponse, - NSError *_Nullable error); - -/*! @brief Represents the type of dictionary used to specify additional querystring parameters - when making authorization or token endpoint requests. - */ -typedef NSDictionary *_Nullable OIDTokenEndpointParameters; - -/*! @brief Represents the type of block used as a callback for various methods of - @c OIDAuthorizationService. - @param registrationResponse The registration response, if available. - @param error The error if an error occurred. -*/ -typedef void (^OIDRegistrationCompletion)(OIDRegistrationResponse *_Nullable registrationResponse, - NSError *_Nullable error); - -/*! @brief Performs various OAuth and OpenID Connect related calls via the user agent or - \NSURLSession. - */ -@interface OIDAuthorizationService : NSObject - -/*! @brief The service's configuration. - @remarks Each authorization service is initialized with a configuration. This configuration - specifies how to connect to a particular OAuth provider. Clients should use separate - authorization service instances for each provider they wish to integrate with. - Configurations may be created manually, or via an OpenID Connect Discovery Document. - */ -@property(nonatomic, readonly) OIDServiceConfiguration *configuration; - -/*! @internal - @brief Unavailable. This class should not be initialized. - */ -- (instancetype)init NS_UNAVAILABLE; - -/*! @brief Convenience method for creating an authorization service configuration from an OpenID - Connect compliant issuer URL. - @param issuerURL The service provider's OpenID Connect issuer. - @param completion A block which will be invoked when the authorization service configuration has - been created, or when an error has occurred. - @see https://openid.net/specs/openid-connect-discovery-1_0.html - */ -+ (void)discoverServiceConfigurationForIssuer:(NSURL *)issuerURL - completion:(OIDDiscoveryCallback)completion; - - -/*! @brief Convenience method for creating an authorization service configuration from an OpenID - Connect compliant identity provider's discovery document. - @param discoveryURL The URL of the service provider's OpenID Connect discovery document. - @param completion A block which will be invoked when the authorization service configuration has - been created, or when an error has occurred. - @see https://openid.net/specs/openid-connect-discovery-1_0.html - */ -+ (void)discoverServiceConfigurationForDiscoveryURL:(NSURL *)discoveryURL - completion:(OIDDiscoveryCallback)completion; - -/*! @brief Perform an authorization flow using a generic flow shim. - @param request The authorization request. - @param externalUserAgent Generic external user-agent that can present an authorization - request. - @param callback The method called when the request has completed or failed. - @return A @c OIDExternalUserAgentSession instance which will terminate when it - receives a @c OIDExternalUserAgentSession.cancel message, or after processing a - @c OIDExternalUserAgentSession.resumeExternalUserAgentFlowWithURL: message. - */ -+ (id) presentAuthorizationRequest:(OIDAuthorizationRequest *)request - externalUserAgent:(id)externalUserAgent - callback:(OIDAuthorizationCallback)callback; - -/*! @brief Performs a token request. - @param request The token request. - @param callback The method called when the request has completed or failed. - */ -+ (void)performTokenRequest:(OIDTokenRequest *)request callback:(OIDTokenCallback)callback; - -/*! @brief Performs a token request. - @param request The token request. - @param authorizationResponse The original authorization response related to this token request. - @param callback The method called when the request has completed or failed. - */ -+ (void)performTokenRequest:(OIDTokenRequest *)request - originalAuthorizationResponse:(OIDAuthorizationResponse *_Nullable)authorizationResponse - callback:(OIDTokenCallback)callback; - -/*! @brief Performs a registration request. - @param request The registration request. - @param completion The method called when the request has completed or failed. - */ -+ (void)performRegistrationRequest:(OIDRegistrationRequest *)request - completion:(OIDRegistrationCompletion)completion; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDAuthorizationService.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDAuthorizationService.m deleted file mode 100644 index 1a83ae08..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDAuthorizationService.m +++ /dev/null @@ -1,635 +0,0 @@ -/*! @file OIDAuthorizationService.m - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDAuthorizationService.h" - -#import "OIDAuthorizationRequest.h" -#import "OIDAuthorizationResponse.h" -#import "OIDDefines.h" -#import "OIDErrorUtilities.h" -#import "OIDExternalUserAgent.h" -#import "OIDExternalUserAgentSession.h" -#import "OIDIDToken.h" -#import "OIDRegistrationRequest.h" -#import "OIDRegistrationResponse.h" -#import "OIDServiceConfiguration.h" -#import "OIDServiceDiscovery.h" -#import "OIDTokenRequest.h" -#import "OIDTokenResponse.h" -#import "OIDURLQueryComponent.h" -#import "OIDURLSessionProvider.h" - -/*! @brief Path appended to an OpenID Connect issuer for discovery - @see https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfig - */ -static NSString *const kOpenIDConfigurationWellKnownPath = @".well-known/openid-configuration"; - - -NS_ASSUME_NONNULL_BEGIN - -@interface OIDAuthorizationSession : NSObject - -- (instancetype)init NS_UNAVAILABLE; - -- (instancetype)initWithRequest:(OIDAuthorizationRequest *)request - NS_DESIGNATED_INITIALIZER; - -@end - -@implementation OIDAuthorizationSession { - OIDAuthorizationRequest *_request; - id _externalUserAgent; - OIDAuthorizationCallback _pendingauthorizationFlowCallback; -} - -- (instancetype)initWithRequest:(OIDAuthorizationRequest *)request { - self = [super init]; - if (self) { - _request = [request copy]; - } - return self; -} - -- (void)presentAuthorizationWithExternalUserAgent:(id)externalUserAgent - callback:(OIDAuthorizationCallback)authorizationFlowCallback { - _externalUserAgent = externalUserAgent; - _pendingauthorizationFlowCallback = authorizationFlowCallback; - BOOL authorizationFlowStarted = - [_externalUserAgent presentExternalUserAgentRequest:_request session:self]; - if (!authorizationFlowStarted) { - NSError *safariError = [OIDErrorUtilities errorWithCode:OIDErrorCodeSafariOpenError - underlyingError:nil - description:@"Unable to open Safari."]; - [self didFinishWithResponse:nil error:safariError]; - } -} - -- (void)cancel { - [_externalUserAgent dismissExternalUserAgentAnimated:YES completion:^{ - NSError *error = [OIDErrorUtilities errorWithCode:OIDErrorCodeUserCanceledAuthorizationFlow - underlyingError:nil - description:@"Authorization flow was cancelled."]; - [self didFinishWithResponse:nil error:error]; - }]; -} - -- (BOOL)shouldHandleURL:(NSURL *)URL { - NSURL *standardizedURL = [URL standardizedURL]; - NSURL *standardizedRedirectURL = [_request.redirectURL standardizedURL]; - - return OIDIsEqualIncludingNil(standardizedURL.scheme, standardizedRedirectURL.scheme) && - OIDIsEqualIncludingNil(standardizedURL.user, standardizedRedirectURL.user) && - OIDIsEqualIncludingNil(standardizedURL.password, standardizedRedirectURL.password) && - OIDIsEqualIncludingNil(standardizedURL.host, standardizedRedirectURL.host) && - OIDIsEqualIncludingNil(standardizedURL.port, standardizedRedirectURL.port) && - OIDIsEqualIncludingNil(standardizedURL.path, standardizedRedirectURL.path); -} - -- (BOOL)resumeExternalUserAgentFlowWithURL:(NSURL *)URL { - // rejects URLs that don't match redirect (these may be completely unrelated to the authorization) - if (![self shouldHandleURL:URL]) { - return NO; - } - - AppAuthRequestTrace(@"Authorization Response: %@", URL); - - // checks for an invalid state - if (!_pendingauthorizationFlowCallback) { - [NSException raise:OIDOAuthExceptionInvalidAuthorizationFlow - format:@"%@", OIDOAuthExceptionInvalidAuthorizationFlow, nil]; - } - - OIDURLQueryComponent *query = [[OIDURLQueryComponent alloc] initWithURL:URL]; - - NSError *error; - OIDAuthorizationResponse *response = nil; - - // checks for an OAuth error response as per RFC6749 Section 4.1.2.1 - if (query.dictionaryValue[OIDOAuthErrorFieldError]) { - error = [OIDErrorUtilities OAuthErrorWithDomain:OIDOAuthAuthorizationErrorDomain - OAuthResponse:query.dictionaryValue - underlyingError:nil]; - } - - // no error, should be a valid OAuth 2.0 response - if (!error) { - response = [[OIDAuthorizationResponse alloc] initWithRequest:_request - parameters:query.dictionaryValue]; - - // verifies that the state in the response matches the state in the request, or both are nil - if (!OIDIsEqualIncludingNil(_request.state, response.state)) { - NSMutableDictionary *userInfo = [query.dictionaryValue mutableCopy]; - userInfo[NSLocalizedDescriptionKey] = - [NSString stringWithFormat:@"State mismatch, expecting %@ but got %@ in authorization " - "response %@", - _request.state, - response.state, - response]; - response = nil; - error = [NSError errorWithDomain:OIDOAuthAuthorizationErrorDomain - code:OIDErrorCodeOAuthAuthorizationClientError - userInfo:userInfo]; - } - } - - [_externalUserAgent dismissExternalUserAgentAnimated:YES completion:^{ - [self didFinishWithResponse:response error:error]; - }]; - - return YES; -} - -- (void)failExternalUserAgentFlowWithError:(NSError *)error { - [self didFinishWithResponse:nil error:error]; -} - -/*! @brief Invokes the pending callback and performs cleanup. - @param response The authorization response, if any to return to the callback. - @param error The error, if any, to return to the callback. - */ -- (void)didFinishWithResponse:(nullable OIDAuthorizationResponse *)response - error:(nullable NSError *)error { - OIDAuthorizationCallback callback = _pendingauthorizationFlowCallback; - _pendingauthorizationFlowCallback = nil; - _externalUserAgent = nil; - if (callback) { - callback(response, error); - } -} - -@end - -@implementation OIDAuthorizationService - -+ (void)discoverServiceConfigurationForIssuer:(NSURL *)issuerURL - completion:(OIDDiscoveryCallback)completion { - NSURL *fullDiscoveryURL = - [issuerURL URLByAppendingPathComponent:kOpenIDConfigurationWellKnownPath]; - - [[self class] discoverServiceConfigurationForDiscoveryURL:fullDiscoveryURL - completion:completion]; -} - -+ (void)discoverServiceConfigurationForDiscoveryURL:(NSURL *)discoveryURL - completion:(OIDDiscoveryCallback)completion { - - NSURLSession *session = [OIDURLSessionProvider session]; - NSURLSessionDataTask *task = - [session dataTaskWithURL:discoveryURL - completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { - // If we got any sort of error, just report it. - if (error || !data) { - NSString *errorDescription = - [NSString stringWithFormat:@"Connection error fetching discovery document '%@': %@.", - discoveryURL, - error.localizedDescription]; - error = [OIDErrorUtilities errorWithCode:OIDErrorCodeNetworkError - underlyingError:error - description:errorDescription]; - dispatch_async(dispatch_get_main_queue(), ^{ - completion(nil, error); - }); - return; - } - - NSHTTPURLResponse *urlResponse = (NSHTTPURLResponse *)response; - - // Check for non-200 status codes. - // https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationResponse - if (urlResponse.statusCode != 200) { - NSError *URLResponseError = [OIDErrorUtilities HTTPErrorWithHTTPResponse:urlResponse - data:data]; - NSString *errorDescription = - [NSString stringWithFormat:@"Non-200 HTTP response (%d) fetching discovery document " - "'%@'.", - (int)urlResponse.statusCode, - discoveryURL]; - error = [OIDErrorUtilities errorWithCode:OIDErrorCodeNetworkError - underlyingError:URLResponseError - description:errorDescription]; - dispatch_async(dispatch_get_main_queue(), ^{ - completion(nil, error); - }); - return; - } - - // Construct an OIDServiceDiscovery with the received JSON. - OIDServiceDiscovery *discovery = - [[OIDServiceDiscovery alloc] initWithJSONData:data error:&error]; - if (error || !discovery) { - NSString *errorDescription = - [NSString stringWithFormat:@"JSON error parsing document at '%@': %@", - discoveryURL, - error.localizedDescription]; - error = [OIDErrorUtilities errorWithCode:OIDErrorCodeNetworkError - underlyingError:error - description:errorDescription]; - dispatch_async(dispatch_get_main_queue(), ^{ - completion(nil, error); - }); - return; - } - - // Create our service configuration with the discovery document and return it. - OIDServiceConfiguration *configuration = - [[OIDServiceConfiguration alloc] initWithDiscoveryDocument:discovery]; - dispatch_async(dispatch_get_main_queue(), ^{ - completion(configuration, nil); - }); - }]; - [task resume]; -} - -#pragma mark - Authorization Endpoint - -+ (id) presentAuthorizationRequest:(OIDAuthorizationRequest *)request - externalUserAgent:(id)externalUserAgent - callback:(OIDAuthorizationCallback)callback { - - AppAuthRequestTrace(@"Authorization Request: %@", request); - - OIDAuthorizationSession *flowSession = [[OIDAuthorizationSession alloc] initWithRequest:request]; - [flowSession presentAuthorizationWithExternalUserAgent:externalUserAgent callback:callback]; - return flowSession; -} - -#pragma mark - Token Endpoint - -+ (void)performTokenRequest:(OIDTokenRequest *)request callback:(OIDTokenCallback)callback { - [[self class] performTokenRequest:request - originalAuthorizationResponse:nil - callback:callback]; -} - -+ (void)performTokenRequest:(OIDTokenRequest *)request - originalAuthorizationResponse:(OIDAuthorizationResponse *_Nullable)authorizationResponse - callback:(OIDTokenCallback)callback { - - NSURLRequest *URLRequest = [request URLRequest]; - - AppAuthRequestTrace(@"Token Request: %@\nHeaders:%@\nHTTPBody: %@", - URLRequest.URL, - URLRequest.allHTTPHeaderFields, - [[NSString alloc] initWithData:URLRequest.HTTPBody - encoding:NSUTF8StringEncoding]); - - NSURLSession *session = [OIDURLSessionProvider session]; - [[session dataTaskWithRequest:URLRequest - completionHandler:^(NSData *_Nullable data, - NSURLResponse *_Nullable response, - NSError *_Nullable error) { - if (error) { - // A network error or server error occurred. - NSString *errorDescription = - [NSString stringWithFormat:@"Connection error making token request to '%@': %@.", - URLRequest.URL, - error.localizedDescription]; - NSError *returnedError = - [OIDErrorUtilities errorWithCode:OIDErrorCodeNetworkError - underlyingError:error - description:errorDescription]; - dispatch_async(dispatch_get_main_queue(), ^{ - callback(nil, returnedError); - }); - return; - } - - NSHTTPURLResponse *HTTPURLResponse = (NSHTTPURLResponse *)response; - NSInteger statusCode = HTTPURLResponse.statusCode; - AppAuthRequestTrace(@"Token Response: HTTP Status %d\nHTTPBody: %@", - (int)statusCode, - [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]); - if (statusCode != 200) { - // A server error occurred. - NSError *serverError = - [OIDErrorUtilities HTTPErrorWithHTTPResponse:HTTPURLResponse data:data]; - - // HTTP 4xx may indicate an RFC6749 Section 5.2 error response, attempts to parse as such. - if (statusCode >= 400 && statusCode < 500) { - NSError *jsonDeserializationError; - NSDictionary *> *json = - [NSJSONSerialization JSONObjectWithData:data options:0 error:&jsonDeserializationError]; - - // If the HTTP 4xx response parses as JSON and has an 'error' key, it's an OAuth error. - // These errors are special as they indicate a problem with the authorization grant. - if (json[OIDOAuthErrorFieldError]) { - NSError *oauthError = - [OIDErrorUtilities OAuthErrorWithDomain:OIDOAuthTokenErrorDomain - OAuthResponse:json - underlyingError:serverError]; - dispatch_async(dispatch_get_main_queue(), ^{ - callback(nil, oauthError); - }); - return; - } - } - - // Status code indicates this is an error, but not an RFC6749 Section 5.2 error. - NSString *errorDescription = - [NSString stringWithFormat:@"Non-200 HTTP response (%d) making token request to '%@'.", - (int)statusCode, - URLRequest.URL]; - NSError *returnedError = - [OIDErrorUtilities errorWithCode:OIDErrorCodeServerError - underlyingError:serverError - description:errorDescription]; - dispatch_async(dispatch_get_main_queue(), ^{ - callback(nil, returnedError); - }); - return; - } - - NSError *jsonDeserializationError; - NSDictionary *> *json = - [NSJSONSerialization JSONObjectWithData:data options:0 error:&jsonDeserializationError]; - if (jsonDeserializationError) { - // A problem occurred deserializing the response/JSON. - NSString *errorDescription = - [NSString stringWithFormat:@"JSON error parsing token response: %@", - jsonDeserializationError.localizedDescription]; - NSError *returnedError = - [OIDErrorUtilities errorWithCode:OIDErrorCodeJSONDeserializationError - underlyingError:jsonDeserializationError - description:errorDescription]; - dispatch_async(dispatch_get_main_queue(), ^{ - callback(nil, returnedError); - }); - return; - } - - OIDTokenResponse *tokenResponse = - [[OIDTokenResponse alloc] initWithRequest:request parameters:json]; - if (!tokenResponse) { - // A problem occurred constructing the token response from the JSON. - NSError *returnedError = - [OIDErrorUtilities errorWithCode:OIDErrorCodeTokenResponseConstructionError - underlyingError:jsonDeserializationError - description:@"Token response invalid."]; - dispatch_async(dispatch_get_main_queue(), ^{ - callback(nil, returnedError); - }); - return; - } - - // If an ID Token is included in the response, validates the ID Token following the rules - // in OpenID Connect Core Section 3.1.3.7 for features that AppAuth directly supports - // (which excludes rules #1, #4, #5, #7, #8, #12, and #13). Regarding rule #6, ID Tokens - // received by this class are received via direct communication between the Client and the Token - // Endpoint, thus we are exercising the option to rely only on the TLS validation. AppAuth - // has a zero dependencies policy, and verifying the JWT signature would add a dependency. - // Users of the library are welcome to perform the JWT signature verification themselves should - // they wish. - if (tokenResponse.idToken) { - OIDIDToken *idToken = [[OIDIDToken alloc] initWithIDTokenString:tokenResponse.idToken]; - if (!idToken) { - NSError *invalidIDToken = - [OIDErrorUtilities errorWithCode:OIDErrorCodeIDTokenParsingError - underlyingError:nil - description:@"ID Token parsing failed"]; - dispatch_async(dispatch_get_main_queue(), ^{ - callback(nil, invalidIDToken); - }); - return; - } - - // OpenID Connect Core Section 3.1.3.7. rule #1 - // Not supported: AppAuth does not support JWT encryption. - - // OpenID Connect Core Section 3.1.3.7. rule #2 - // Validates that the issuer in the ID Token matches that of the discovery document. - NSURL *issuer = tokenResponse.request.configuration.issuer; - if (issuer && ![idToken.issuer isEqual:issuer]) { - NSError *invalidIDToken = - [OIDErrorUtilities errorWithCode:OIDErrorCodeIDTokenFailedValidationError - underlyingError:nil - description:@"Issuer mismatch"]; - dispatch_async(dispatch_get_main_queue(), ^{ - callback(nil, invalidIDToken); - }); - return; - } - - // OpenID Connect Core Section 3.1.3.7. rule #3 - // Validates that the audience of the ID Token matches the client ID. - NSString *clientID = tokenResponse.request.clientID; - if (![idToken.audience containsObject:clientID]) { - NSError *invalidIDToken = - [OIDErrorUtilities errorWithCode:OIDErrorCodeIDTokenFailedValidationError - underlyingError:nil - description:@"Audience mismatch"]; - dispatch_async(dispatch_get_main_queue(), ^{ - callback(nil, invalidIDToken); - }); - return; - } - - // OpenID Connect Core Section 3.1.3.7. rules #4 & #5 - // Not supported. - - // OpenID Connect Core Section 3.1.3.7. rule #6 - // As noted above, AppAuth only supports the code flow which results in direct communication - // of the ID Token from the Token Endpoint to the Client, and we are exercising the option to - // use TSL server validation instead of checking the token signature. Users may additionally - // check the token signature should they wish. - - // OpenID Connect Core Section 3.1.3.7. rules #7 & #8 - // Not applicable. See rule #6. - - // OpenID Connect Core Section 3.1.3.7. rule #9 - // Validates that the current time is before the expiry time. - NSTimeInterval expiresAtDifference = [idToken.expiresAt timeIntervalSinceNow]; - if (expiresAtDifference < 0) { - NSError *invalidIDToken = - [OIDErrorUtilities errorWithCode:OIDErrorCodeIDTokenFailedValidationError - underlyingError:nil - description:@"ID Token expired"]; - dispatch_async(dispatch_get_main_queue(), ^{ - callback(nil, invalidIDToken); - }); - return; - } - - // OpenID Connect Core Section 3.1.3.7. rule #10 - // Validates that the issued at time is not more than +/- 10 minutes on the current time. - NSTimeInterval issuedAtDifference = [idToken.issuedAt timeIntervalSinceNow]; - if (fabs(issuedAtDifference) > 600) { - NSError *invalidIDToken = - [OIDErrorUtilities errorWithCode:OIDErrorCodeIDTokenFailedValidationError - underlyingError:nil - description:@"Issued at time is more than 5 minutes before or after " - "the current time"]; - dispatch_async(dispatch_get_main_queue(), ^{ - callback(nil, invalidIDToken); - }); - return; - } - - // Only relevant for the authorization_code response type - if ([tokenResponse.request.grantType isEqual:OIDGrantTypeAuthorizationCode]) { - // OpenID Connect Core Section 3.1.3.7. rule #11 - // Validates the nonce. - NSString *nonce = authorizationResponse.request.nonce; - if (nonce && ![idToken.nonce isEqual:nonce]) { - NSError *invalidIDToken = - [OIDErrorUtilities errorWithCode:OIDErrorCodeIDTokenFailedValidationError - underlyingError:nil - description:@"Nonce mismatch"]; - dispatch_async(dispatch_get_main_queue(), ^{ - callback(nil, invalidIDToken); - }); - return; - } - } - - // OpenID Connect Core Section 3.1.3.7. rules #12 - // ACR is not directly supported by AppAuth. - - // OpenID Connect Core Section 3.1.3.7. rules #12 - // max_age is not directly supported by AppAuth. - } - - // Success - dispatch_async(dispatch_get_main_queue(), ^{ - callback(tokenResponse, nil); - }); - }] resume]; -} - - -#pragma mark - Registration Endpoint - -+ (void)performRegistrationRequest:(OIDRegistrationRequest *)request - completion:(OIDRegistrationCompletion)completion { - NSURLRequest *URLRequest = [request URLRequest]; - if (!URLRequest) { - // A problem occurred deserializing the response/JSON. - NSError *returnedError = [OIDErrorUtilities errorWithCode:OIDErrorCodeJSONSerializationError - underlyingError:nil - description:@"The registration request could not " - "be serialized as JSON."]; - dispatch_async(dispatch_get_main_queue(), ^{ - completion(nil, returnedError); - }); - return; - } - - NSURLSession *session = [OIDURLSessionProvider session]; - [[session dataTaskWithRequest:URLRequest - completionHandler:^(NSData *_Nullable data, - NSURLResponse *_Nullable response, - NSError *_Nullable error) { - if (error) { - // A network error or server error occurred. - NSString *errorDescription = - [NSString stringWithFormat:@"Connection error making registration request to '%@': %@.", - URLRequest.URL, - error.localizedDescription]; - NSError *returnedError = [OIDErrorUtilities errorWithCode:OIDErrorCodeNetworkError - underlyingError:error - description:errorDescription]; - dispatch_async(dispatch_get_main_queue(), ^{ - completion(nil, returnedError); - }); - return; - } - - NSHTTPURLResponse *HTTPURLResponse = (NSHTTPURLResponse *) response; - - if (HTTPURLResponse.statusCode != 201 && HTTPURLResponse.statusCode != 200) { - // A server error occurred. - NSError *serverError = [OIDErrorUtilities HTTPErrorWithHTTPResponse:HTTPURLResponse - data:data]; - - // HTTP 400 may indicate an OpenID Connect Dynamic Client Registration 1.0 Section 3.3 error - // response, checks for that - if (HTTPURLResponse.statusCode == 400) { - NSError *jsonDeserializationError; - NSDictionary *> *json = - [NSJSONSerialization JSONObjectWithData:data options:0 error:&jsonDeserializationError]; - - // if the HTTP 400 response parses as JSON and has an 'error' key, it's an OAuth error - // these errors are special as they indicate a problem with the authorization grant - if (json[OIDOAuthErrorFieldError]) { - NSError *oauthError = - [OIDErrorUtilities OAuthErrorWithDomain:OIDOAuthRegistrationErrorDomain - OAuthResponse:json - underlyingError:serverError]; - dispatch_async(dispatch_get_main_queue(), ^{ - completion(nil, oauthError); - }); - return; - } - } - - // not an OAuth error, just a generic server error - NSString *errorDescription = - [NSString stringWithFormat:@"Non-200/201 HTTP response (%d) making registration request " - "to '%@'.", - (int)HTTPURLResponse.statusCode, - URLRequest.URL]; - NSError *returnedError = [OIDErrorUtilities errorWithCode:OIDErrorCodeServerError - underlyingError:serverError - description:errorDescription]; - dispatch_async(dispatch_get_main_queue(), ^{ - completion(nil, returnedError); - }); - return; - } - - NSError *jsonDeserializationError; - NSDictionary *> *json = - [NSJSONSerialization JSONObjectWithData:data options:0 error:&jsonDeserializationError]; - if (jsonDeserializationError) { - // A problem occurred deserializing the response/JSON. - NSString *errorDescription = - [NSString stringWithFormat:@"JSON error parsing registration response: %@", - jsonDeserializationError.localizedDescription]; - NSError *returnedError = [OIDErrorUtilities errorWithCode:OIDErrorCodeJSONDeserializationError - underlyingError:jsonDeserializationError - description:errorDescription]; - dispatch_async(dispatch_get_main_queue(), ^{ - completion(nil, returnedError); - }); - return; - } - - OIDRegistrationResponse *registrationResponse = - [[OIDRegistrationResponse alloc] initWithRequest:request - parameters:json]; - if (!registrationResponse) { - // A problem occurred constructing the registration response from the JSON. - NSError *returnedError = - [OIDErrorUtilities errorWithCode:OIDErrorCodeRegistrationResponseConstructionError - underlyingError:nil - description:@"Registration response invalid."]; - dispatch_async(dispatch_get_main_queue(), ^{ - completion(nil, returnedError); - }); - return; - } - - // Success - dispatch_async(dispatch_get_main_queue(), ^{ - completion(registrationResponse, nil); - }); - }] resume]; -} - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDClientMetadataParameters.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDClientMetadataParameters.h deleted file mode 100644 index 39ea2d62..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDClientMetadataParameters.h +++ /dev/null @@ -1,51 +0,0 @@ -/*! @file OIDClientMetadataParameters.h - @brief AppAuth iOS SDK - @copyright - Copyright 2016 The AppAuth for iOS Authors. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -NS_ASSUME_NONNULL_BEGIN - -/*! @brief Parameter name for the token endpoint authentication method. - */ -extern NSString *const OIDTokenEndpointAuthenticationMethodParam; - -/*! @brief Parameter name for the application type. - */ -extern NSString *const OIDApplicationTypeParam; - -/*! @brief Parameter name for the redirect URI values. - */ -extern NSString *const OIDRedirectURIsParam; - -/*! @brief Parameter name for the response type values. - */ -extern NSString *const OIDResponseTypesParam; - -/*! @brief Parameter name for the grant type values. - */ -extern NSString *const OIDGrantTypesParam; - -/*! @brief Parameter name for the subject type. - */ -extern NSString *const OIDSubjectTypeParam; - -/*! @brief Application type that indicates this client is a native (not a web) application. - */ -extern NSString *const OIDApplicationTypeNative; - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDClientMetadataParameters.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDClientMetadataParameters.m deleted file mode 100644 index 79ad4676..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDClientMetadataParameters.m +++ /dev/null @@ -1,33 +0,0 @@ -/*! @file OIDClientMetadataParameters.h - @brief AppAuth iOS SDK - @copyright - Copyright 2016 The AppAuth for iOS Authors. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDClientMetadataParameters.h" - -NSString *const OIDTokenEndpointAuthenticationMethodParam = @"token_endpoint_auth_method"; - -NSString *const OIDApplicationTypeParam = @"application_type"; - -NSString *const OIDRedirectURIsParam = @"redirect_uris"; - -NSString *const OIDResponseTypesParam = @"response_types"; - -NSString *const OIDGrantTypesParam = @"grant_types"; - -NSString *const OIDSubjectTypeParam = @"subject_type"; - -NSString *const OIDApplicationTypeNative = @"native"; diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDDefines.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDDefines.h deleted file mode 100644 index 8ff4f19b..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDDefines.h +++ /dev/null @@ -1,51 +0,0 @@ -/*! @file OIDDefines.h - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -/*! @def OIDIsEqualIncludingNil(x, y) - @brief Returns YES if x and y are equal by reference or value. - @discussion NOTE: parameters may be evaluated multiple times. Be careful if using this check - with expressions - especially if the expressions have side effects. - @param x An object. - @param y An object. - */ -#define OIDIsEqualIncludingNil(x, y) (((x) == (y)) || [(x) isEqual:(y)]) - -/*! @def OID_UNAVAILABLE_USE_INITIALIZER(designatedInitializer) - @brief Provides a template implementation for init-family methods which have been marked as - NS_UNAVILABLE. Stops the compiler from giving a warning when it's the super class' - designated initializer, and gives callers useful feedback telling them what the - new designated initializer is. - @remarks Takes a SEL as a parameter instead of a string so that we get compiler warnings if the - designated intializer's signature changes. - @param designatedInitializer A SEL referencing the designated initializer. - */ -#define OID_UNAVAILABLE_USE_INITIALIZER(designatedInitializer) { \ - NSString *reason = [NSString stringWithFormat:@"Called: %@\nDesignated Initializer:%@", \ - NSStringFromSelector(_cmd), \ - NSStringFromSelector(designatedInitializer)]; \ - @throw [NSException exceptionWithName:@"Attempt to call unavailable initializer." \ - reason:reason \ - userInfo:nil]; \ -} - -#ifdef _APPAUTHTRACE -# define AppAuthRequestTrace(fmt, ...) NSLog(fmt, ##__VA_ARGS__); -#else // _APPAUTHTRACE -# define AppAuthRequestTrace(...) -#endif // _APPAUTHTRACE - diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDError.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDError.h deleted file mode 100644 index 5131f0ad..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDError.h +++ /dev/null @@ -1,393 +0,0 @@ -/*! @file OIDError.h - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -NS_ASSUME_NONNULL_BEGIN - -/*! @brief The error domain for all NSErrors returned from the AppAuth library. - */ -extern NSString *const OIDGeneralErrorDomain; - -/*! @brief The error domain for OAuth specific errors on the authorization endpoint. - @discussion This error domain is used when the server responds to an authorization request - with an explicit OAuth error, as defined by RFC6749 Section 4.1.2.1. If the authorization - response is invalid and not explicitly an error response, another error domain will be used. - The error response parameter dictionary is available in the - \NSError_userInfo dictionary using the @c ::OIDOAuthErrorResponseErrorKey key. - The \NSError_code will be one of the @c ::OIDErrorCodeOAuthAuthorization enum values. - @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1 - */ -extern NSString *const OIDOAuthAuthorizationErrorDomain; - -/*! @brief The error domain for OAuth specific errors on the token endpoint. - @discussion This error domain is used when the server responds with HTTP 400 and an OAuth error, - as defined RFC6749 Section 5.2. If an HTTP 400 response does not parse as an OAuth error - (i.e. no 'error' field is present or the JSON is invalid), another error domain will be - used. The entire OAuth error response dictionary is available in the \NSError_userInfo - dictionary using the @c ::OIDOAuthErrorResponseErrorKey key. Unlike transient network - errors, errors in this domain invalidate the authentication state, and either indicate a - client error or require user interaction (i.e. reauthentication) to resolve. - The \NSError_code will be one of the @c ::OIDErrorCodeOAuthToken enum values. - @see https://tools.ietf.org/html/rfc6749#section-5.2 - */ -extern NSString *const OIDOAuthTokenErrorDomain; - -/*! @brief The error domain for dynamic client registration errors. - @discussion This error domain is used when the server responds with HTTP 400 and an OAuth error, - as defined in OpenID Connect Dynamic Client Registration 1.0 Section 3.3. If an HTTP 400 - response does not parse as an OAuth error (i.e. no 'error' field is present or the JSON is - invalid), another error domain will be used. The entire OAuth error response dictionary is - available in the \NSError_userInfo dictionary using the @c ::OIDOAuthErrorResponseErrorKey - key. Unlike transient network errors, errors in this domain invalidate the authentication - state, and indicates a client error. - The \NSError_code will be one of the @c ::OIDErrorCodeOAuthToken enum values. - @see https://openid.net/specs/openid-connect-registration-1_0.html#RegistrationError - */ -extern NSString *const OIDOAuthRegistrationErrorDomain; - -/*! @brief The error domain for authorization errors encountered out of band on the resource server. - */ -extern NSString *const OIDResourceServerAuthorizationErrorDomain; - -/*! @brief An error domain representing received HTTP errors. - */ -extern NSString *const OIDHTTPErrorDomain; - -/*! @brief An error key for the original OAuth error response (if any). - */ -extern NSString *const OIDOAuthErrorResponseErrorKey; - -/*! @brief The key of the 'error' response field in a RFC6749 Section 5.2 response. - @remark error - @see https://tools.ietf.org/html/rfc6749#section-5.2 - */ -extern NSString *const OIDOAuthErrorFieldError; - -/*! @brief The key of the 'error_description' response field in a RFC6749 Section 5.2 response. - @remark error_description - @see https://tools.ietf.org/html/rfc6749#section-5.2 - */ -extern NSString *const OIDOAuthErrorFieldErrorDescription; - -/*! @brief The key of the 'error_uri' response field in a RFC6749 Section 5.2 response. - @remark error_uri - @see https://tools.ietf.org/html/rfc6749#section-5.2 - */ -extern NSString *const OIDOAuthErrorFieldErrorURI; - -/*! @brief The various error codes returned from the AppAuth library. - */ -typedef NS_ENUM(NSInteger, OIDErrorCode) { - /*! @brief Indicates a problem parsing an OpenID Connect Service Discovery document. - */ - OIDErrorCodeInvalidDiscoveryDocument = -2, - - /*! @brief Indicates the user manually canceled the OAuth authorization code flow. - */ - OIDErrorCodeUserCanceledAuthorizationFlow = -3, - - /*! @brief Indicates an OAuth authorization flow was programmatically cancelled. - */ - OIDErrorCodeProgramCanceledAuthorizationFlow = -4, - - /*! @brief Indicates a network error or server error occurred. - */ - OIDErrorCodeNetworkError = -5, - - /*! @brief Indicates a server error occurred. - */ - OIDErrorCodeServerError = -6, - - /*! @brief Indicates a problem occurred deserializing the response/JSON. - */ - OIDErrorCodeJSONDeserializationError = -7, - - /*! @brief Indicates a problem occurred constructing the token response from the JSON. - */ - OIDErrorCodeTokenResponseConstructionError = -8, - - /*! @brief @c UIApplication.openURL: returned NO when attempting to open the authorization - request in mobile Safari. - */ - OIDErrorCodeSafariOpenError = -9, - - /*! @brief @c NSWorkspace.openURL returned NO when attempting to open the authorization - request in the default browser. - */ - OIDErrorCodeBrowserOpenError = -10, - - /*! @brief Indicates a problem when trying to refresh the tokens. - */ - OIDErrorCodeTokenRefreshError = -11, - - /*! @brief Indicates a problem occurred constructing the registration response from the JSON. - */ - OIDErrorCodeRegistrationResponseConstructionError = -12, - - /*! @brief Indicates a problem occurred deserializing the response/JSON. - */ - OIDErrorCodeJSONSerializationError = -13, - - /*! @brief The ID Token did not parse. - */ - OIDErrorCodeIDTokenParsingError = -14, - - /*! @brief The ID Token did not pass validation (e.g. issuer, audience checks). - */ - OIDErrorCodeIDTokenFailedValidationError = -15, -}; - -/*! @brief Enum of all possible OAuth error codes as defined by RFC6749 - @discussion Used by @c ::OIDErrorCodeOAuthAuthorization and @c ::OIDErrorCodeOAuthToken - which define endpoint-specific subsets of OAuth codes. Those enum types are down-castable - to this one. - @see https://tools.ietf.org/html/rfc6749#section-11.4 - @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1 - @see https://tools.ietf.org/html/rfc6749#section-5.2 - */ -typedef NS_ENUM(NSInteger, OIDErrorCodeOAuth) { - - /*! @remarks invalid_request - @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1 - @see https://tools.ietf.org/html/rfc6749#section-5.2 - */ - OIDErrorCodeOAuthInvalidRequest = -2, - - /*! @remarks unauthorized_client - @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1 - @see https://tools.ietf.org/html/rfc6749#section-5.2 - */ - OIDErrorCodeOAuthUnauthorizedClient = -3, - - /*! @remarks access_denied - @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1 - */ - OIDErrorCodeOAuthAccessDenied = -4, - - /*! @remarks unsupported_response_type - @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1 - */ - OIDErrorCodeOAuthUnsupportedResponseType = -5, - - /*! @remarks invalid_scope - @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1 - @see https://tools.ietf.org/html/rfc6749#section-5.2 - */ - OIDErrorCodeOAuthInvalidScope = -6, - - /*! @remarks server_error - @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1 - */ - OIDErrorCodeOAuthServerError = -7, - - /*! @remarks temporarily_unavailable - @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1 - */ - OIDErrorCodeOAuthTemporarilyUnavailable = -8, - - /*! @remarks invalid_client - @see https://tools.ietf.org/html/rfc6749#section-5.2 - */ - OIDErrorCodeOAuthInvalidClient = -9, - - /*! @remarks invalid_grant - @see https://tools.ietf.org/html/rfc6749#section-5.2 - */ - OIDErrorCodeOAuthInvalidGrant = -10, - - /*! @remarks unsupported_grant_type - @see https://tools.ietf.org/html/rfc6749#section-5.2 - */ - OIDErrorCodeOAuthUnsupportedGrantType = -11, - - /*! @remarks invalid_redirect_uri - @see https://openid.net/specs/openid-connect-registration-1_0.html#RegistrationError - */ - OIDErrorCodeOAuthInvalidRedirectURI = -12, - - /*! @remarks invalid_client_metadata - @see https://openid.net/specs/openid-connect-registration-1_0.html#RegistrationError - */ - OIDErrorCodeOAuthInvalidClientMetadata = -13, - - /*! @brief An authorization error occurring on the client rather than the server. For example, - due to a state mismatch or misconfiguration. Should be treated as an unrecoverable - authorization error. - */ - OIDErrorCodeOAuthClientError = -0xEFFF, - - /*! @brief An OAuth error not known to this library - @discussion Indicates an OAuth error as per RFC6749, but the error code was not in our - list. It could be a custom error code, or one from an OAuth extension. See the "error" key - of the \NSError_userInfo property. Such errors are assumed to invalidate the - authentication state - */ - OIDErrorCodeOAuthOther = -0xF000, -}; - -/*! @brief The error codes for the @c ::OIDOAuthAuthorizationErrorDomain error domain - @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1 - */ -typedef NS_ENUM(NSInteger, OIDErrorCodeOAuthAuthorization) { - /*! @remarks invalid_request - @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1 - */ - OIDErrorCodeOAuthAuthorizationInvalidRequest = OIDErrorCodeOAuthInvalidRequest, - - /*! @remarks unauthorized_client - @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1 - */ - OIDErrorCodeOAuthAuthorizationUnauthorizedClient = OIDErrorCodeOAuthUnauthorizedClient, - - /*! @remarks access_denied - @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1 - */ - OIDErrorCodeOAuthAuthorizationAccessDenied = - OIDErrorCodeOAuthAccessDenied, - - /*! @remarks unsupported_response_type - @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1 - */ - OIDErrorCodeOAuthAuthorizationUnsupportedResponseType = - OIDErrorCodeOAuthUnsupportedResponseType, - - /*! @brief Indicates a network error or server error occurred. - @remarks invalid_scope - @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1 - */ - OIDErrorCodeOAuthAuthorizationAuthorizationInvalidScope = OIDErrorCodeOAuthInvalidScope, - - /*! @brief Indicates a server error occurred. - @remarks server_error - @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1 - */ - OIDErrorCodeOAuthAuthorizationServerError = OIDErrorCodeOAuthServerError, - - /*! @remarks temporarily_unavailable - @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1 - */ - OIDErrorCodeOAuthAuthorizationTemporarilyUnavailable = OIDErrorCodeOAuthTemporarilyUnavailable, - - /*! @brief An authorization error occurring on the client rather than the server. For example, - due to a state mismatch or client misconfiguration. Should be treated as an unrecoverable - authorization error. - */ - OIDErrorCodeOAuthAuthorizationClientError = OIDErrorCodeOAuthClientError, - - /*! @brief An authorization OAuth error not known to this library - @discussion this indicates an OAuth error as per RFC6749, but the error code was not in our - list. It could be a custom error code, or one from an OAuth extension. See the "error" key - of the \NSError_userInfo property. We assume such errors are not transient. - @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1 - */ - OIDErrorCodeOAuthAuthorizationOther = OIDErrorCodeOAuthOther, -}; - - -/*! @brief The error codes for the @c ::OIDOAuthTokenErrorDomain error domain - @see https://tools.ietf.org/html/rfc6749#section-5.2 - */ -typedef NS_ENUM(NSInteger, OIDErrorCodeOAuthToken) { - /*! @remarks invalid_request - @see https://tools.ietf.org/html/rfc6749#section-5.2 - */ - OIDErrorCodeOAuthTokenInvalidRequest = OIDErrorCodeOAuthInvalidRequest, - - /*! @remarks invalid_client - @see https://tools.ietf.org/html/rfc6749#section-5.2 - */ - OIDErrorCodeOAuthTokenInvalidClient = OIDErrorCodeOAuthInvalidClient, - - /*! @remarks invalid_grant - @see https://tools.ietf.org/html/rfc6749#section-5.2 - */ - OIDErrorCodeOAuthTokenInvalidGrant = OIDErrorCodeOAuthInvalidGrant, - - /*! @remarks unauthorized_client - @see https://tools.ietf.org/html/rfc6749#section-5.2 - */ - OIDErrorCodeOAuthTokenUnauthorizedClient = OIDErrorCodeOAuthUnauthorizedClient, - - /*! @remarks unsupported_grant_type - @see https://tools.ietf.org/html/rfc6749#section-5.2 - */ - OIDErrorCodeOAuthTokenUnsupportedGrantType = OIDErrorCodeOAuthUnsupportedGrantType, - - /*! @remarks invalid_scope - @see https://tools.ietf.org/html/rfc6749#section-5.2 - */ - OIDErrorCodeOAuthTokenInvalidScope = OIDErrorCodeOAuthInvalidScope, - - /*! @brief An unrecoverable token error occurring on the client rather than the server. - */ - OIDErrorCodeOAuthTokenClientError = OIDErrorCodeOAuthClientError, - - /*! @brief A token endpoint OAuth error not known to this library - @discussion this indicates an OAuth error as per RFC6749, but the error code was not in our - list. It could be a custom error code, or one from an OAuth extension. See the "error" key - of the \NSError_userInfo property. We assume such errors are not transient. - @see https://tools.ietf.org/html/rfc6749#section-5.2 - */ - OIDErrorCodeOAuthTokenOther = OIDErrorCodeOAuthOther, -}; - -/*! @brief The error codes for the @c ::OIDOAuthRegistrationErrorDomain error domain - @see https://openid.net/specs/openid-connect-registration-1_0.html#RegistrationError - */ -typedef NS_ENUM(NSInteger, OIDErrorCodeOAuthRegistration) { - /*! @remarks invalid_request - @see http://tools.ietf.org/html/rfc6750#section-3.1 - */ - OIDErrorCodeOAuthRegistrationInvalidRequest = OIDErrorCodeOAuthInvalidRequest, - - /*! @remarks invalid_redirect_uri - @see https://openid.net/specs/openid-connect-registration-1_0.html#RegistrationError - */ - OIDErrorCodeOAuthRegistrationInvalidRedirectURI = OIDErrorCodeOAuthInvalidRedirectURI, - - /*! @remarks invalid_client_metadata - @see https://openid.net/specs/openid-connect-registration-1_0.html#RegistrationError - */ - OIDErrorCodeOAuthRegistrationInvalidClientMetadata = OIDErrorCodeOAuthInvalidClientMetadata, - - /*! @brief An unrecoverable token error occurring on the client rather than the server. - */ - OIDErrorCodeOAuthRegistrationClientError = OIDErrorCodeOAuthClientError, - - /*! @brief A registration endpoint OAuth error not known to this library - @discussion this indicates an OAuth error, but the error code was not in our - list. It could be a custom error code, or one from an OAuth extension. See the "error" key - of the \NSError_userInfo property. We assume such errors are not transient. - @see https://tools.ietf.org/html/rfc6749#section-5.2 - */ - OIDErrorCodeOAuthRegistrationOther = OIDErrorCodeOAuthOther, -}; - - -/*! @brief The exception text for the exception which occurs when a - @c OIDExternalUserAgentSession receives a message after it has already completed. - */ -extern NSString *const OIDOAuthExceptionInvalidAuthorizationFlow; - -/*! @brief The text for the exception which occurs when a Token Request is constructed - with a null redirectURL for a grant_type that requires a nonnull Redirect - */ -extern NSString *const OIDOAuthExceptionInvalidTokenRequestNullRedirectURL; - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDError.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDError.m deleted file mode 100644 index 87c8623e..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDError.m +++ /dev/null @@ -1,45 +0,0 @@ -/*! @file OIDError.m - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDError.h" - -NSString *const OIDGeneralErrorDomain = @"org.openid.appauth.general"; - -NSString *const OIDOAuthTokenErrorDomain = @"org.openid.appauth.oauth_token"; - -NSString *const OIDOAuthAuthorizationErrorDomain = @"org.openid.appauth.oauth_authorization"; - -NSString *const OIDOAuthRegistrationErrorDomain = @"org.openid.appauth.oauth_registration"; - -NSString *const OIDResourceServerAuthorizationErrorDomain = @"org.openid.appauth.resourceserver"; - -NSString *const OIDHTTPErrorDomain = @"org.openid.appauth.remote-http"; - -NSString *const OIDOAuthExceptionInvalidAuthorizationFlow = @"An OAuth redirect was sent to a " - "OIDExternalUserAgentSession after it already completed."; - -NSString *const OIDOAuthExceptionInvalidTokenRequestNullRedirectURL = @"A OIDTokenRequest was " - "created with a grant_type that requires a redirectURL, but a null redirectURL was given"; - -NSString *const OIDOAuthErrorResponseErrorKey = @"OIDOAuthErrorResponseErrorKey"; - -NSString *const OIDOAuthErrorFieldError = @"error"; - -NSString *const OIDOAuthErrorFieldErrorDescription = @"error_description"; - -NSString *const OIDOAuthErrorFieldErrorURI = @"error_uri"; diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDErrorUtilities.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDErrorUtilities.h deleted file mode 100644 index 3380f6fe..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDErrorUtilities.h +++ /dev/null @@ -1,107 +0,0 @@ -/*! @file OIDErrorUtilities.h - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -#import "OIDError.h" - -NS_ASSUME_NONNULL_BEGIN - -/*! @brief Convenience methods for creating standardized \NSError instances. - */ -@interface OIDErrorUtilities : NSObject - -/*! @brief Creates a standard \NSError from an @c ::OIDErrorCode and custom user info. - Automatically populates the localized error description. - @param code The error code. - @param underlyingError The underlying error which occurred, if applicable. - @param description A custom description, if applicable. - @return An \NSError representing the error code. - */ -+ (NSError *)errorWithCode:(OIDErrorCode)code - underlyingError:(nullable NSError *)underlyingError - description:(nullable NSString *)description; - -/*! @brief Creates a standard \NSError from an @c ::OIDErrorCode and custom user info. - Automatically populates the localized error description. - @param OAuthErrorDomain The OAuth error domain. Must be @c ::OIDOAuthAuthorizationErrorDomain or - @c ::OIDOAuthTokenErrorDomain. - @param errorResponse The dictionary from an OAuth error response (as per RFC6749 Section 5.2). - @param underlyingError The underlying error which occurred, if applicable. - @return An \NSError representing the OAuth error. - @see https://tools.ietf.org/html/rfc6749#section-5.2 - */ -+ (NSError *)OAuthErrorWithDomain:(NSString *)OAuthErrorDomain - OAuthResponse:(NSDictionary *)errorResponse - underlyingError:(nullable NSError *)underlyingError; - -/*! @brief Creates a \NSError indicating that the resource server responded with an authorization - error. - @param code Your error code. - @param errorResponse The resource server error response, if any. - @param underlyingError The underlying error which occurred, if applicable. - @return An \NSError representing the authorization error from the resource server. - */ -+ (NSError *)resourceServerAuthorizationErrorWithCode:(NSInteger)code - errorResponse:(nullable NSDictionary *)errorResponse - underlyingError:(nullable NSError *)underlyingError; - - -/*! @brief Creates a standard \NSError from an \NSHTTPURLResponse. Automatically - populates the localized error description with the response data associated with the - \NSHTTPURLResponse, if available. - @param HTTPURLResponse The response which indicates an error occurred. - @param data The response data associated with the response which should be converted to an - @c NSString assuming a UTF-8 encoding, if available. - @return An \NSError representing the error. - */ -+ (NSError *)HTTPErrorWithHTTPResponse:(NSHTTPURLResponse *)HTTPURLResponse - data:(nullable NSData *)data; - -/*! @brief Raises an exception with the given name as both the name, and the message. - @param name The name of the exception. - */ -+ (void)raiseException:(NSString *)name; - -/*! @brief Raises an exception with the given name and message. - @param name The name of the exception. - @param message The message of the exception. - */ -+ (void)raiseException:(NSString *)name message:(NSString *)message; - -/*! @brief Converts an OAuth error code into an @c ::OIDErrorCodeOAuth error code. - @param errorCode The OAuth error code. - @discussion Returns @c ::OIDErrorCodeOAuthOther if the string is not in AppAuth's list. - @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1 - @see https://tools.ietf.org/html/rfc6749#section-5.2 - */ -+ (OIDErrorCodeOAuth)OAuthErrorCodeFromString:(NSString *)errorCode; - -/*! @brief Returns true if the given error domain is an OAuth error domain. - @param errorDomain The error domain to test. - @discussion An OAuth error domain is used for errors returned per RFC6749 sections 4.1.2.1 and - 5.2. Other errors, such as network errors can also occur but they will not have an OAuth - error domain. - @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1 - @see https://tools.ietf.org/html/rfc6749#section-5.2 - */ -+ (BOOL)isOAuthErrorDomain:(NSString*)errorDomain; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDErrorUtilities.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDErrorUtilities.m deleted file mode 100644 index 3b3c0607..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDErrorUtilities.m +++ /dev/null @@ -1,172 +0,0 @@ -/*! @file OIDErrorUtilities.m - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDErrorUtilities.h" - -@implementation OIDErrorUtilities - -+ (NSError *)errorWithCode:(OIDErrorCode)code - underlyingError:(NSError *)underlyingError - description:(NSString *)description { - NSMutableDictionary *userInfo = [NSMutableDictionary dictionary]; - if (underlyingError) { - userInfo[NSUnderlyingErrorKey] = underlyingError; - } - if (description) { - userInfo[NSLocalizedDescriptionKey] = description; - } - // TODO: Populate localized description based on code. - NSError *error = [NSError errorWithDomain:OIDGeneralErrorDomain - code:code - userInfo:userInfo]; - return error; -} - -+ (BOOL)isOAuthErrorDomain:(NSString *)errorDomain { - return errorDomain == OIDOAuthRegistrationErrorDomain - || errorDomain == OIDOAuthAuthorizationErrorDomain - || errorDomain == OIDOAuthTokenErrorDomain; -} - -+ (NSError *)resourceServerAuthorizationErrorWithCode:(NSInteger)code - errorResponse:(nullable NSDictionary *)errorResponse - underlyingError:(nullable NSError *)underlyingError { - // builds the userInfo dictionary with the full OAuth response and other information - NSMutableDictionary *userInfo = [NSMutableDictionary dictionary]; - if (errorResponse) { - userInfo[OIDOAuthErrorResponseErrorKey] = errorResponse; - } - if (underlyingError) { - userInfo[NSUnderlyingErrorKey] = underlyingError; - } - NSError *error = [NSError errorWithDomain:OIDResourceServerAuthorizationErrorDomain - code:code - userInfo:userInfo]; - return error; -} - -+ (NSError *)OAuthErrorWithDomain:(NSString *)oAuthErrorDomain - OAuthResponse:(NSDictionary *)errorResponse - underlyingError:(NSError *)underlyingError { - // not a valid OAuth error - if (![self isOAuthErrorDomain:oAuthErrorDomain] - || !errorResponse - || !errorResponse[OIDOAuthErrorFieldError] - || ![errorResponse[OIDOAuthErrorFieldError] isKindOfClass:[NSString class]]) { - return [[self class] errorWithCode:OIDErrorCodeNetworkError - underlyingError:underlyingError - description:underlyingError.localizedDescription]; - } - - // builds the userInfo dictionary with the full OAuth response and other information - NSMutableDictionary *userInfo = [NSMutableDictionary dictionary]; - userInfo[OIDOAuthErrorResponseErrorKey] = errorResponse; - if (underlyingError) { - userInfo[NSUnderlyingErrorKey] = underlyingError; - } - - NSString *oauthErrorCodeString = errorResponse[OIDOAuthErrorFieldError]; - NSString *oauthErrorMessage = nil; - if ([errorResponse[OIDOAuthErrorFieldErrorDescription] isKindOfClass:[NSString class]]) { - oauthErrorMessage = errorResponse[OIDOAuthErrorFieldErrorDescription]; - } else { - oauthErrorMessage = [errorResponse[OIDOAuthErrorFieldErrorDescription] description]; - } - NSString *oauthErrorURI = nil; - if ([errorResponse[OIDOAuthErrorFieldErrorURI] isKindOfClass:[NSString class]]) { - oauthErrorURI = errorResponse[OIDOAuthErrorFieldErrorURI]; - } else { - oauthErrorURI = [errorResponse[OIDOAuthErrorFieldErrorURI] description]; - } - - // builds the error description, using the information supplied by the server if possible - NSMutableString *description = [NSMutableString string]; - [description appendString:oauthErrorCodeString]; - if (oauthErrorMessage) { - [description appendString:@": "]; - [description appendString:oauthErrorMessage]; - } - if (oauthErrorURI) { - if ([description length] > 0) { - [description appendString:@" - "]; - } - [description appendString:oauthErrorURI]; - } - if ([description length] == 0) { - // backup description - [description appendFormat:@"OAuth error: %@ - https://tools.ietf.org/html/rfc6749#section-5.2", - oauthErrorCodeString]; - } - userInfo[NSLocalizedDescriptionKey] = description; - - // looks up the error code based on the "error" response param - OIDErrorCodeOAuth code = [[self class] OAuthErrorCodeFromString:oauthErrorCodeString]; - - NSError *error = [NSError errorWithDomain:oAuthErrorDomain - code:code - userInfo:userInfo]; - return error; -} - -+ (NSError *)HTTPErrorWithHTTPResponse:(NSHTTPURLResponse *)HTTPURLResponse - data:(nullable NSData *)data { - NSMutableDictionary *userInfo = [NSMutableDictionary dictionary]; - if (data) { - NSString *serverResponse = - [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; - if (serverResponse) { - userInfo[NSLocalizedDescriptionKey] = serverResponse; - } - } - NSError *serverError = - [NSError errorWithDomain:OIDHTTPErrorDomain - code:HTTPURLResponse.statusCode - userInfo:userInfo]; - return serverError; -} - -+ (OIDErrorCodeOAuth)OAuthErrorCodeFromString:(NSString *)errorCode { - NSDictionary *errorCodes = @{ - @"invalid_request": @(OIDErrorCodeOAuthInvalidRequest), - @"unauthorized_client": @(OIDErrorCodeOAuthUnauthorizedClient), - @"access_denied": @(OIDErrorCodeOAuthAccessDenied), - @"unsupported_response_type": @(OIDErrorCodeOAuthUnsupportedResponseType), - @"invalid_scope": @(OIDErrorCodeOAuthInvalidScope), - @"server_error": @(OIDErrorCodeOAuthServerError), - @"temporarily_unavailable": @(OIDErrorCodeOAuthTemporarilyUnavailable), - @"invalid_client": @(OIDErrorCodeOAuthInvalidClient), - @"invalid_grant": @(OIDErrorCodeOAuthInvalidGrant), - @"unsupported_grant_type": @(OIDErrorCodeOAuthUnsupportedGrantType), - }; - NSNumber *code = errorCodes[errorCode]; - if (code) { - return [code integerValue]; - } else { - return OIDErrorCodeOAuthOther; - } -} - -+ (void)raiseException:(NSString *)name { - [[self class] raiseException:name message:name]; -} - -+ (void)raiseException:(NSString *)name message:(NSString *)message { - [NSException raise:name format:@"%@", message]; -} - -@end diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDExternalUserAgent.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDExternalUserAgent.h deleted file mode 100644 index c4eb0a90..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDExternalUserAgent.h +++ /dev/null @@ -1,53 +0,0 @@ -/*! @file OIDExternalUserAgent.h - @brief AppAuth iOS SDK - @copyright - Copyright 2016 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -@protocol OIDExternalUserAgentSession; -@protocol OIDExternalUserAgentRequest; - -NS_ASSUME_NONNULL_BEGIN - -/*! @protocol OIDExternalUserAgent - @brief An external user-agent UI that presents displays the request to the user. Clients may - provide custom implementations of an external user-agent to customize the way the requests - are presented to the end user. - */ -@protocol OIDExternalUserAgent - -/*! @brief Presents the request in the external user-agent. - @param request The request to be presented in the external user-agent. - @param session The @c OIDExternalUserAgentSession instance that initiates presenting the UI. - Concrete implementations of a @c OIDExternalUserAgent may call - resumeExternalUserAgentFlowWithURL or failExternalUserAgentFlowWithError on session to either - resume or fail the request. - @return YES If the request UI was successfully presented to the user. - */ -- (BOOL)presentExternalUserAgentRequest:(id )request - session:(id)session; - -/*! @brief Dimisses the external user-agent and calls completion when the dismiss operation ends. - @param animated Whether or not the dismiss operation should be animated. - @remarks Has no effect if no UI is presented. - @param completion The block to be called when the dismiss operations ends - */ -- (void)dismissExternalUserAgentAnimated:(BOOL)animated completion:(void (^)(void))completion; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDExternalUserAgentRequest.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDExternalUserAgentRequest.h deleted file mode 100644 index 8ea40cb6..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDExternalUserAgentRequest.h +++ /dev/null @@ -1,37 +0,0 @@ -/*! @file OIDExternalUserAgent.h - @brief AppAuth iOS SDK - @copyright - Copyright 2017 The AppAuth Authors. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -/*! @protocol OIDExternalUserAgent - @brief An interface that any external user-agent request may implement to use the - @c OIDExternalUserAgent flow. - */ -@protocol OIDExternalUserAgentRequest - -/*! @brief Method to create and return the complete request URL instance. - @return A @c NSURL instance which contains the URL to be opened in an external UI (i.e. browser) - */ -- (NSURL*)externalUserAgentRequestURL; - -/*! @brief If this external user-agent request has a redirect URL, this should return its scheme. - Since some external requests have optional callbacks (such as the end session endpoint), the - return value of this method is nullable. - @return A @c NSString instance that contains the scheme of a callback url, or nil if there is - no callback url for this request. - */ -- (NSString*)redirectScheme; -@end diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDExternalUserAgentSession.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDExternalUserAgentSession.h deleted file mode 100644 index f0ee7232..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDExternalUserAgentSession.h +++ /dev/null @@ -1,52 +0,0 @@ -/*! @file OIDExternalUserAgentSession.h - @brief AppAuth iOS SDK - @copyright - Copyright 2017 The AppAuth Authors. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - - -/*! @brief Represents an in-flight external user-agent session. - */ -@protocol OIDExternalUserAgentSession - -/*! @brief Cancels the code flow session, invoking the request's callback with a cancelled error. - @remarks Has no effect if called more than once, or after a - @c OIDExternalUserAgentSession.resumeExternalUserAgentFlowWithURL: message was received. - Will cause an error with code: @c ::OIDErrorCodeProgramCanceledAuthorizationFlow to be - passed to the @c callback block passed to - @c OIDAuthorizationService.presentAuthorizationRequest:presentingViewController:callback: - */ -- (void)cancel; - -/*! @brief Clients should call this method with the result of the external user-agent code flow if - it becomes available. - @param URL The redirect URL invoked by the server. - @discussion When the URL represented a valid response, implementations should clean up any - left-over UI state from the request, for example by closing the - \SFSafariViewController or loopback HTTP listener if those were used. The completion block - of the pending request should then be invoked. - @remarks Has no effect if called more than once, or after a @c cancel message was received. - @return YES if the passed URL matches the expected redirect URL and was consumed, NO otherwise. - */ -- (BOOL)resumeExternalUserAgentFlowWithURL:(NSURL *)URL; - -/*! @brief @c OIDExternalUserAgent or clients should call this method when the - external user-agent flow failed with a non-OAuth error. - @param error The error that is the reason for the failure of this external flow. - @remarks Has no effect if called more than once, or after a @c cancel message was received. - */ -- (void)failExternalUserAgentFlowWithError:(NSError *)error; - -@end diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDFieldMapping.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDFieldMapping.h deleted file mode 100644 index f0a56fef..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDFieldMapping.h +++ /dev/null @@ -1,126 +0,0 @@ -/*! @file OIDFieldMapping.h - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -NS_ASSUME_NONNULL_BEGIN - -/*! @brief Represents a function which transforms incoming source values into instance variable - values. - */ -typedef _Nullable id(^OIDFieldMappingConversionFunction)(NSObject *_Nullable value); - -/*! @brief Describes the mapping of a key/value pair to an iVar with an optional conversion - function. - */ -@interface OIDFieldMapping : NSObject - -/*! @brief The name of the instance variable the field should be mapped to. - */ -@property(nonatomic, readonly) NSString *name; - -/*! @brief The type of the instance variable. - */ -@property(nonatomic, readonly) Class expectedType; - -/*! @brief An optional conversion function which specifies a transform from the incoming data to the - instance variable value. - */ -@property(nonatomic, readonly, nullable) OIDFieldMappingConversionFunction conversion; - -/*! @internal - @brief Unavailable. Please use initWithName:type:conversion:. - */ -- (instancetype)init NS_UNAVAILABLE; - -/*! @brief The designated initializer. - @param name The name of the instance variable the field should be mapped to. - @param type The type of the instance variable. - @param conversion An optional conversion function which specifies a transform from the incoming - data to the instance variable value. Used during the process performed by - @c OIDFieldMapping.remainingParametersWithMap:parameters:instance: but not during - encoding/decoding, since the encoded and decoded values should already be of the type - specified by the @c type parameter. - */ -- (instancetype)initWithName:(NSString *)name - type:(Class)type - conversion:(nullable OIDFieldMappingConversionFunction)conversion - NS_DESIGNATED_INITIALIZER; - -/*! @brief A convenience initializer. - @param name The name of the instance variable the field should be mapped to. - @param type The type of the instance variable. - */ -- (instancetype)initWithName:(NSString *)name - type:(Class)type; - -/*! @brief Performs a mapping of key/value pairs in an incoming parameters dictionary to instance - variables, returning a dictionary of parameter key/values which didn't map to instance - variables. - @param map A mapping of incoming keys to instance variables. - @param parameters Incoming key value pairs to map to an instance's variables. - @param instance The instance whose variables should be set based on the mapping. - @return A dictionary of parameter key/values which didn't map to instance variables. - */ -+ (NSDictionary *> *)remainingParametersWithMap: - (NSDictionary *)map - parameters:(NSDictionary *> *)parameters - instance:(id)instance; - -/*! @brief This helper method for @c NSCoding implementations performs a serialization of fields - defined in a field mapping. - @param aCoder An @c NSCoder instance to serialize instance variable values to. - @param map A mapping of keys to instance variables. - @param instance The instance whose variables should be serialized based on the mapping. - */ -+ (void)encodeWithCoder:(NSCoder *)aCoder - map:(NSDictionary *)map - instance:(id)instance; - -/*! @brief This helper method for @c NSCoding implementations performs a deserialization of - fields defined in a field mapping. - @param aCoder An @c NSCoder instance from which to deserialize instance variable values from. - @param map A mapping of keys to instance variables. - @param instance The instance whose variables should be deserialized based on the mapping. - */ -+ (void)decodeWithCoder:(NSCoder *)aCoder - map:(NSDictionary *)map - instance:(id)instance; - -/*! @brief Returns an @c NSSet of classes suitable for deserializing JSON content in an - @c NSSecureCoding context. - */ -+ (NSSet *)JSONTypes; - -/*! @brief Returns a function for converting an @c NSString to an @c NSURL. - */ -+ (OIDFieldMappingConversionFunction)URLConversion; - -/*! @brief Returns a function for converting an @c NSNumber number of seconds from now to an - @c NSDate. - */ -+ (OIDFieldMappingConversionFunction)dateSinceNowConversion; - -/*! @brief Returns a function for converting an @c NSNumber representing a unix time stamp to an - @c NSDate. - */ -+ (OIDFieldMappingConversionFunction)dateEpochConversion; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDFieldMapping.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDFieldMapping.m deleted file mode 100644 index f8436560..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDFieldMapping.m +++ /dev/null @@ -1,132 +0,0 @@ -/*! @file OIDFieldMapping.m - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDFieldMapping.h" - -#import "OIDDefines.h" - -@implementation OIDFieldMapping - -- (nonnull instancetype)init - OID_UNAVAILABLE_USE_INITIALIZER(@selector(initWithName:type:conversion:)) - -- (instancetype)initWithName:(NSString *)name - type:(Class)type { - return [self initWithName:name type:type conversion:nil]; -} - -- (instancetype)initWithName:(NSString *)name - type:(Class)type - conversion:(nullable OIDFieldMappingConversionFunction)conversion { - self = [super init]; - if (self) { - _name = [name copy]; - _expectedType = type; - _conversion = conversion; - } - return self; -} - -+ (NSDictionary *> *)remainingParametersWithMap: - (NSDictionary *)map - parameters:(NSDictionary *> *)parameters - instance:(id)instance { - NSMutableDictionary *additionalParameters = [NSMutableDictionary dictionary]; - for (NSString *key in parameters) { - NSObject *value = [parameters[key] copy]; - OIDFieldMapping *mapping = map[key]; - // If the field doesn't appear in the mapping, we add it to the additional parameters - // dictionary. - if (!mapping) { - additionalParameters[key] = value; - continue; - } - // If the field mapping specifies a conversion function, apply the conversion to the value. - if (mapping.conversion) { - value = mapping.conversion(value); - } - // Check the type of the value and make sure it matches the type we expected. If it doesn't we - // add the value to the additional parameters dictionary but don't assign the instance variable. - if (![value isKindOfClass:mapping.expectedType]) { - additionalParameters[key] = value; - continue; - } - // Assign the instance variable. - [instance setValue:value forKey:mapping.name]; - } - return additionalParameters; -} - -+ (void)encodeWithCoder:(NSCoder *)aCoder - map:(NSDictionary *)map - instance:(id)instance { - for (NSString *key in map) { - id value = [instance valueForKey:map[key].name]; - [aCoder encodeObject:value forKey:key]; - } -} - -+ (void)decodeWithCoder:(NSCoder *)aCoder - map:(NSDictionary *)map - instance:(id)instance { - for (NSString *key in map) { - OIDFieldMapping *mapping = map[key]; - id value = [aCoder decodeObjectOfClass:mapping.expectedType forKey:key]; - [instance setValue:value forKey:mapping.name]; - } -} - -+ (NSSet *)JSONTypes { - return [NSSet setWithArray:@[ - [NSDictionary class], - [NSArray class], - [NSString class], - [NSNumber class] - ]]; -} - -+ (OIDFieldMappingConversionFunction)URLConversion { - return ^id _Nullable(NSObject *_Nullable value) { - if ([value isKindOfClass:[NSString class]]) { - return [NSURL URLWithString:(NSString *)value]; - } - return value; - }; -} - -+ (OIDFieldMappingConversionFunction)dateSinceNowConversion { - return ^id _Nullable(NSObject *_Nullable value) { - if (![value isKindOfClass:[NSNumber class]]) { - return value; - } - NSNumber *valueAsNumber = (NSNumber *)value; - return [NSDate dateWithTimeIntervalSinceNow:[valueAsNumber longLongValue]]; - }; -} - -+ (OIDFieldMappingConversionFunction)dateEpochConversion { - return ^id _Nullable(NSObject *_Nullable value) { - if (![value isKindOfClass:[NSNumber class]]) { - return value; - } - NSNumber *valueAsNumber = (NSNumber *) value; - return [NSDate dateWithTimeIntervalSince1970:[valueAsNumber longLongValue]]; - }; -} - -@end diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDGrantTypes.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDGrantTypes.h deleted file mode 100644 index 6e650047..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDGrantTypes.h +++ /dev/null @@ -1,40 +0,0 @@ -/*! @file OIDGrantTypes.h - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -/*! @brief For exchanging an authorization code for an access token. - @see https://tools.ietf.org/html/rfc6749#section-4.1.3 - */ -extern NSString *const OIDGrantTypeAuthorizationCode; - -/*! @brief For refreshing an access token with a refresh token. - @see https://tools.ietf.org/html/rfc6749#section-6 - */ -extern NSString *const OIDGrantTypeRefreshToken; - -/*! @brief For obtaining an access token with a username and password. - @see https://tools.ietf.org/html/rfc6749#section-4.3.2 - */ -extern NSString *const OIDGrantTypePassword; - -/*! @brief For obtaining an access token from the token endpoint using client credentials. - @see https://tools.ietf.org/html/rfc6749#section-3.2.1 - @see https://tools.ietf.org/html/rfc6749#section-4.4.2 - */ -extern NSString *const OIDGrantTypeClientCredentials; diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDGrantTypes.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDGrantTypes.m deleted file mode 100644 index 2b193437..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDGrantTypes.m +++ /dev/null @@ -1,27 +0,0 @@ -/*! @file OIDGrantTypes.m - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDGrantTypes.h" - -NSString *const OIDGrantTypeAuthorizationCode = @"authorization_code"; - -NSString *const OIDGrantTypeRefreshToken = @"refresh_token"; - -NSString *const OIDGrantTypePassword = @"password"; - -NSString *const OIDGrantTypeClientCredentials = @"client_credentials"; diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDIDToken.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDIDToken.h deleted file mode 100644 index 6fe84d7f..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDIDToken.h +++ /dev/null @@ -1,91 +0,0 @@ -/*! @file OIDIDToken.h - @brief AppAuth iOS SDK - @copyright - Copyright 2017 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ -#import - -NS_ASSUME_NONNULL_BEGIN - -/*! @brief A convenience class that parses an ID Token and extracts the claims _but does not_ - verify its signature. AppAuth only supports the OpenID Code flow, meaning ID Tokens - received by AppAuth are sent from the token endpoint on a TLS protected channel, - offering some assurances as to the origin of the token. You may wish to additionally - verify the ID Token signature using a JWT signature verification library of your - choosing. - @see http://openid.net/specs/openid-connect-core-1_0.html#IDToken - @see https://tools.ietf.org/html/rfc7519 - @see https://jwt.io/ - */ -@interface OIDIDToken : NSObject - -/*! @internal - @brief Unavailable. Please use @c initWithAuthorizationResponse:. - */ -- (instancetype)init NS_UNAVAILABLE; - -/*! @brief Parses the given ID Token string. - @param idToken The ID Token spring. - */ -- (nullable instancetype)initWithIDTokenString:(NSString *)idToken; - -/*! @brief The header JWT values. - */ -@property(nonatomic, readonly) NSDictionary *header; - -/*! @brief All ID Token claims. - */ -@property(nonatomic, readonly) NSDictionary *claims; - -/*! @brief Issuer Identifier for the Issuer of the response. - @remarks iss - @see http://openid.net/specs/openid-connect-core-1_0.html#IDToken - */ -@property(nonatomic, readonly) NSURL *issuer; - -/*! @brief Subject Identifier. - @remarks sub - @see http://openid.net/specs/openid-connect-core-1_0.html#IDToken - */ -@property(nonatomic, readonly) NSString *subject; - -/*! @brief Audience(s) that this ID Token is intended for. - @remarks aud - @see http://openid.net/specs/openid-connect-core-1_0.html#IDToken - */ -@property(nonatomic, readonly) NSArray *audience; - -/*! @brief Expiration time on or after which the ID Token MUST NOT be accepted for processing. - @remarks exp - @see http://openid.net/specs/openid-connect-core-1_0.html#IDToken - */ -@property(nonatomic, readonly) NSDate *expiresAt; - -/*! @brief Time at which the JWT was issued. - @remarks iat - @see http://openid.net/specs/openid-connect-core-1_0.html#IDToken - */ -@property(nonatomic, readonly) NSDate *issuedAt; - -/*! @brief String value used to associate a Client session with an ID Token, and to mitigate replay - attacks. - @remarks nonce - @see http://openid.net/specs/openid-connect-core-1_0.html#IDToken - */ -@property(nonatomic, readonly, nullable) NSString *nonce; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDIDToken.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDIDToken.m deleted file mode 100644 index 57a7324e..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDIDToken.m +++ /dev/null @@ -1,149 +0,0 @@ -/*! @file OIDIDToken.m - @brief AppAuth iOS SDK - @copyright - Copyright 2017 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDIDToken.h" - -/*! Field keys associated with an ID Token. */ -static NSString *const kIssKey = @"iss"; -static NSString *const kSubKey = @"sub"; -static NSString *const kAudKey = @"aud"; -static NSString *const kExpKey = @"exp"; -static NSString *const kIatKey = @"iat"; -static NSString *const kNonceKey = @"nonce"; - -#import "OIDFieldMapping.h" - -@implementation OIDIDToken - -- (instancetype)initWithIDTokenString:(NSString *)idToken { - self = [super init]; - NSArray *sections = [idToken componentsSeparatedByString:@"."]; - - // The header and claims sections are required. - if (sections.count <= 1) { - return nil; - } - - _header = [[self class] parseJWTSection:sections[0]]; - _claims = [[self class] parseJWTSection:sections[1]]; - if (!_header || !_claims) { - return nil; - } - - [OIDFieldMapping remainingParametersWithMap:[[self class] fieldMap] - parameters:_claims - instance:self]; - - // Required fields. - if (!_issuer || !_audience || !_subject || !_expiresAt || !_issuedAt) { - return nil; - } - - return self; -} - -/*! @brief Returns a mapping of incoming parameters to instance variables. - @return A mapping of incoming parameters to instance variables. - */ -+ (NSDictionary *)fieldMap { - static NSMutableDictionary *fieldMap; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - fieldMap = [NSMutableDictionary dictionary]; - - fieldMap[kIssKey] = - [[OIDFieldMapping alloc] initWithName:@"_issuer" - type:[NSURL class] - conversion:[OIDFieldMapping URLConversion]]; - fieldMap[kSubKey] = - [[OIDFieldMapping alloc] initWithName:@"_subject" type:[NSString class]]; - fieldMap[kAudKey] = - [[OIDFieldMapping alloc] initWithName:@"_audience" - type:[NSArray class] - conversion:^id _Nullable(NSObject *_Nullable value) { - if ([value isKindOfClass:[NSArray class]]) { - return value; - } - if ([value isKindOfClass:[NSString class]]) { - return @[value]; - } - return nil; - }]; - fieldMap[kExpKey] = - [[OIDFieldMapping alloc] initWithName:@"_expiresAt" - type:[NSDate class] - conversion:^id _Nullable(NSObject *_Nullable value) { - if (![value isKindOfClass:[NSNumber class]]) { - return value; - } - NSNumber *valueAsNumber = (NSNumber *)value; - return [NSDate dateWithTimeIntervalSince1970:valueAsNumber.longLongValue]; - }]; - fieldMap[kIatKey] = - [[OIDFieldMapping alloc] initWithName:@"_issuedAt" - type:[NSDate class] - conversion:^id _Nullable(NSObject *_Nullable value) { - if (![value isKindOfClass:[NSNumber class]]) { - return value; - } - NSNumber *valueAsNumber = (NSNumber *)value; - return [NSDate dateWithTimeIntervalSince1970:valueAsNumber.longLongValue]; - }]; - fieldMap[kNonceKey] = - [[OIDFieldMapping alloc] initWithName:@"_nonce" type:[NSString class]]; - }); - return fieldMap; -} - -+ (NSDictionary *)parseJWTSection:(NSString *)sectionString { - NSData *decodedData = [[self class] base64urlNoPaddingDecode:sectionString]; - - // Parses JSON. - NSError *error; - id object = [NSJSONSerialization JSONObjectWithData:decodedData options:0 error:&error]; - if (error) { - NSLog(@"Error %@ parsing token payload %@", error, sectionString); - } - if ([object isKindOfClass:[NSDictionary class]]) { - return (NSDictionary *)object; - } - - return nil; -} - -+ (NSData *)base64urlNoPaddingDecode:(NSString *)base64urlNoPaddingString { - NSMutableString *body = [base64urlNoPaddingString mutableCopy]; - - // Converts base64url to base64. - NSRange range = NSMakeRange(0, base64urlNoPaddingString.length); - [body replaceOccurrencesOfString:@"-" withString:@"+" options:NSLiteralSearch range:range]; - [body replaceOccurrencesOfString:@"_" withString:@"/" options:NSLiteralSearch range:range]; - - // Converts base64 no padding to base64 with padding - while (body.length % 4 != 0) { - [body appendString:@"="]; - } - - // Decodes base64 string. - NSData *decodedData = [[NSData alloc] initWithBase64EncodedString:body options:0]; - return decodedData; -} - -@end - - diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDRegistrationRequest.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDRegistrationRequest.h deleted file mode 100644 index e509c60a..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDRegistrationRequest.h +++ /dev/null @@ -1,141 +0,0 @@ -/*! @file OIDRegistrationRequest.h - @brief AppAuth iOS SDK - @copyright - Copyright 2016 The AppAuth for iOS Authors. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -@class OIDAuthorizationResponse; -@class OIDServiceConfiguration; - -NS_ASSUME_NONNULL_BEGIN - -/*! @brief Represents a registration request. - @see https://openid.net/specs/openid-connect-registration-1_0.html#RegistrationRequest - */ -@interface OIDRegistrationRequest : NSObject - -/*! @brief The service's configuration. - @remarks This configuration specifies how to connect to a particular OAuth provider. - Configurations may be created manually, or via an OpenID Connect Discovery Document. - */ -@property(nonatomic, readonly) OIDServiceConfiguration *configuration; - -/*! @brief The initial access token to access the Client Registration Endpoint - (if required by the OpenID Provider). - @remarks OAuth 2.0 Access Token optionally issued by an Authorization Server granting - access to its Client Registration Endpoint. This token (if required) is - provisioned out of band. - @see Section 3 of OpenID Connect Dynamic Client Registration 1.0 - https://openid.net/specs/openid-connect-registration-1_0.html#ClientRegistration - */ -@property(nonatomic, readonly) NSString *initialAccessToken; - -/*! @brief The application type to register, will always be 'native'. - @remarks application_type - @see https://openid.net/specs/openid-connect-registration-1_0.html#ClientMetadata - */ -@property(nonatomic, readonly) NSString *applicationType; - -/*! @brief The client's redirect URI's. - @remarks redirect_uris - @see https://tools.ietf.org/html/rfc6749#section-3.1.2 - */ -@property(nonatomic, readonly) NSArray *redirectURIs; - -/*! @brief The response types to register for usage by this client. - @remarks response_types - @see http://openid.net/specs/openid-connect-core-1_0.html#Authentication - */ -@property(nonatomic, readonly, nullable) NSArray *responseTypes; - -/*! @brief The grant types to register for usage by this client. - @remarks grant_types - @see https://openid.net/specs/openid-connect-registration-1_0.html#ClientMetadata - */ -@property(nonatomic, readonly, nullable) NSArray *grantTypes; - -/*! @brief The subject type to to request. - @remarks subject_type - @see http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes - */ -@property(nonatomic, readonly, nullable) NSString *subjectType; - -/*! @brief The client authentication method to use at the token endpoint. - @remarks token_endpoint_auth_method - @see http://openid.net/specs/openid-connect-core-1_0.html#ClientAuthentication - */ -@property(nonatomic, readonly, nullable) NSString *tokenEndpointAuthenticationMethod; - -/*! @brief The client's additional token request parameters. - */ -@property(nonatomic, readonly, nullable) NSDictionary *additionalParameters; - -/*! @internal - @brief Unavailable. Please use initWithConfiguration - */ -- (instancetype)init NS_UNAVAILABLE; - -/*! @brief Create a Client Registration Request to an OpenID Provider that supports open Dynamic - Registration. - @param configuration The service's configuration. - @param redirectURIs The redirect URIs to register for the client. - @param responseTypes The response types to register for the client. - @param grantTypes The grant types to register for the client. - @param subjectType The subject type to register for the client. - @param tokenEndpointAuthMethod The token endpoint authentication method to register for the - client. - @param additionalParameters The client's additional registration request parameters. - */ -- (instancetype)initWithConfiguration:(OIDServiceConfiguration *)configuration - redirectURIs:(NSArray *)redirectURIs - responseTypes:(nullable NSArray *)responseTypes - grantTypes:(nullable NSArray *)grantTypes - subjectType:(nullable NSString *)subjectType - tokenEndpointAuthMethod:(nullable NSString *)tokenEndpointAuthMethod - additionalParameters:(nullable NSDictionary *)additionalParameters; - -/*! @brief Designated initializer. - @param configuration The service's configuration. - @param redirectURIs The redirect URIs to register for the client. - @param responseTypes The response types to register for the client. - @param grantTypes The grant types to register for the client. - @param subjectType The subject type to register for the client. - @param tokenEndpointAuthMethod The token endpoint authentication method to register for the - client. - @param initialAccessToken The initial access token to access the Client Registration Endpoint - (if required by the OpenID Provider). - @param additionalParameters The client's additional registration request parameters. - @see https://openid.net/specs/openid-connect-registration-1_0.html#ClientRegistration - */ -- (instancetype)initWithConfiguration:(OIDServiceConfiguration *)configuration - redirectURIs:(NSArray *)redirectURIs - responseTypes:(nullable NSArray *)responseTypes - grantTypes:(nullable NSArray *)grantTypes - subjectType:(nullable NSString *)subjectType - tokenEndpointAuthMethod:(nullable NSString *)tokenEndpointAuthMethod - initialAccessToken:(nullable NSString *)initialAccessToken - additionalParameters:(nullable NSDictionary *)additionalParameters - NS_DESIGNATED_INITIALIZER; - -/*! @brief Constructs an @c NSURLRequest representing the registration request. - @return An @c NSURLRequest representing the registration request. - */ -- (NSURLRequest *)URLRequest; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDRegistrationRequest.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDRegistrationRequest.m deleted file mode 100644 index 9efd18fd..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDRegistrationRequest.m +++ /dev/null @@ -1,248 +0,0 @@ -/*! @file OIDRegistrationRequest.m - @brief AppAuth iOS SDK - @copyright - Copyright 2016 The AppAuth for iOS Authors. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDRegistrationRequest.h" - -#import "OIDClientMetadataParameters.h" -#import "OIDDefines.h" -#import "OIDServiceConfiguration.h" - -/*! @brief The key for the @c configuration property for @c NSSecureCoding - */ -static NSString *const kConfigurationKey = @"configuration"; - -/*! @brief The key for the @c initialAccessToken property for @c NSSecureCoding - */ -static NSString *const kInitialAccessToken = @"initial_access_token"; - -/*! @brief Key used to encode the @c redirectURIs property for @c NSSecureCoding - */ -static NSString *const kRedirectURIsKey = @"redirect_uris"; - -/*! @brief The key for the @c responseTypes property for @c NSSecureCoding. - */ -static NSString *const kResponseTypesKey = @"response_types"; - -/*! @brief Key used to encode the @c grantType property for @c NSSecureCoding - */ -static NSString *const kGrantTypesKey = @"grant_types"; - -/*! @brief Key used to encode the @c subjectType property for @c NSSecureCoding - */ -static NSString *const kSubjectTypeKey = @"subject_type"; - -/*! @brief Key used to encode the @c additionalParameters property for - @c NSSecureCoding - */ -static NSString *const kAdditionalParametersKey = @"additionalParameters"; - -@implementation OIDRegistrationRequest - -#pragma mark - Initializers - -- (instancetype)init - OID_UNAVAILABLE_USE_INITIALIZER( - @selector(initWithConfiguration: - redirectURIs: - responseTypes: - grantTypes: - subjectType: - tokenEndpointAuthMethod: - additionalParameters:) - ) - -- (instancetype)initWithConfiguration:(OIDServiceConfiguration *)configuration - redirectURIs:(NSArray *)redirectURIs - responseTypes:(nullable NSArray *)responseTypes - grantTypes:(nullable NSArray *)grantTypes - subjectType:(nullable NSString *)subjectType - tokenEndpointAuthMethod:(nullable NSString *)tokenEndpointAuthenticationMethod - additionalParameters:(nullable NSDictionary *)additionalParameters { - return [self initWithConfiguration:configuration - redirectURIs:redirectURIs - responseTypes:responseTypes - grantTypes:grantTypes - subjectType:subjectType - tokenEndpointAuthMethod:tokenEndpointAuthenticationMethod - initialAccessToken:nil - additionalParameters:additionalParameters]; -} - -- (instancetype)initWithConfiguration:(OIDServiceConfiguration *)configuration - redirectURIs:(NSArray *)redirectURIs - responseTypes:(nullable NSArray *)responseTypes - grantTypes:(nullable NSArray *)grantTypes - subjectType:(nullable NSString *)subjectType - tokenEndpointAuthMethod:(nullable NSString *)tokenEndpointAuthenticationMethod - initialAccessToken:(nullable NSString *)initialAccessToken - additionalParameters:(nullable NSDictionary *)additionalParameters { - self = [super init]; - if (self) { - _configuration = [configuration copy]; - _initialAccessToken = [initialAccessToken copy]; - _redirectURIs = [redirectURIs copy]; - _responseTypes = [responseTypes copy]; - _grantTypes = [grantTypes copy]; - _subjectType = [subjectType copy]; - _tokenEndpointAuthenticationMethod = [tokenEndpointAuthenticationMethod copy]; - _additionalParameters = - [[NSDictionary alloc] initWithDictionary:additionalParameters copyItems:YES]; - - _applicationType = OIDApplicationTypeNative; - } - return self; -} - -#pragma mark - NSCopying - -- (instancetype)copyWithZone:(nullable NSZone *)zone { - // The documentation for NSCopying specifically advises us to return a reference to the original - // instance in the case where instances are immutable (as ours is): - // "Implement NSCopying by retaining the original instead of creating a new copy when the class - // and its contents are immutable." - return self; -} - -#pragma mark - NSSecureCoding - -+ (BOOL)supportsSecureCoding { - return YES; -} - -- (instancetype)initWithCoder:(NSCoder *)aDecoder { - OIDServiceConfiguration *configuration = - [aDecoder decodeObjectOfClass:[OIDServiceConfiguration class] - forKey:kConfigurationKey]; - NSString *initialAccessToken = [aDecoder decodeObjectOfClass:[NSString class] - forKey:kInitialAccessToken]; - NSArray *redirectURIs = [aDecoder decodeObjectOfClass:[NSArray class] - forKey:kRedirectURIsKey]; - NSArray *responseTypes = [aDecoder decodeObjectOfClass:[NSArray class] - forKey:kResponseTypesKey]; - NSArray *grantTypes = [aDecoder decodeObjectOfClass:[NSArray class] - forKey:kGrantTypesKey]; - NSString *subjectType = [aDecoder decodeObjectOfClass:[NSString class] - forKey:kSubjectTypeKey]; - NSString *tokenEndpointAuthenticationMethod = - [aDecoder decodeObjectOfClass:[NSString class] - forKey:OIDTokenEndpointAuthenticationMethodParam]; - NSSet *additionalParameterCodingClasses = [NSSet setWithArray:@[ [NSDictionary class], - [NSString class] ]]; - NSDictionary *additionalParameters = - [aDecoder decodeObjectOfClasses:additionalParameterCodingClasses - forKey:kAdditionalParametersKey]; - self = [self initWithConfiguration:configuration - redirectURIs:redirectURIs - responseTypes:responseTypes - grantTypes:grantTypes - subjectType:subjectType - tokenEndpointAuthMethod:tokenEndpointAuthenticationMethod - initialAccessToken:initialAccessToken - additionalParameters:additionalParameters]; - return self; -} - -- (void)encodeWithCoder:(NSCoder *)aCoder { - [aCoder encodeObject:_configuration forKey:kConfigurationKey]; - [aCoder encodeObject:_initialAccessToken forKey:kInitialAccessToken]; - [aCoder encodeObject:_redirectURIs forKey:kRedirectURIsKey]; - [aCoder encodeObject:_responseTypes forKey:kResponseTypesKey]; - [aCoder encodeObject:_grantTypes forKey:kGrantTypesKey]; - [aCoder encodeObject:_subjectType forKey:kSubjectTypeKey]; - [aCoder encodeObject:_tokenEndpointAuthenticationMethod - forKey:OIDTokenEndpointAuthenticationMethodParam]; - [aCoder encodeObject:_additionalParameters forKey:kAdditionalParametersKey]; -} - -#pragma mark - NSObject overrides - -- (NSString *)description { - NSURLRequest *request = [self URLRequest]; - NSString *requestBody = [[NSString alloc] initWithData:request.HTTPBody - encoding:NSUTF8StringEncoding]; - return [NSString stringWithFormat:@"<%@: %p, request: >", - NSStringFromClass([self class]), - (void *)self, - request.URL, - requestBody]; -} - -- (NSURLRequest *)URLRequest { - static NSString *const kHTTPPost = @"POST"; - static NSString *const kBearer = @"Bearer"; - static NSString *const kHTTPContentTypeHeaderKey = @"Content-Type"; - static NSString *const kHTTPContentTypeHeaderValue = @"application/json"; - static NSString *const kHTTPAuthorizationHeaderKey = @"Authorization"; - - NSData *postBody = [self JSONString]; - if (!postBody) { - return nil; - } - - NSURL *registrationRequestURL = _configuration.registrationEndpoint; - NSMutableURLRequest *URLRequest = - [[NSURLRequest requestWithURL:registrationRequestURL] mutableCopy]; - URLRequest.HTTPMethod = kHTTPPost; - [URLRequest setValue:kHTTPContentTypeHeaderValue forHTTPHeaderField:kHTTPContentTypeHeaderKey]; - if (_initialAccessToken) { - NSString *value = [NSString stringWithFormat:@"%@ %@", kBearer, _initialAccessToken]; - [URLRequest setValue:value forHTTPHeaderField:kHTTPAuthorizationHeaderKey]; - } - URLRequest.HTTPBody = postBody; - return URLRequest; -} - -- (NSData *)JSONString { - // Dictionary with several kay/value pairs and the above array of arrays - NSMutableDictionary *dict = [[NSMutableDictionary alloc] init]; - NSMutableArray *redirectURIStrings = - [NSMutableArray arrayWithCapacity:[_redirectURIs count]]; - for (id obj in _redirectURIs) { - [redirectURIStrings addObject:[obj absoluteString]]; - } - dict[OIDRedirectURIsParam] = redirectURIStrings; - dict[OIDApplicationTypeParam] = _applicationType; - - if (_additionalParameters) { - // Add any additional parameters first to allow them - // to be overwritten by instance values - [dict addEntriesFromDictionary:_additionalParameters]; - } - if (_responseTypes) { - dict[OIDResponseTypesParam] = _responseTypes; - } - if (_grantTypes) { - dict[OIDGrantTypesParam] = _grantTypes; - } - if (_subjectType) { - dict[OIDSubjectTypeParam] = _subjectType; - } - if (_tokenEndpointAuthenticationMethod) { - dict[OIDTokenEndpointAuthenticationMethodParam] = _tokenEndpointAuthenticationMethod; - } - - NSError *error; - NSData *json = [NSJSONSerialization dataWithJSONObject:dict options:kNilOptions error:&error]; - if (json == nil || error != nil) { - return nil; - } - - return json; -} - -@end diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDRegistrationResponse.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDRegistrationResponse.h deleted file mode 100644 index df623906..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDRegistrationResponse.h +++ /dev/null @@ -1,126 +0,0 @@ -/*! @file OIDRegistrationResponse.h - @brief AppAuth iOS SDK - @copyright - Copyright 2016 The AppAuth for iOS Authors. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - - -#import - -@class OIDRegistrationRequest; - -NS_ASSUME_NONNULL_BEGIN - -/*! @brief Parameter name for the client id. - */ -extern NSString *const OIDClientIDParam; - -/*! @brief Parameter name for the client id issuance timestamp. - */ -extern NSString *const OIDClientIDIssuedAtParam; - -/*! @brief Parameter name for the client secret. - */ -extern NSString *const OIDClientSecretParam; - -/*! @brief Parameter name for the client secret expiration time. - */ -extern NSString *const OIDClientSecretExpirestAtParam; - -/*! @brief Parameter name for the registration access token. - */ -extern NSString *const OIDRegistrationAccessTokenParam; - -/*! @brief Parameter name for the client configuration URI. - */ -extern NSString *const OIDRegistrationClientURIParam; - -/*! @brief Represents a registration response. - @see https://openid.net/specs/openid-connect-registration-1_0.html#RegistrationResponse - */ -@interface OIDRegistrationResponse : NSObject - -/*! @brief The request which was serviced. - */ -@property(nonatomic, readonly) OIDRegistrationRequest *request; - -/*! @brief The registered client identifier. - @remarks client_id - @see https://tools.ietf.org/html/rfc6749#section-4 - @see https://tools.ietf.org/html/rfc6749#section-4.1.1 - */ -@property(nonatomic, readonly) NSString *clientID; - -/*! @brief Timestamp of when the client identifier was issued, if provided. - @remarks client_id_issued_at - @see https://openid.net/specs/openid-connect-registration-1_0.html#RegistrationResponse - */ -@property(nonatomic, readonly, nullable) NSDate *clientIDIssuedAt; - -/*! @brief TThe client secret, which is part of the client credentials, if provided. - @remarks client_secret - @see https://openid.net/specs/openid-connect-registration-1_0.html#RegistrationResponse - */ -@property(nonatomic, readonly, nullable) NSString *clientSecret; - -/*! @brief Timestamp of when the client credentials expires, if provided. - @remarks client_secret_expires_at - @see https://openid.net/specs/openid-connect-registration-1_0.html#RegistrationResponse - */ -@property(nonatomic, readonly, nullable) NSDate *clientSecretExpiresAt; - -/*! @brief Client registration access token that can be used for subsequent operations upon the - client registration. - @remarks registration_access_token - @see https://openid.net/specs/openid-connect-registration-1_0.html#RegistrationResponse - */ -@property(nonatomic, readonly, nullable) NSString *registrationAccessToken; - -/*! @brief Location of the client configuration endpoint, if provided. - @remarks registration_client_uri - @see https://openid.net/specs/openid-connect-registration-1_0.html#RegistrationResponse - */ -@property(nonatomic, readonly, nullable) NSURL *registrationClientURI; - -/*! @brief Client authentication method to use at the token endpoint, if provided. - @remarks token_endpoint_auth_method - @see http://openid.net/specs/openid-connect-core-1_0.html#ClientAuthentication - */ -@property(nonatomic, readonly, nullable) NSString *tokenEndpointAuthenticationMethod; - -/*! @brief Additional parameters returned from the token server. - */ -@property(nonatomic, readonly, nullable) NSDictionary *> - *additionalParameters; - -/*! @internal - @brief Unavailable. Please use initWithRequest - */ -- (instancetype)init NS_UNAVAILABLE; - -/*! @brief Designated initializer. - @param request The serviced request. - @param parameters The decoded parameters returned from the Authorization Server. - @remarks Known parameters are extracted from the @c parameters parameter and the normative - properties are populated. Non-normative parameters are placed in the - @c #additionalParameters dictionary. - */ -- (instancetype)initWithRequest:(OIDRegistrationRequest *)request - parameters:(NSDictionary *> *)parameters - NS_DESIGNATED_INITIALIZER; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDRegistrationResponse.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDRegistrationResponse.m deleted file mode 100644 index ec0411b7..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDRegistrationResponse.m +++ /dev/null @@ -1,164 +0,0 @@ -/*! @file OIDRegistrationResponse.m - @brief AppAuth iOS SDK - @copyright - Copyright 2016 The AppAuth for iOS Authors. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDRegistrationResponse.h" - -#import "OIDClientMetadataParameters.h" -#import "OIDDefines.h" -#import "OIDFieldMapping.h" -#import "OIDRegistrationRequest.h" -#import "OIDTokenUtilities.h" - -NSString *const OIDClientIDParam = @"client_id"; -NSString *const OIDClientIDIssuedAtParam = @"client_id_issued_at"; -NSString *const OIDClientSecretParam = @"client_secret"; -NSString *const OIDClientSecretExpirestAtParam = @"client_secret_expires_at"; -NSString *const OIDRegistrationAccessTokenParam = @"registration_access_token"; -NSString *const OIDRegistrationClientURIParam = @"registration_client_uri"; - -/*! @brief Key used to encode the @c request property for @c NSSecureCoding - */ -static NSString *const kRequestKey = @"request"; - -/*! @brief Key used to encode the @c additionalParameters property for @c NSSecureCoding - */ -static NSString *const kAdditionalParametersKey = @"additionalParameters"; - -@implementation OIDRegistrationResponse - -/*! @brief Returns a mapping of incoming parameters to instance variables. - @return A mapping of incoming parameters to instance variables. - */ -+ (NSDictionary *)fieldMap { - static NSMutableDictionary *fieldMap; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - fieldMap = [NSMutableDictionary dictionary]; - fieldMap[OIDClientIDParam] = [[OIDFieldMapping alloc] initWithName:@"_clientID" - type:[NSString class]]; - fieldMap[OIDClientIDIssuedAtParam] = - [[OIDFieldMapping alloc] initWithName:@"_clientIDIssuedAt" - type:[NSDate class] - conversion:[OIDFieldMapping dateEpochConversion]]; - fieldMap[OIDClientSecretParam] = - [[OIDFieldMapping alloc] initWithName:@"_clientSecret" - type:[NSString class]]; - fieldMap[OIDClientSecretExpirestAtParam] = - [[OIDFieldMapping alloc] initWithName:@"_clientSecretExpiresAt" - type:[NSDate class] - conversion:[OIDFieldMapping dateEpochConversion]]; - fieldMap[OIDRegistrationAccessTokenParam] = - [[OIDFieldMapping alloc] initWithName:@"_registrationAccessToken" - type:[NSString class]]; - fieldMap[OIDRegistrationClientURIParam] = - [[OIDFieldMapping alloc] initWithName:@"_registrationClientURI" - type:[NSURL class] - conversion:[OIDFieldMapping URLConversion]]; - fieldMap[OIDTokenEndpointAuthenticationMethodParam] = - [[OIDFieldMapping alloc] initWithName:@"_tokenEndpointAuthenticationMethod" - type:[NSString class]]; - }); - return fieldMap; -} - - -#pragma mark - Initializers - -- (nonnull instancetype)init - OID_UNAVAILABLE_USE_INITIALIZER(@selector(initWithRequest:parameters:)) - -- (instancetype)initWithRequest:(OIDRegistrationRequest *)request - parameters:(NSDictionary *> *)parameters { - self = [super init]; - if (self) { - _request = [request copy]; - NSDictionary *> *additionalParameters = - [OIDFieldMapping remainingParametersWithMap:[[self class] fieldMap] - parameters:parameters - instance:self]; - _additionalParameters = additionalParameters; - - if ((_clientSecret && !_clientSecretExpiresAt) - || (!!_registrationClientURI != !!_registrationAccessToken)) { - // If client_secret is issued, client_secret_expires_at is REQUIRED, - // and the response MUST contain "[...] both a Client Configuration Endpoint - // and a Registration Access Token or neither of them" - return nil; - } - } - return self; -} - -#pragma mark - NSCopying - -- (instancetype)copyWithZone:(nullable NSZone *)zone { - // The documentation for NSCopying specifically advises us to return a reference to the original - // instance in the case where instances are immutable (as ours is): - // "Implement NSCopying by retaining the original instead of creating a new copy when the class - // and its contents are immutable." - return self; -} - -#pragma mark - NSSecureCoding - -+ (BOOL)supportsSecureCoding { - return YES; -} - -- (nullable instancetype)initWithCoder:(NSCoder *)aDecoder { - OIDRegistrationRequest *request = [aDecoder decodeObjectOfClass:[OIDRegistrationRequest class] - forKey:kRequestKey]; - self = [self initWithRequest:request - parameters:@{}]; - if (self) { - [OIDFieldMapping decodeWithCoder:aDecoder - map:[[self class] fieldMap] - instance:self]; - _additionalParameters = [aDecoder decodeObjectOfClasses:[OIDFieldMapping JSONTypes] - forKey:kAdditionalParametersKey]; - } - return self; -} - -- (void)encodeWithCoder:(NSCoder *)aCoder { - [OIDFieldMapping encodeWithCoder:aCoder map:[[self class] fieldMap] instance:self]; - [aCoder encodeObject:_request forKey:kRequestKey]; - [aCoder encodeObject:_additionalParameters forKey:kAdditionalParametersKey]; -} - -#pragma mark - NSObject overrides - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@: %p, clientID: \"%@\", clientIDIssuedAt: %@, " - "clientSecret: %@, clientSecretExpiresAt: \"%@\", " - "registrationAccessToken: \"%@\", " - "registrationClientURI: \"%@\", " - "additionalParameters: %@, request: %@>", - NSStringFromClass([self class]), - (void *)self, - _clientID, - _clientIDIssuedAt, - [OIDTokenUtilities redact:_clientSecret], - _clientSecretExpiresAt, - [OIDTokenUtilities redact:_registrationAccessToken], - _registrationClientURI, - _additionalParameters, - _request]; -} - -@end diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDResponseTypes.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDResponseTypes.h deleted file mode 100644 index 405ef938..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDResponseTypes.h +++ /dev/null @@ -1,31 +0,0 @@ -/*! @file OIDResponseTypes.h - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -/*! @brief A constant for the standard OAuth2 Response Type of 'code'. - */ -extern NSString *const OIDResponseTypeCode; - -/*! @brief A constant for the standard OAuth2 Response Type of 'token'. - */ -extern NSString *const OIDResponseTypeToken; - -/*! @brief A constant for the standard OAuth2 Response Type of 'id_token'. - */ -extern NSString *const OIDResponseTypeIDToken; diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDResponseTypes.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDResponseTypes.m deleted file mode 100644 index 78eaf187..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDResponseTypes.m +++ /dev/null @@ -1,25 +0,0 @@ -/*! @file OIDResponseTypes.m - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDResponseTypes.h" - -NSString *const OIDResponseTypeCode = @"code"; - -NSString *const OIDResponseTypeToken = @"token"; - -NSString *const OIDResponseTypeIDToken = @"id_token"; diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDScopeUtilities.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDScopeUtilities.h deleted file mode 100644 index c0a5190c..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDScopeUtilities.h +++ /dev/null @@ -1,48 +0,0 @@ -/*! @file OIDScopeUtilities.h - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -NS_ASSUME_NONNULL_BEGIN - -/*! @brief Provides convenience methods for dealing with scope strings. - */ -@interface OIDScopeUtilities : NSObject - -/*! @internal - @brief Unavailable. This class should not be initialized. - */ -- (instancetype)init NS_UNAVAILABLE; - -/*! @brief Converts an array of scope strings to a single scope string per the OAuth 2 spec. - @param scopes An array of scope strings. - @return A space-delimited string of scopes. - @see https://tools.ietf.org/html/rfc6749#section-3.3 - */ -+ (NSString *)scopesWithArray:(NSArray *)scopes; - -/*! @brief Converts an OAuth 2 spec-compliant scope string to an array of scopes. - @param scopes An OAuth 2 spec-compliant scope string. - @return An array of scope strings. - @see https://tools.ietf.org/html/rfc6749#section-3.3 - */ -+ (NSArray *)scopesArrayWithString:(NSString *)scopes; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDScopeUtilities.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDScopeUtilities.m deleted file mode 100644 index a0bcb8c8..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDScopeUtilities.m +++ /dev/null @@ -1,58 +0,0 @@ -/*! @file OIDScopeUtilities.m - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDScopeUtilities.h" - -@implementation OIDScopeUtilities - -/*! @brief A character set with the characters NOT allowed in a scope name. - @see https://tools.ietf.org/html/rfc6749#section-3.3 - */ -+ (NSCharacterSet *)disallowedScopeCharacters { - static NSCharacterSet *disallowedCharacters; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - NSMutableCharacterSet *allowedCharacters; - allowedCharacters = - [NSMutableCharacterSet characterSetWithRange:NSMakeRange(0x23, 0x5B - 0x23 + 1)]; - [allowedCharacters addCharactersInRange:NSMakeRange(0x5D, 0x7E - 0x5D + 1)]; - [allowedCharacters addCharactersInString:@"\x21"]; - disallowedCharacters = [allowedCharacters invertedSet]; - }); - return disallowedCharacters; -} - -+ (NSString *)scopesWithArray:(NSArray *)scopes { -#if !defined(NS_BLOCK_ASSERTIONS) - NSCharacterSet *disallowedCharacters = [self disallowedScopeCharacters]; - for (NSString *scope in scopes) { - NSAssert(scope.length, @"Found illegal empty scope string."); - NSAssert([scope rangeOfCharacterFromSet:disallowedCharacters].location == NSNotFound, - @"Found illegal character in scope string."); - } -#endif // !defined(NS_BLOCK_ASSERTIONS) - - NSString *scopeString = [scopes componentsJoinedByString:@" "]; - return scopeString; -} - -+ (NSArray *)scopesArrayWithString:(NSString *)scopes { - return [scopes componentsSeparatedByString:@" "]; -} - -@end diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDScopes.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDScopes.h deleted file mode 100644 index da8bb189..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDScopes.h +++ /dev/null @@ -1,46 +0,0 @@ -/*! @file OIDScopes.h - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -/*! @brief Scope that indicates this request is an OpenID Connect request. - @see http://openid.net/specs/openid-connect-core-1_0.html#AuthRequestValidation - */ -extern NSString *const OIDScopeOpenID; - -/*! @brief This scope value requests access to the End-User's default profile Claims, which are: - name, family_name, given_name, middle_name, nickname, preferred_username, profile, picture, - website, gender, birthdate, zoneinfo, locale, and updated_at. - @see http://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims - */ -extern NSString *const OIDScopeProfile; - -/*! @brief This scope value requests access to the email and email_verified Claims. - @see http://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims - */ -extern NSString *const OIDScopeEmail; - -/*! @brief This scope value requests access to the address Claim. - @see http://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims - */ -extern NSString *const OIDScopeAddress; - -/*! @brief This scope value requests access to the phone_number and phone_number_verified Claims. - @see http://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims - */ -extern NSString *const OIDScopePhone; diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDScopes.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDScopes.m deleted file mode 100644 index 62dd707e..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDScopes.m +++ /dev/null @@ -1,29 +0,0 @@ -/*! @file OIDScopes.m - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDScopes.h" - -NSString *const OIDScopeOpenID = @"openid"; - -NSString *const OIDScopeProfile = @"profile"; - -NSString *const OIDScopeEmail = @"email"; - -NSString *const OIDScopeAddress = @"address"; - -NSString *const OIDScopePhone = @"phone"; diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDServiceConfiguration.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDServiceConfiguration.h deleted file mode 100644 index 2221a1da..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDServiceConfiguration.h +++ /dev/null @@ -1,102 +0,0 @@ -/*! @file OIDServiceConfiguration.h - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -@class OIDServiceConfiguration; -@class OIDServiceDiscovery; - -NS_ASSUME_NONNULL_BEGIN - -/*! @brief The type of block called when a @c OIDServiceConfiguration has been created - by loading a @c OIDServiceDiscovery from an @c NSURL. - */ -typedef void (^OIDServiceConfigurationCreated) - (OIDServiceConfiguration *_Nullable serviceConfiguration, - NSError *_Nullable error); - -/*! @brief Represents the information needed to construct a @c OIDAuthorizationService. - */ -@interface OIDServiceConfiguration : NSObject - -/*! @brief The authorization endpoint URI. - */ -@property(nonatomic, readonly) NSURL *authorizationEndpoint; - -/*! @brief The token exchange and refresh endpoint URI. - */ -@property(nonatomic, readonly) NSURL *tokenEndpoint; - -/*! @brief The OpenID Connect issuer. - */ -@property(nonatomic, readonly, nullable) NSURL *issuer; - -/*! @brief The dynamic client registration endpoint URI. - */ -@property(nonatomic, readonly, nullable) NSURL *registrationEndpoint; - -/*! @brief The discovery document. - */ -@property(nonatomic, readonly, nullable) OIDServiceDiscovery *discoveryDocument; - -/*! @internal - @brief Unavailable. Please use @c initWithAuthorizationEndpoint:tokenEndpoint: or - @c initWithDiscoveryDocument:. - */ -- (instancetype)init NS_UNAVAILABLE; - -/*! @param authorizationEndpoint The authorization endpoint URI. - @param tokenEndpoint The token exchange and refresh endpoint URI. - */ -- (instancetype)initWithAuthorizationEndpoint:(NSURL *)authorizationEndpoint - tokenEndpoint:(NSURL *)tokenEndpoint; - -/*! @param authorizationEndpoint The authorization endpoint URI. - @param tokenEndpoint The token exchange and refresh endpoint URI. - @param registrationEndpoint The dynamic client registration endpoint URI. - */ -- (instancetype)initWithAuthorizationEndpoint:(NSURL *)authorizationEndpoint - tokenEndpoint:(NSURL *)tokenEndpoint - registrationEndpoint:(nullable NSURL *)registrationEndpoint; - -/*! @param authorizationEndpoint The authorization endpoint URI. - @param tokenEndpoint The token exchange and refresh endpoint URI. - @param issuer The OpenID Connect issuer. - */ -- (instancetype)initWithAuthorizationEndpoint:(NSURL *)authorizationEndpoint - tokenEndpoint:(NSURL *)tokenEndpoint - issuer:(nullable NSURL *)issuer; - -/*! @param authorizationEndpoint The authorization endpoint URI. - @param tokenEndpoint The token exchange and refresh endpoint URI. - @param issuer The OpenID Connect issuer. - @param registrationEndpoint The dynamic client registration endpoint URI. - */ -- (instancetype)initWithAuthorizationEndpoint:(NSURL *)authorizationEndpoint - tokenEndpoint:(NSURL *)tokenEndpoint - issuer:(nullable NSURL *)issuer - registrationEndpoint:(nullable NSURL *)registrationEndpoint; - -/*! @param discoveryDocument The discovery document from which to extract the required OAuth - configuration. - */ -- (instancetype)initWithDiscoveryDocument:(OIDServiceDiscovery *)discoveryDocument; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDServiceConfiguration.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDServiceConfiguration.m deleted file mode 100644 index 517c955b..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDServiceConfiguration.m +++ /dev/null @@ -1,193 +0,0 @@ -/*! @file OIDServiceConfiguration.m - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDServiceConfiguration.h" - -#import "OIDDefines.h" -#import "OIDErrorUtilities.h" -#import "OIDServiceDiscovery.h" - -/*! @brief The key for the @c authorizationEndpoint property. - */ -static NSString *const kAuthorizationEndpointKey = @"authorizationEndpoint"; - -/*! @brief The key for the @c tokenEndpoint property. - */ -static NSString *const kTokenEndpointKey = @"tokenEndpoint"; - -/*! @brief The key for the @c issuer property. - */ -static NSString *const kIssuerKey = @"issuer"; - -/*! @brief The key for the @c registrationEndpoint property. - */ -static NSString *const kRegistrationEndpointKey = @"registrationEndpoint"; - -/*! @brief The key for the @c discoveryDocument property. - */ -static NSString *const kDiscoveryDocumentKey = @"discoveryDocument"; - -NS_ASSUME_NONNULL_BEGIN - -@interface OIDServiceConfiguration () - -- (instancetype)initWithAuthorizationEndpoint:(NSURL *)authorizationEndpoint - tokenEndpoint:(NSURL *)tokenEndpoint - issuer:(nullable NSURL *)issuer - registrationEndpoint:(nullable NSURL *)registrationEndpoint - discoveryDocument:(nullable OIDServiceDiscovery *)discoveryDocument - NS_DESIGNATED_INITIALIZER; - -@end - -@implementation OIDServiceConfiguration - -- (instancetype)init - OID_UNAVAILABLE_USE_INITIALIZER(@selector( - initWithAuthorizationEndpoint: - tokenEndpoint:) - ) - -- (instancetype)initWithAuthorizationEndpoint:(NSURL *)authorizationEndpoint - tokenEndpoint:(NSURL *)tokenEndpoint - issuer:(nullable NSURL *)issuer - registrationEndpoint:(nullable NSURL *)registrationEndpoint - discoveryDocument:(nullable OIDServiceDiscovery *)discoveryDocument { - - self = [super init]; - if (self) { - _authorizationEndpoint = [authorizationEndpoint copy]; - _tokenEndpoint = [tokenEndpoint copy]; - _issuer = [issuer copy]; - _registrationEndpoint = [registrationEndpoint copy]; - _discoveryDocument = [discoveryDocument copy]; - } - return self; -} - -- (instancetype)initWithAuthorizationEndpoint:(NSURL *)authorizationEndpoint - tokenEndpoint:(NSURL *)tokenEndpoint { - return [self initWithAuthorizationEndpoint:authorizationEndpoint - tokenEndpoint:tokenEndpoint - issuer:nil - registrationEndpoint:nil - discoveryDocument:nil]; -} - -- (instancetype)initWithAuthorizationEndpoint:(NSURL *)authorizationEndpoint - tokenEndpoint:(NSURL *)tokenEndpoint - registrationEndpoint:(nullable NSURL *)registrationEndpoint { - return [self initWithAuthorizationEndpoint:authorizationEndpoint - tokenEndpoint:tokenEndpoint - issuer:nil - registrationEndpoint:registrationEndpoint - discoveryDocument:nil]; -} - -- (instancetype)initWithAuthorizationEndpoint:(NSURL *)authorizationEndpoint - tokenEndpoint:(NSURL *)tokenEndpoint - issuer:(nullable NSURL *)issuer { - return [self initWithAuthorizationEndpoint:authorizationEndpoint - tokenEndpoint:tokenEndpoint - issuer:issuer - registrationEndpoint:nil - discoveryDocument:nil]; -} - -- (instancetype)initWithAuthorizationEndpoint:(NSURL *)authorizationEndpoint - tokenEndpoint:(NSURL *)tokenEndpoint - issuer:(nullable NSURL *)issuer - registrationEndpoint:(nullable NSURL *)registrationEndpoint { - return [self initWithAuthorizationEndpoint:authorizationEndpoint - tokenEndpoint:tokenEndpoint - issuer:issuer - registrationEndpoint:registrationEndpoint - discoveryDocument:nil]; -} - -- (instancetype)initWithDiscoveryDocument:(OIDServiceDiscovery *) discoveryDocument { - return [self initWithAuthorizationEndpoint:discoveryDocument.authorizationEndpoint - tokenEndpoint:discoveryDocument.tokenEndpoint - issuer:discoveryDocument.issuer - registrationEndpoint:discoveryDocument.registrationEndpoint - discoveryDocument:discoveryDocument]; -} - -#pragma mark - NSCopying - -- (instancetype)copyWithZone:(nullable NSZone *)zone { - // The documentation for NSCopying specifically advises us to return a reference to the original - // instance in the case where instances are immutable (as ours is): - // "Implement NSCopying by retaining the original instead of creating a new copy when the class - // and its contents are immutable." - return self; -} - -#pragma mark - NSSecureCoding - -+ (BOOL)supportsSecureCoding { - return YES; -} - -- (nullable instancetype)initWithCoder:(NSCoder *)aDecoder { - NSURL *authorizationEndpoint = [aDecoder decodeObjectOfClass:[NSURL class] - forKey:kAuthorizationEndpointKey]; - NSURL *tokenEndpoint = [aDecoder decodeObjectOfClass:[NSURL class] - forKey:kTokenEndpointKey]; - NSURL *issuer = [aDecoder decodeObjectOfClass:[NSURL class] - forKey:kIssuerKey]; - NSURL *registrationEndpoint = [aDecoder decodeObjectOfClass:[NSURL class] - forKey:kRegistrationEndpointKey]; - // We don't accept nil authorizationEndpoints or tokenEndpoints. - if (!authorizationEndpoint || !tokenEndpoint) { - return nil; - } - - OIDServiceDiscovery *discoveryDocument = [aDecoder decodeObjectOfClass:[OIDServiceDiscovery class] - forKey:kDiscoveryDocumentKey]; - - return [self initWithAuthorizationEndpoint:authorizationEndpoint - tokenEndpoint:tokenEndpoint - issuer:issuer - registrationEndpoint:registrationEndpoint - discoveryDocument:discoveryDocument]; -} - -- (void)encodeWithCoder:(NSCoder *)aCoder { - [aCoder encodeObject:_authorizationEndpoint forKey:kAuthorizationEndpointKey]; - [aCoder encodeObject:_tokenEndpoint forKey:kTokenEndpointKey]; - [aCoder encodeObject:_issuer forKey:kIssuerKey]; - [aCoder encodeObject:_registrationEndpoint forKey:kRegistrationEndpointKey]; - [aCoder encodeObject:_discoveryDocument forKey:kDiscoveryDocumentKey]; -} - -#pragma mark - description - -- (NSString *)description { - return [NSString stringWithFormat: - @"OIDServiceConfiguration authorizationEndpoint: %@, tokenEndpoint: %@, " - "registrationEndpoint: %@, discoveryDocument: [%@]", - _authorizationEndpoint, - _tokenEndpoint, - _registrationEndpoint, - _discoveryDocument]; -} - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDServiceDiscovery.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDServiceDiscovery.h deleted file mode 100644 index 982d7100..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDServiceDiscovery.h +++ /dev/null @@ -1,352 +0,0 @@ -/*! @file OIDServiceDiscovery.h - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -NS_ASSUME_NONNULL_BEGIN - -/*! @brief Represents an OpenID Connect 1.0 Discovery Document - @see https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata - */ -@interface OIDServiceDiscovery : NSObject - -/*! @brief The decoded OpenID Connect 1.0 Discovery Document as a dictionary. - */ -@property(nonatomic, readonly) NSDictionary *discoveryDictionary; - -/*! @brief REQUIRED. URL using the @c https scheme with no query or fragment component that the OP - asserts as its Issuer Identifier. If Issuer discovery is supported, this value MUST be - identical to the issuer value returned by WebFinger. This also MUST be identical to the - @c iss Claim value in ID Tokens issued from this Issuer. - @remarks issuer - @seealso https://openid.net/specs/openid-connect-discovery-1_0.html#IssuerDiscovery - */ -@property(nonatomic, readonly) NSURL *issuer; - -/*! @brief REQUIRED. URL of the OP's OAuth 2.0 Authorization Endpoint. - @remarks authorization_endpoint - @seealso http://openid.net/specs/openid-connect-core-1_0.html#AuthorizationEndpoint - */ -@property(nonatomic, readonly) NSURL *authorizationEndpoint; - -/*! @brief URL of the OP's OAuth 2.0 Token Endpoint. This is REQUIRED unless only the Implicit Flow - is used. - @remarks token_endpoint - @seealso http://openid.net/specs/openid-connect-core-1_0.html#TokenEndpoint - */ -@property(nonatomic, readonly) NSURL *tokenEndpoint; - -/*! @brief RECOMMENDED. URL of the OP's UserInfo Endpoint. This URL MUST use the https scheme and - MAY contain port, path, and query parameter components. - @remarks userinfo_endpoint - @seealso http://openid.net/specs/openid-connect-core-1_0.html#UserInfo - */ -@property(nonatomic, readonly, nullable) NSURL *userinfoEndpoint; - -/*! @brief REQUIRED. URL of the OP's JSON Web Key Set document. This contains the signing key(s) the - RP uses to validate signatures from the OP. The JWK Set MAY also contain the Server's - encryption key(s), which are used by RPs to encrypt requests to the Server. When both - signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED - for all keys in the referenced JWK Set to indicate each key's intended usage. Although some - algorithms allow the same key to be used for both signatures and encryption, doing so is NOT - RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 - representations of keys provided. When used, the bare key values MUST still be present and - MUST match those in the certificate. - @remarks jwks_uri - @seealso http://tools.ietf.org/html/rfc7517 - */ -@property(nonatomic, readonly) NSURL *jwksURL; - -/*! @brief RECOMMENDED. URL of the OP's Dynamic Client Registration Endpoint. - @remarks registration_endpoint - @seealso http://openid.net/specs/openid-connect-registration-1_0.html - */ -@property(nonatomic, readonly, nullable) NSURL *registrationEndpoint; - -/*! @brief RECOMMENDED. JSON array containing a list of the OAuth 2.0 [RFC6749] scope values that - this server supports. The server MUST support the openid scope value. Servers MAY choose not - to advertise some supported scope values even when this parameter is used, although those - defined in [OpenID.Core] SHOULD be listed, if supported. - @remarks scopes_supported - @seealso http://tools.ietf.org/html/rfc6749#section-3.3 - */ -@property(nonatomic, readonly, nullable) NSArray *scopesSupported; - -/*! @brief REQUIRED. JSON array containing a list of the OAuth 2.0 @c response_type values that this - OP supports. Dynamic OpenID Providers MUST support the @c code, @c id_token, and the token - @c id_token Response Type values. - @remarks response_types_supported - */ -@property(nonatomic, readonly) NSArray *responseTypesSupported; - -/*! @brief OPTIONAL. JSON array containing a list of the OAuth 2.0 @c response_mode values that this - OP supports, as specified in OAuth 2.0 Multiple Response Type Encoding Practices. If - omitted, the default for Dynamic OpenID Providers is @c ["query", "fragment"]. - @remarks response_modes_supported - @seealso http://openid.net/specs/oauth-v2-multiple-response-types-1_0.html - */ -@property(nonatomic, readonly, nullable) NSArray *responseModesSupported; - -/*! @brief OPTIONAL. JSON array containing a list of the OAuth 2.0 Grant Type values that this OP - supports. Dynamic OpenID Providers MUST support the @c authorization_code and @c implicit - Grant Type values and MAY support other Grant Types. If omitted, the default value is - @c ["authorization_code", "implicit"]. - @remarks grant_types_supported - */ -@property(nonatomic, readonly, nullable) NSArray *grantTypesSupported; - -/*! @brief OPTIONAL. JSON array containing a list of the Authentication Context Class References - that this OP supports. - @remarks acr_values_supported - */ -@property(nonatomic, readonly, nullable) NSArray *acrValuesSupported; - -/*! @brief REQUIRED. JSON array containing a list of the Subject Identifier types that this OP - supports. Valid types include @c pairwise and @c public. - @remarks subject_types_supported - */ -@property(nonatomic, readonly) NSArray *subjectTypesSupported; - -/*! @brief REQUIRED. JSON array containing a list of the JWS signing algorithms (@c alg values) - supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm @c RS256 - MUST be included. The value @c none MAY be supported, but MUST NOT be used unless the - Response Type used returns no ID Token from the Authorization Endpoint (such as when using - the Authorization Code Flow). - @remarks id_token_signing_alg_values_supported - @seealso https://tools.ietf.org/html/rfc7519 - */ -@property(nonatomic, readonly) NSArray *IDTokenSigningAlgorithmValuesSupported; - -/*! @brief OPTIONAL. JSON array containing a list of the JWE encryption algorithms (@c alg values) - supported by the OP for the ID Token to encode the Claims in a JWT. - @remarks id_token_encryption_alg_values_supported - @seealso https://tools.ietf.org/html/rfc7519 - */ -@property(nonatomic, readonly, nullable) - NSArray *IDTokenEncryptionAlgorithmValuesSupported; - -/*! @brief OPTIONAL. JSON array containing a list of the JWE encryption algorithms (@c enc values) - supported by the OP for the ID Token to encode the Claims in a JWT. - @remarks id_token_encryption_enc_values_supported - @seealso https://tools.ietf.org/html/rfc7519 - */ -@property(nonatomic, readonly, nullable) - NSArray *IDTokenEncryptionEncodingValuesSupported; - -/*! @brief OPTIONAL. JSON array containing a list of the JWS signing algorithms (@c alg values) - supported by the UserInfo Endpoint to encode the Claims in a JWT. The value none MAY be - included. - @remarks userinfo_signing_alg_values_supported - @seealso https://tools.ietf.org/html/rfc7515 - @seealso https://tools.ietf.org/html/rfc7518 - @seealso https://tools.ietf.org/html/rfc7519 - */ -@property(nonatomic, readonly, nullable) - NSArray *userinfoSigningAlgorithmValuesSupported; - -/*! @brief OPTIONAL. JSON array containing a list of the JWE encryption algorithms (alg values) - supported by the UserInfo Endpoint to encode the Claims in a JWT. - @remarks userinfo_encryption_alg_values_supported - @seealso https://tools.ietf.org/html/rfc7516 - @seealso https://tools.ietf.org/html/rfc7518 - @seealso https://tools.ietf.org/html/rfc7519 - */ -@property(nonatomic, readonly, nullable) - NSArray *userinfoEncryptionAlgorithmValuesSupported; - -/*! @brief OPTIONAL. JSON array containing a list of the JWE encryption algorithms (@c enc values) - supported by the UserInfo Endpoint to encode the Claims in a JWT. - @remarks userinfo_encryption_enc_values_supported - @seealso https://tools.ietf.org/html/rfc7519 - */ -@property(nonatomic, readonly, nullable) - NSArray *userinfoEncryptionEncodingValuesSupported; - -/*! @brief OPTIONAL. JSON array containing a list of the JWS signing algorithms (@c alg values) - supported by the OP for Request Objects, which are described in Section 6.1 of OpenID - Connect Core 1.0. These algorithms are used both when the Request Object is passed by value - (using the request parameter) and when it is passed by reference (using the @c request_uri - parameter). Servers SHOULD support @c none and @c RS256. - @remarks request_object_signing_alg_values_supported - @seealso http://openid.net/specs/openid-connect-core-1_0.html - */ -@property(nonatomic, readonly, nullable) - NSArray *requestObjectSigningAlgorithmValuesSupported; - -/*! @brief OPTIONAL. JSON array containing a list of the JWE encryption algorithms (@c alg values) - supported by the OP for Request Objects. These algorithms are used both when the Request - Object is passed by value and when it is passed by reference. - @remarks request_object_encryption_alg_values_supported - */ -@property(nonatomic, readonly, nullable) - NSArray *requestObjectEncryptionAlgorithmValuesSupported; - -/*! @brief OPTIONAL. JSON array containing a list of the JWE encryption algorithms (@c enc values) - supported by the OP for Request Objects. These algorithms are used both when the Request - Object is passed by value and when it is passed by reference. - @remarks request_object_encryption_enc_values_supported - */ -@property(nonatomic, readonly, nullable) - NSArray *requestObjectEncryptionEncodingValuesSupported; - -/*! @brief OPTIONAL. JSON array containing a list of Client Authentication methods supported by this - Token Endpoint. The options are @c client_secret_post, @c client_secret_basic, - @c client_secret_jwt, and @c private_key_jwt, as described in Section 9 of OpenID Connect - Core 1.0. Other authentication methods MAY be defined by extensions. If omitted, the default - is @c client_secret_basic -- the HTTP Basic Authentication Scheme specified in Section 2.3.1 - of OAuth 2.0. - @remarks token_endpoint_auth_methods_supported - @seealso http://openid.net/specs/openid-connect-core-1_0.html - @seealso http://tools.ietf.org/html/rfc6749#section-2.3.1 - */ -@property(nonatomic, readonly, nullable) NSArray *tokenEndpointAuthMethodsSupported; - -/*! @brief OPTIONAL. JSON array containing a list of the JWS signing algorithms (@c alg values) - supported by the Token Endpoint for the signature on the JWT used to authenticate the Client - at the Token Endpoint for the @c private_key_jwt and @c client_secret_jwt authentication - methods. Servers SHOULD support @c RS256. The value @c none MUST NOT be used. - @remarks token_endpoint_auth_signing_alg_values_supported - @seealso https://tools.ietf.org/html/rfc7519 - */ -@property(nonatomic, readonly, nullable) - NSArray *tokenEndpointAuthSigningAlgorithmValuesSupported; - -/*! @brief OPTIONAL. JSON array containing a list of the @c display parameter values that the OpenID - Provider supports. These values are described in Section 3.1.2.1 of OpenID Connect Core 1.0. - @remarks display_values_supported - @seealso http://openid.net/specs/openid-connect-core-1_0.html - */ -@property(nonatomic, readonly, nullable) NSArray *displayValuesSupported; - -/*! @brief OPTIONAL. JSON array containing a list of the Claim Types that the OpenID Provider - supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0. Values - defined by this specification are @c normal, @c aggregated, and @c distributed. If omitted, - the implementation supports only @c normal Claims. - @remarks claim_types_supported - @seealso http://openid.net/specs/openid-connect-core-1_0.html - */ -@property(nonatomic, readonly, nullable) NSArray *claimTypesSupported; - -/*! @brief RECOMMENDED. JSON array containing a list of the Claim Names of the Claims that the - OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, - this might not be an exhaustive list. - @remarks claims_supported - */ -@property(nonatomic, readonly, nullable) NSArray *claimsSupported; - -/*! @brief OPTIONAL. URL of a page containing human-readable information that developers might want - or need to know when using the OpenID Provider. In particular, if the OpenID Provider does - not support Dynamic Client Registration, then information on how to register Clients needs - to be provided in this documentation. - @remarks service_documentation - */ -@property(nonatomic, readonly, nullable) NSURL *serviceDocumentation; - -/*! @brief OPTIONAL. Languages and scripts supported for values in Claims being returned, - represented as a JSON array of BCP47 language tag values. Not all languages and scripts are - necessarily supported for all Claim values. - @remarks claims_locales_supported - @seealso http://tools.ietf.org/html/rfc5646 - */ -@property(nonatomic, readonly, nullable) NSArray *claimsLocalesSupported; - -/*! @brief OPTIONAL. Languages and scripts supported for the user interface, represented as a JSON - array of BCP47 language tag values. - @remarks ui_locales_supported - @seealso http://tools.ietf.org/html/rfc5646 - */ -@property(nonatomic, readonly, nullable) NSArray *UILocalesSupported; - -/*! @brief OPTIONAL. Boolean value specifying whether the OP supports use of the claims parameter, - with @c true indicating support. If omitted, the default value is @c false. - @remarks claims_parameter_supported - */ -@property(nonatomic, readonly) BOOL claimsParameterSupported; - -/*! @brief OPTIONAL. Boolean value specifying whether the OP supports use of the request parameter, - with @c true indicating support. If omitted, the default value is @c false. - @remarks request_parameter_supported - */ -@property(nonatomic, readonly) BOOL requestParameterSupported; - -/*! @brief OPTIONAL. Boolean value specifying whether the OP supports use of the @c request_uri - parameter, with true indicating support. If omitted, the default value is @c true. - @remarks request_uri_parameter_supported - */ -@property(nonatomic, readonly) BOOL requestURIParameterSupported; - -/*! @brief OPTIONAL. Boolean value specifying whether the OP requires any @c request_uri values used - to be pre-registered using the @c request_uris registration parameter. Pre-registration is - REQUIRED when the value is @c true. If omitted, the default value is @c false. - @remarks require_request_uri_registration - */ -@property(nonatomic, readonly) BOOL requireRequestURIRegistration; - -/*! @brief OPTIONAL. URL that the OpenID Provider provides to the person registering the Client to - read about the OP's requirements on how the Relying Party can use the data provided by the - OP. The registration process SHOULD display this URL to the person registering the Client if - it is given. - @remarks op_policy_uri - */ -@property(nonatomic, readonly, nullable) NSURL *OPPolicyURI; - -/*! @brief OPTIONAL. URL that the OpenID Provider provides to the person registering the Client to - read about OpenID Provider's terms of service. The registration process SHOULD display this - URL to the person registering the Client if it is given. - @remarks op_tos_uri - */ -@property(nonatomic, readonly, nullable) NSURL *OPTosURI; - -/*! @internal - @brief Unavailable. Please use @c initWithDictionary:error:, @c initWithJSON:error, or the - @c serviceDiscoveryWithURL:callback: factory method. - */ -- (nonnull instancetype)init NS_UNAVAILABLE; - -/*! @brief Decodes a OpenID Connect Discovery 1.0 JSON document. - @param serviceDiscoveryJSON An OpenID Connect Service Discovery document. - @param error If a required field is missing from the dictionary, an error with domain - @c ::OIDGeneralErrorDomain and code @c ::OIDErrorCodeInvalidDiscoveryDocument will be - returned. - */ -- (nullable instancetype)initWithJSON:(NSString *)serviceDiscoveryJSON - error:(NSError **_Nullable)error; - -/*! @brief Decodes a OpenID Connect Discovery 1.0 JSON document. - @param serviceDiscoveryJSONData An OpenID Connect Service Discovery document. - @param error If a required field is missing from the dictionary, an error with domain - @c ::OIDGeneralErrorDomain and code @c ::OIDErrorCodeInvalidDiscoveryDocument will be - returned. - */ -- (nullable instancetype)initWithJSONData:(NSData *)serviceDiscoveryJSONData - error:(NSError **_Nullable)error; - -/*! @brief Designated initializer. The dictionary keys should match the keys defined in the OpenID - Connect Discovery 1.0 standard for OpenID Provider Metadata. - @param serviceDiscoveryDictionary A dictionary representing an OpenID Connect Service Discovery - document. - @param error If a required field is missing from the dictionary, an error with domain - @c ::OIDGeneralErrorDomain and code @c ::OIDErrorCodeInvalidDiscoveryDocument will be - returned. - */ -- (nullable instancetype)initWithDictionary:(NSDictionary *)serviceDiscoveryDictionary - error:(NSError **_Nullable)error NS_DESIGNATED_INITIALIZER; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDServiceDiscovery.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDServiceDiscovery.m deleted file mode 100644 index ca9628ef..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDServiceDiscovery.m +++ /dev/null @@ -1,350 +0,0 @@ -/*! @file OIDServiceDiscovery.m - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDServiceDiscovery.h" - -#import "OIDDefines.h" -#import "OIDErrorUtilities.h" - -NS_ASSUME_NONNULL_BEGIN - -/*! Field keys associated with an OpenID Connect Discovery Document. */ -static NSString *const kIssuerKey = @"issuer"; -static NSString *const kAuthorizationEndpointKey = @"authorization_endpoint"; -static NSString *const kTokenEndpointKey = @"token_endpoint"; -static NSString *const kUserinfoEndpointKey = @"userinfo_endpoint"; -static NSString *const kJWKSURLKey = @"jwks_uri"; -static NSString *const kRegistrationEndpointKey = @"registration_endpoint"; -static NSString *const kScopesSupportedKey = @"scopes_supported"; -static NSString *const kResponseTypesSupportedKey = @"response_types_supported"; -static NSString *const kResponseModesSupportedKey = @"response_modes_supported"; -static NSString *const kGrantTypesSupportedKey = @"grant_types_supported"; -static NSString *const kACRValuesSupportedKey = @"acr_values_supported"; -static NSString *const kSubjectTypesSupportedKey = @"subject_types_supported"; -static NSString *const kIDTokenSigningAlgorithmValuesSupportedKey = - @"id_token_signing_alg_values_supported"; -static NSString *const kIDTokenEncryptionAlgorithmValuesSupportedKey = - @"id_token_encryption_alg_values_supported"; -static NSString *const kIDTokenEncryptionEncodingValuesSupportedKey = - @"id_token_encryption_enc_values_supported"; -static NSString *const kUserinfoSigningAlgorithmValuesSupportedKey = - @"userinfo_signing_alg_values_supported"; -static NSString *const kUserinfoEncryptionAlgorithmValuesSupportedKey = - @"userinfo_encryption_alg_values_supported"; -static NSString *const kUserinfoEncryptionEncodingValuesSupportedKey = - @"userinfo_encryption_enc_values_supported"; -static NSString *const kRequestObjectSigningAlgorithmValuesSupportedKey = - @"request_object_signing_alg_values_supported"; -static NSString *const kRequestObjectEncryptionAlgorithmValuesSupportedKey = - @"request_object_encryption_alg_values_supported"; -static NSString *const kRequestObjectEncryptionEncodingValuesSupported = - @"request_object_encryption_enc_values_supported"; -static NSString *const kTokenEndpointAuthMethodsSupportedKey = - @"token_endpoint_auth_methods_supported"; -static NSString *const kTokenEndpointAuthSigningAlgorithmValuesSupportedKey = - @"token_endpoint_auth_signing_alg_values_supported"; -static NSString *const kDisplayValuesSupportedKey = @"display_values_supported"; -static NSString *const kClaimTypesSupportedKey = @"claim_types_supported"; -static NSString *const kClaimsSupportedKey = @"claims_supported"; -static NSString *const kServiceDocumentationKey = @"service_documentation"; -static NSString *const kClaimsLocalesSupportedKey = @"claims_locales_supported"; -static NSString *const kUILocalesSupportedKey = @"ui_locales_supported"; -static NSString *const kClaimsParameterSupportedKey = @"claims_parameter_supported"; -static NSString *const kRequestParameterSupportedKey = @"request_parameter_supported"; -static NSString *const kRequestURIParameterSupportedKey = @"request_uri_parameter_supported"; -static NSString *const kRequireRequestURIRegistrationKey = @"require_request_uri_registration"; -static NSString *const kOPPolicyURIKey = @"op_policy_uri"; -static NSString *const kOPTosURIKey = @"op_tos_uri"; - -@implementation OIDServiceDiscovery { - NSDictionary *_discoveryDictionary; -} - -- (nonnull instancetype)init OID_UNAVAILABLE_USE_INITIALIZER(@selector(initWithDictionary:error:)) - -- (nullable instancetype)initWithJSON:(NSString *)serviceDiscoveryJSON error:(NSError **)error { - NSData *jsonData = [serviceDiscoveryJSON dataUsingEncoding:NSUTF8StringEncoding]; - return [self initWithJSONData:jsonData error:error]; -} - -- (nullable instancetype)initWithJSONData:(NSData *)serviceDiscoveryJSONData - error:(NSError **_Nullable)error { - NSError *jsonError; - NSDictionary *json = - [NSJSONSerialization JSONObjectWithData:serviceDiscoveryJSONData options:0 error:&jsonError]; - if (!json || jsonError) { - *error = [OIDErrorUtilities errorWithCode:OIDErrorCodeJSONDeserializationError - underlyingError:jsonError - description:jsonError.localizedDescription]; - return nil; - } - return [self initWithDictionary:json error:error]; -} - -- (nullable instancetype)initWithDictionary:(NSDictionary *)serviceDiscoveryDictionary - error:(NSError **_Nullable)error { - if (![[self class] dictionaryHasRequiredFields:serviceDiscoveryDictionary error:error]) { - return nil; - } - self = [super init]; - if (self) { - _discoveryDictionary = [serviceDiscoveryDictionary copy]; - } - return self; -} - -#pragma mark - - -/*! @brief Checks to see if the specified dictionary contains the required fields. - @discussion This test is not meant to provide semantic analysis of the document (eg. fields - where the value @c none is not an allowed option would not cause this method to fail if - their value was @c none.) We are just testing to make sure we can meet the nullability - contract we promised in the header. - */ -+ (BOOL)dictionaryHasRequiredFields:(NSDictionary *)dictionary - error:(NSError **_Nullable)error { - static NSString *const kMissingFieldErrorText = @"Missing field: %@"; - static NSString *const kInvalidURLFieldErrorText = @"Invalid URL: %@"; - - NSArray *requiredFields = @[ - kIssuerKey, - kAuthorizationEndpointKey, - kTokenEndpointKey, - kJWKSURLKey, - kResponseTypesSupportedKey, - kSubjectTypesSupportedKey, - kIDTokenSigningAlgorithmValuesSupportedKey - ]; - - for (NSString *field in requiredFields) { - if (!dictionary[field]) { - if (error) { - NSString *errorText = [NSString stringWithFormat:kMissingFieldErrorText, field]; - *error = [OIDErrorUtilities errorWithCode:OIDErrorCodeInvalidDiscoveryDocument - underlyingError:nil - description:errorText]; - } - return NO; - } - } - - // Check required URL fields are valid URLs. - NSArray *requiredURLFields = @[ - kIssuerKey, - kTokenEndpointKey, - kJWKSURLKey - ]; - - for (NSString *field in requiredURLFields) { - if (![NSURL URLWithString:dictionary[field]]) { - if (error) { - NSString *errorText = [NSString stringWithFormat:kInvalidURLFieldErrorText, field]; - *error = [OIDErrorUtilities errorWithCode:OIDErrorCodeInvalidDiscoveryDocument - underlyingError:nil - description:errorText]; - } - return NO; - } - } - - return YES; -} - -#pragma mark - NSCopying - -- (instancetype)copyWithZone:(nullable NSZone *)zone { - // The documentation for NSCopying specifically advises us to return a reference to the original - // instance in the case where instances are immutable (as ours is): - // "Implement NSCopying by retaining the original instead of creating a new copy when the class - // and its contents are immutable." - return self; -} - -#pragma mark - NSSecureCoding - -+ (BOOL)supportsSecureCoding { - return YES; -} - -- (nullable instancetype)initWithCoder:(NSCoder *)aDecoder { - NSError *error; - NSDictionary *dictionary = [[NSDictionary alloc] initWithCoder:aDecoder]; - self = [self initWithDictionary:dictionary error:&error]; - if (error) { - return nil; - } - return self; -} - -- (void)encodeWithCoder:(NSCoder *)aCoder { - [_discoveryDictionary encodeWithCoder:aCoder]; -} - -#pragma mark - Properties - -- (NSDictionary *)discoveryDictionary { - return _discoveryDictionary; -} - -- (NSURL *)issuer { - return [NSURL URLWithString:_discoveryDictionary[kIssuerKey]]; -} - -- (NSURL *)authorizationEndpoint { - return [NSURL URLWithString:_discoveryDictionary[kAuthorizationEndpointKey]]; -} - -- (NSURL *)tokenEndpoint { - return [NSURL URLWithString:_discoveryDictionary[kTokenEndpointKey]]; -} - -- (nullable NSURL *)userinfoEndpoint { - return [NSURL URLWithString:_discoveryDictionary[kUserinfoEndpointKey]]; -} - -- (NSURL *)jwksURL { - return [NSURL URLWithString:_discoveryDictionary[kJWKSURLKey]]; -} - -- (nullable NSURL *)registrationEndpoint { - return [NSURL URLWithString:_discoveryDictionary[kRegistrationEndpointKey]]; -} - -- (nullable NSArray *)scopesSupported { - return _discoveryDictionary[kScopesSupportedKey]; -} - -- (NSArray *)responseTypesSupported { - return _discoveryDictionary[kResponseTypesSupportedKey]; -} - -- (nullable NSArray *)responseModesSupported { - return _discoveryDictionary[kResponseModesSupportedKey]; -} - -- (nullable NSArray *)grantTypesSupported { - return _discoveryDictionary[kGrantTypesSupportedKey]; -} - -- (nullable NSArray *)acrValuesSupported { - return _discoveryDictionary[kACRValuesSupportedKey]; -} - -- (NSArray *)subjectTypesSupported { - return _discoveryDictionary[kSubjectTypesSupportedKey]; -} - -- (NSArray *) IDTokenSigningAlgorithmValuesSupported { - return _discoveryDictionary[kIDTokenSigningAlgorithmValuesSupportedKey]; -} - -- (nullable NSArray *)IDTokenEncryptionAlgorithmValuesSupported { - return _discoveryDictionary[kIDTokenEncryptionAlgorithmValuesSupportedKey]; -} - -- (nullable NSArray *)IDTokenEncryptionEncodingValuesSupported { - return _discoveryDictionary[kIDTokenEncryptionEncodingValuesSupportedKey]; -} - -- (nullable NSArray *)userinfoSigningAlgorithmValuesSupported { - return _discoveryDictionary[kUserinfoSigningAlgorithmValuesSupportedKey]; -} - -- (nullable NSArray *)userinfoEncryptionAlgorithmValuesSupported { - return _discoveryDictionary[kUserinfoEncryptionAlgorithmValuesSupportedKey]; -} - -- (nullable NSArray *)userinfoEncryptionEncodingValuesSupported { - return _discoveryDictionary[kUserinfoEncryptionEncodingValuesSupportedKey]; -} - -- (nullable NSArray *)requestObjectSigningAlgorithmValuesSupported { - return _discoveryDictionary[kRequestObjectSigningAlgorithmValuesSupportedKey]; -} - -- (nullable NSArray *) requestObjectEncryptionAlgorithmValuesSupported { - return _discoveryDictionary[kRequestObjectEncryptionAlgorithmValuesSupportedKey]; -} - -- (nullable NSArray *) requestObjectEncryptionEncodingValuesSupported { - return _discoveryDictionary[kRequestObjectEncryptionEncodingValuesSupported]; -} - -- (nullable NSArray *)tokenEndpointAuthMethodsSupported { - return _discoveryDictionary[kTokenEndpointAuthMethodsSupportedKey]; -} - -- (nullable NSArray *)tokenEndpointAuthSigningAlgorithmValuesSupported { - return _discoveryDictionary[kTokenEndpointAuthSigningAlgorithmValuesSupportedKey]; -} - -- (nullable NSArray *)displayValuesSupported { - return _discoveryDictionary[kDisplayValuesSupportedKey]; -} - -- (nullable NSArray *)claimTypesSupported { - return _discoveryDictionary[kClaimTypesSupportedKey]; -} - -- (nullable NSArray *)claimsSupported { - return _discoveryDictionary[kClaimsSupportedKey]; -} - -- (nullable NSURL *)serviceDocumentation { - return [NSURL URLWithString:_discoveryDictionary[kServiceDocumentationKey]]; -} - -- (nullable NSArray *)claimsLocalesSupported { - return _discoveryDictionary[kClaimsLocalesSupportedKey]; -} - -- (nullable NSArray *)UILocalesSupported { - return _discoveryDictionary[kUILocalesSupportedKey]; -} - -- (BOOL)claimsParameterSupported { - return [_discoveryDictionary[kClaimsParameterSupportedKey] boolValue]; -} - -- (BOOL)requestParameterSupported { - return [_discoveryDictionary[kRequestParameterSupportedKey] boolValue]; -} - -- (BOOL)requestURIParameterSupported { - // Default is true/YES. - if (!_discoveryDictionary[kRequestURIParameterSupportedKey]) { - return YES; - } - return [_discoveryDictionary[kRequestURIParameterSupportedKey] boolValue]; -} - -- (BOOL)requireRequestURIRegistration { - return [_discoveryDictionary[kRequireRequestURIRegistrationKey] boolValue]; -} - -- (nullable NSURL *)OPPolicyURI { - return [NSURL URLWithString:_discoveryDictionary[kOPPolicyURIKey]]; -} - -- (nullable NSURL *)OPTosURI { - return [NSURL URLWithString:_discoveryDictionary[kOPTosURIKey]]; -} - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDTokenRequest.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDTokenRequest.h deleted file mode 100644 index 5cf9835c..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDTokenRequest.h +++ /dev/null @@ -1,158 +0,0 @@ -/*! @file OIDTokenRequest.h - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -// This file only declares string constants useful for constructing a @c OIDTokenRequest, so it is -// imported here for convenience. -#import "OIDGrantTypes.h" - -@class OIDAuthorizationResponse; -@class OIDServiceConfiguration; - -NS_ASSUME_NONNULL_BEGIN - -/*! @brief Represents a token request. - @see https://tools.ietf.org/html/rfc6749#section-3.2 - @see https://tools.ietf.org/html/rfc6749#section-4.1.3 - */ -@interface OIDTokenRequest : NSObject - -/*! @brief The service's configuration. - @remarks This configuration specifies how to connect to a particular OAuth provider. - Configurations may be created manually, or via an OpenID Connect Discovery Document. - */ -@property(nonatomic, readonly) OIDServiceConfiguration *configuration; - -/*! @brief The type of token being sent to the token endpoint, i.e. "authorization_code" for the - authorization code exchange, or "refresh_token" for an access token refresh request. - @remarks grant_type - @see https://tools.ietf.org/html/rfc6749#section-4.1.3 - @see https://www.google.com/url?sa=D&q=https%3A%2F%2Ftools.ietf.org%2Fhtml%2Frfc6749%23section-6 - */ -@property(nonatomic, readonly) NSString *grantType; - -/*! @brief The authorization code received from the authorization server. - @remarks code - @see https://tools.ietf.org/html/rfc6749#section-4.1.3 - */ -@property(nonatomic, readonly, nullable) NSString *authorizationCode; - -/*! @brief The client's redirect URI. - @remarks redirect_uri - @see https://tools.ietf.org/html/rfc6749#section-4.1.3 - */ -@property(nonatomic, readonly, nullable) NSURL *redirectURL; - -/*! @brief The client identifier. - @remarks client_id - @see https://tools.ietf.org/html/rfc6749#section-4.1.3 - */ -@property(nonatomic, readonly) NSString *clientID; - -/*! @brief The client secret. - @remarks client_secret - @see https://tools.ietf.org/html/rfc6749#section-2.3.1 - */ -@property(nonatomic, readonly, nullable) NSString *clientSecret; - -/*! @brief The value of the scope parameter is expressed as a list of space-delimited, - case-sensitive strings. - @remarks scope - @see https://tools.ietf.org/html/rfc6749#section-3.3 - */ -@property(nonatomic, readonly, nullable) NSString *scope; - -/*! @brief The refresh token, which can be used to obtain new access tokens using the same - authorization grant. - @remarks refresh_token - @see https://tools.ietf.org/html/rfc6749#section-5.1 - */ -@property(nonatomic, readonly, nullable) NSString *refreshToken; - -/*! @brief The PKCE code verifier used to redeem the authorization code. - @remarks code_verifier - @see https://tools.ietf.org/html/rfc7636#section-4.3 - */ -@property(nonatomic, readonly, nullable) NSString *codeVerifier; - -/*! @brief The client's additional token request parameters. - */ -@property(nonatomic, readonly, nullable) NSDictionary *additionalParameters; - -/*! @internal - @brief Unavailable. Please use - initWithConfiguration:grantType:code:redirectURL:clientID:additionalParameters:. - */ -- (instancetype)init NS_UNAVAILABLE; - -/*! @param configuration The service's configuration. - @param grantType the type of token being sent to the token endpoint, i.e. "authorization_code" - for the authorization code exchange, or "refresh_token" for an access token refresh request. - @see OIDGrantTypes.h - @param code The authorization code received from the authorization server. - @param redirectURL The client's redirect URI. - @param clientID The client identifier. - @param scopes An array of scopes to combine into a single scope string per the OAuth2 spec. - @param refreshToken The refresh token. - @param additionalParameters The client's additional token request parameters. - */ -- (instancetype)initWithConfiguration:(OIDServiceConfiguration *)configuration - grantType:(NSString *)grantType - authorizationCode:(nullable NSString *)code - redirectURL:(nullable NSURL *)redirectURL - clientID:(NSString *)clientID - clientSecret:(nullable NSString *)clientSecret - scopes:(nullable NSArray *)scopes - refreshToken:(nullable NSString *)refreshToken - codeVerifier:(nullable NSString *)codeVerifier - additionalParameters:(nullable NSDictionary *)additionalParameters; - -/*! @brief Designated initializer. - @param configuration The service's configuration. - @param grantType the type of token being sent to the token endpoint, i.e. "authorization_code" - for the authorization code exchange, or "refresh_token" for an access token refresh request. - @see OIDGrantTypes.h - @param code The authorization code received from the authorization server. - @param redirectURL The client's redirect URI. - @param clientID The client identifier. - @param scope The value of the scope parameter is expressed as a list of space-delimited, - case-sensitive strings. - @param refreshToken The refresh token. - @param additionalParameters The client's additional token request parameters. - */ -- (instancetype)initWithConfiguration:(OIDServiceConfiguration *)configuration - grantType:(NSString *)grantType - authorizationCode:(nullable NSString *)code - redirectURL:(nullable NSURL *)redirectURL - clientID:(NSString *)clientID - clientSecret:(nullable NSString *)clientSecret - scope:(nullable NSString *)scope - refreshToken:(nullable NSString *)refreshToken - codeVerifier:(nullable NSString *)codeVerifier - additionalParameters:(nullable NSDictionary *)additionalParameters - NS_DESIGNATED_INITIALIZER; - -/*! @brief Constructs an @c NSURLRequest representing the token request. - @return An @c NSURLRequest representing the token request. - */ -- (NSURLRequest *)URLRequest; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDTokenRequest.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDTokenRequest.m deleted file mode 100644 index bd27dd48..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDTokenRequest.m +++ /dev/null @@ -1,307 +0,0 @@ -/*! @file OIDTokenRequest.m - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDTokenRequest.h" - -#import "OIDDefines.h" -#import "OIDError.h" -#import "OIDScopeUtilities.h" -#import "OIDServiceConfiguration.h" -#import "OIDURLQueryComponent.h" -#import "OIDTokenUtilities.h" - -/*! @brief The key for the @c configuration property for @c NSSecureCoding - */ -static NSString *const kConfigurationKey = @"configuration"; - -/*! @brief Key used to encode the @c grantType property for @c NSSecureCoding - */ -static NSString *const kGrantTypeKey = @"grant_type"; - -/*! @brief The key for the @c authorizationCode property for @c NSSecureCoding. - */ -static NSString *const kAuthorizationCodeKey = @"code"; - -/*! @brief Key used to encode the @c clientID property for @c NSSecureCoding - */ -static NSString *const kClientIDKey = @"client_id"; - -/*! @brief Key used to encode the @c clientSecret property for @c NSSecureCoding - */ -static NSString *const kClientSecretKey = @"client_secret"; - -/*! @brief Key used to encode the @c redirectURL property for @c NSSecureCoding - */ -static NSString *const kRedirectURLKey = @"redirect_uri"; - -/*! @brief Key used to encode the @c scopes property for @c NSSecureCoding - */ -static NSString *const kScopeKey = @"scope"; - -/*! @brief Key used to encode the @c refreshToken property for @c NSSecureCoding - */ -static NSString *const kRefreshTokenKey = @"refresh_token"; - -/*! @brief Key used to encode the @c codeVerifier property for @c NSSecureCoding and to build the - request URL. - */ -static NSString *const kCodeVerifierKey = @"code_verifier"; - -/*! @brief Key used to encode the @c additionalParameters property for - @c NSSecureCoding - */ -static NSString *const kAdditionalParametersKey = @"additionalParameters"; - -@implementation OIDTokenRequest - -- (instancetype)init - OID_UNAVAILABLE_USE_INITIALIZER( - @selector(initWithConfiguration: - grantType: - authorizationCode: - redirectURL: - clientID: - clientSecret: - scope: - refreshToken: - codeVerifier: - additionalParameters:) - ) - -- (instancetype)initWithConfiguration:(OIDServiceConfiguration *)configuration - grantType:(NSString *)grantType - authorizationCode:(nullable NSString *)code - redirectURL:(nullable NSURL *)redirectURL - clientID:(NSString *)clientID - clientSecret:(nullable NSString *)clientSecret - scopes:(nullable NSArray *)scopes - refreshToken:(nullable NSString *)refreshToken - codeVerifier:(nullable NSString *)codeVerifier - additionalParameters:(nullable NSDictionary *)additionalParameters { - return [self initWithConfiguration:configuration - grantType:grantType - authorizationCode:code - redirectURL:redirectURL - clientID:clientID - clientSecret:clientSecret - scope:[OIDScopeUtilities scopesWithArray:scopes] - refreshToken:refreshToken - codeVerifier:(NSString *)codeVerifier - additionalParameters:additionalParameters]; -} - -- (instancetype)initWithConfiguration:(OIDServiceConfiguration *)configuration - grantType:(NSString *)grantType - authorizationCode:(nullable NSString *)code - redirectURL:(nullable NSURL *)redirectURL - clientID:(NSString *)clientID - clientSecret:(nullable NSString *)clientSecret - scope:(nullable NSString *)scope - refreshToken:(nullable NSString *)refreshToken - codeVerifier:(nullable NSString *)codeVerifier - additionalParameters:(nullable NSDictionary *)additionalParameters { - self = [super init]; - if (self) { - _configuration = [configuration copy]; - _grantType = [grantType copy]; - _authorizationCode = [code copy]; - _redirectURL = [redirectURL copy]; - _clientID = [clientID copy]; - _clientSecret = [clientSecret copy]; - _scope = [scope copy]; - _refreshToken = [refreshToken copy]; - _codeVerifier = [codeVerifier copy]; - _additionalParameters = - [[NSDictionary alloc] initWithDictionary:additionalParameters copyItems:YES]; - - // Additional validation for the authorization_code grant type - if ([_grantType isEqual:OIDGrantTypeAuthorizationCode]) { - // redirect URI must not be nil - if (!_redirectURL) { - [NSException raise:OIDOAuthExceptionInvalidTokenRequestNullRedirectURL - format:@"%@", OIDOAuthExceptionInvalidTokenRequestNullRedirectURL, nil]; - - } - } - } - return self; -} - -#pragma mark - NSCopying - -- (instancetype)copyWithZone:(nullable NSZone *)zone { - // The documentation for NSCopying specifically advises us to return a reference to the original - // instance in the case where instances are immutable (as ours is): - // "Implement NSCopying by retaining the original instead of creating a new copy when the class - // and its contents are immutable." - return self; -} - -#pragma mark - NSSecureCoding - -+ (BOOL)supportsSecureCoding { - return YES; -} - -- (instancetype)initWithCoder:(NSCoder *)aDecoder { - OIDServiceConfiguration *configuration = - [aDecoder decodeObjectOfClass:[OIDServiceConfiguration class] - forKey:kConfigurationKey]; - NSString *grantType = [aDecoder decodeObjectOfClass:[NSString class] forKey:kGrantTypeKey]; - NSString *code = [aDecoder decodeObjectOfClass:[NSString class] forKey:kAuthorizationCodeKey]; - NSString *clientID = [aDecoder decodeObjectOfClass:[NSString class] forKey:kClientIDKey]; - NSString *clientSecret = [aDecoder decodeObjectOfClass:[NSString class] forKey:kClientSecretKey]; - NSString *scope = [aDecoder decodeObjectOfClass:[NSString class] forKey:kScopeKey]; - NSString *refreshToken = [aDecoder decodeObjectOfClass:[NSString class] forKey:kRefreshTokenKey]; - NSString *codeVerifier = [aDecoder decodeObjectOfClass:[NSString class] forKey:kCodeVerifierKey]; - NSURL *redirectURL = [aDecoder decodeObjectOfClass:[NSURL class] forKey:kRedirectURLKey]; - NSSet *additionalParameterCodingClasses = [NSSet setWithArray:@[ - [NSDictionary class], - [NSString class] - ]]; - NSDictionary *additionalParameters = - [aDecoder decodeObjectOfClasses:additionalParameterCodingClasses - forKey:kAdditionalParametersKey]; - self = [self initWithConfiguration:configuration - grantType:grantType - authorizationCode:code - redirectURL:redirectURL - clientID:clientID - clientSecret:clientSecret - scope:scope - refreshToken:refreshToken - codeVerifier:codeVerifier - additionalParameters:additionalParameters]; - return self; -} - -- (void)encodeWithCoder:(NSCoder *)aCoder { - [aCoder encodeObject:_configuration forKey:kConfigurationKey]; - [aCoder encodeObject:_grantType forKey:kGrantTypeKey]; - [aCoder encodeObject:_authorizationCode forKey:kAuthorizationCodeKey]; - [aCoder encodeObject:_clientID forKey:kClientIDKey]; - [aCoder encodeObject:_clientSecret forKey:kClientSecretKey]; - [aCoder encodeObject:_redirectURL forKey:kRedirectURLKey]; - [aCoder encodeObject:_scope forKey:kScopeKey]; - [aCoder encodeObject:_refreshToken forKey:kRefreshTokenKey]; - [aCoder encodeObject:_codeVerifier forKey:kCodeVerifierKey]; - [aCoder encodeObject:_additionalParameters forKey:kAdditionalParametersKey]; -} - -#pragma mark - NSObject overrides - -- (NSString *)description { - NSURLRequest *request = self.URLRequest; - NSString *requestBody = - [[NSString alloc] initWithData:request.HTTPBody encoding:NSUTF8StringEncoding]; - return [NSString stringWithFormat:@"<%@: %p, request: >", - NSStringFromClass([self class]), - (void *)self, - request.URL, - requestBody]; -} - -#pragma mark - - -/*! @brief Constructs the request URI. - @return A URL representing the token request. - @see https://tools.ietf.org/html/rfc6749#section-4.1.3 - */ -- (NSURL *)tokenRequestURL { - return _configuration.tokenEndpoint; -} - -/*! @brief Constructs the request body data by combining the request parameters using the - "application/x-www-form-urlencoded" format. - @return The data to pass to the token request URL. - @see https://tools.ietf.org/html/rfc6749#section-4.1.3 - */ -- (OIDURLQueryComponent *)tokenRequestBody { - OIDURLQueryComponent *query = [[OIDURLQueryComponent alloc] init]; - - // Add parameters, as applicable. - if (_grantType) { - [query addParameter:kGrantTypeKey value:_grantType]; - } - if (_scope) { - [query addParameter:kScopeKey value:_scope]; - } - if (_redirectURL) { - [query addParameter:kRedirectURLKey value:_redirectURL.absoluteString]; - } - if (_refreshToken) { - [query addParameter:kRefreshTokenKey value:_refreshToken]; - } - if (_authorizationCode) { - [query addParameter:kAuthorizationCodeKey value:_authorizationCode]; - } - if (_codeVerifier) { - [query addParameter:kCodeVerifierKey value:_codeVerifier]; - } - - // Add any additional parameters the client has specified. - [query addParameters:_additionalParameters]; - - return query; -} - -- (NSURLRequest *)URLRequest { - static NSString *const kHTTPPost = @"POST"; - static NSString *const kHTTPContentTypeHeaderKey = @"Content-Type"; - static NSString *const kHTTPContentTypeHeaderValue = - @"application/x-www-form-urlencoded; charset=UTF-8"; - - NSURL *tokenRequestURL = [self tokenRequestURL]; - NSMutableURLRequest *URLRequest = [[NSURLRequest requestWithURL:tokenRequestURL] mutableCopy]; - URLRequest.HTTPMethod = kHTTPPost; - [URLRequest setValue:kHTTPContentTypeHeaderValue forHTTPHeaderField:kHTTPContentTypeHeaderKey]; - - OIDURLQueryComponent *bodyParameters = [self tokenRequestBody]; - NSMutableDictionary *httpHeaders = [[NSMutableDictionary alloc] init]; - - if (_clientSecret) { - // The client id and secret are encoded using the "application/x-www-form-urlencoded" - // encoding algorithm per RFC 6749 Section 2.3.1. - // https://tools.ietf.org/html/rfc6749#section-2.3.1 - NSString *encodedClientID = [OIDTokenUtilities formUrlEncode:_clientID]; - NSString *encodedClientSecret = [OIDTokenUtilities formUrlEncode:_clientSecret]; - - NSString *credentials = - [NSString stringWithFormat:@"%@:%@", encodedClientID, encodedClientSecret]; - NSData *plainData = [credentials dataUsingEncoding:NSUTF8StringEncoding]; - NSString *basicAuth = [plainData base64EncodedStringWithOptions:kNilOptions]; - - NSString *authValue = [NSString stringWithFormat:@"Basic %@", basicAuth]; - [httpHeaders setObject:authValue forKey:@"Authorization"]; - } else { - [bodyParameters addParameter:kClientIDKey value:_clientID]; - } - - // Constructs request with the body string and headers. - NSString *bodyString = [bodyParameters URLEncodedParameters]; - NSData *body = [bodyString dataUsingEncoding:NSUTF8StringEncoding]; - URLRequest.HTTPBody = body; - - for (id header in httpHeaders) { - [URLRequest setValue:httpHeaders[header] forHTTPHeaderField:header]; - } - - return URLRequest; -} - -@end diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDTokenResponse.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDTokenResponse.h deleted file mode 100644 index b446e944..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDTokenResponse.h +++ /dev/null @@ -1,110 +0,0 @@ -/*! @file OIDTokenResponse.h - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -@class OIDTokenRequest; - -NS_ASSUME_NONNULL_BEGIN - -/*! @brief Represents the response to an token request. - @see https://tools.ietf.org/html/rfc6749#section-3.2 - @see https://tools.ietf.org/html/rfc6749#section-4.1.3 - */ -@interface OIDTokenResponse : NSObject - -/*! @brief The request which was serviced. - */ -@property(nonatomic, readonly) OIDTokenRequest *request; - -/*! @brief The access token generated by the authorization server. - @remarks access_token - @see https://tools.ietf.org/html/rfc6749#section-4.1.4 - @see https://tools.ietf.org/html/rfc6749#section-5.1 - */ -@property(nonatomic, readonly, nullable) NSString *accessToken; - -/*! @brief The approximate expiration date & time of the access token. - @remarks expires_in - @seealso OIDTokenResponse.accessToken - @see https://tools.ietf.org/html/rfc6749#section-4.1.4 - @see https://tools.ietf.org/html/rfc6749#section-5.1 - */ -@property(nonatomic, readonly, nullable) NSDate *accessTokenExpirationDate; - -/*! @brief Typically "Bearer" when present. Otherwise, another token_type value that the Client has - negotiated with the Authorization Server. - @remarks token_type - @see https://tools.ietf.org/html/rfc6749#section-4.1.4 - @see https://tools.ietf.org/html/rfc6749#section-5.1 - */ -@property(nonatomic, readonly, nullable) NSString *tokenType; - -/*! @brief ID Token value associated with the authenticated session. Always present for the - authorization code grant exchange when OpenID Connect is used, optional for responses to - access token refresh requests. Note that AppAuth does NOT verify the JWT signature. Users - of AppAuth are encouraged to verifying the JWT signature using the validation library of - their choosing. - @remarks id_token - @see http://openid.net/specs/openid-connect-core-1_0.html#TokenResponse - @see http://openid.net/specs/openid-connect-core-1_0.html#RefreshTokenResponse - @see http://openid.net/specs/openid-connect-core-1_0.html#IDToken - @see https://jwt.io - @discussion @c OIDIDToken can be used to parse the ID Token and extract the claims. As noted, - this class does not verify the JWT signature. -*/ -@property(nonatomic, readonly, nullable) NSString *idToken; - -/*! @brief The refresh token, which can be used to obtain new access tokens using the same - authorization grant - @remarks refresh_token - @see https://tools.ietf.org/html/rfc6749#section-5.1 - */ -@property(nonatomic, readonly, nullable) NSString *refreshToken; - -/*! @brief The scope of the access token. OPTIONAL, if identical to the scopes requested, otherwise, - REQUIRED. - @remarks scope - @see https://tools.ietf.org/html/rfc6749#section-5.1 - */ -@property(nonatomic, readonly, nullable) NSString *scope; - -/*! @brief Additional parameters returned from the token server. - */ -@property(nonatomic, readonly, nullable) - NSDictionary *> *additionalParameters; - -/*! @internal - @brief Unavailable. Please use initWithParameters:. - */ -- (instancetype)init NS_UNAVAILABLE; - -/*! @brief Designated initializer. - @param request The serviced request. - @param parameters The decoded parameters returned from the Authorization Server. - @remarks Known parameters are extracted from the @c parameters parameter and the normative - properties are populated. Non-normative parameters are placed in the - @c #additionalParameters dictionary. - */ -- (instancetype)initWithRequest:(OIDTokenRequest *)request - parameters:(NSDictionary *> *)parameters - NS_DESIGNATED_INITIALIZER; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDTokenResponse.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDTokenResponse.m deleted file mode 100644 index 6995fb91..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDTokenResponse.m +++ /dev/null @@ -1,163 +0,0 @@ -/*! @file OIDTokenResponse.m - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDTokenResponse.h" - -#import "OIDDefines.h" -#import "OIDFieldMapping.h" -#import "OIDTokenRequest.h" -#import "OIDTokenUtilities.h" - -/*! @brief Key used to encode the @c request property for @c NSSecureCoding - */ -static NSString *const kRequestKey = @"request"; - -/*! @brief The key for the @c accessToken property in the incoming parameters and for - @c NSSecureCoding. - */ -static NSString *const kAccessTokenKey = @"access_token"; - -/*! @brief The key for the @c accessTokenExpirationDate property in the incoming parameters and for - @c NSSecureCoding. - */ -static NSString *const kExpiresInKey = @"expires_in"; - -/*! @brief The key for the @c tokenType property in the incoming parameters and for - @c NSSecureCoding. - */ -static NSString *const kTokenTypeKey = @"token_type"; - -/*! @brief The key for the @c idToken property in the incoming parameters and for @c NSSecureCoding. - */ -static NSString *const kIDTokenKey = @"id_token"; - -/*! @brief The key for the @c refreshToken property in the incoming parameters and for - @c NSSecureCoding. - */ -static NSString *const kRefreshTokenKey = @"refresh_token"; - -/*! @brief The key for the @c scope property in the incoming parameters and for @c NSSecureCoding. - */ -static NSString *const kScopeKey = @"scope"; - -/*! @brief Key used to encode the @c additionalParameters property for @c NSSecureCoding - */ -static NSString *const kAdditionalParametersKey = @"additionalParameters"; - -@implementation OIDTokenResponse - -/*! @brief Returns a mapping of incoming parameters to instance variables. - @return A mapping of incoming parameters to instance variables. - */ -+ (NSDictionary *)fieldMap { - static NSMutableDictionary *fieldMap; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - fieldMap = [NSMutableDictionary dictionary]; - fieldMap[kAccessTokenKey] = - [[OIDFieldMapping alloc] initWithName:@"_accessToken" type:[NSString class]]; - fieldMap[kExpiresInKey] = - [[OIDFieldMapping alloc] initWithName:@"_accessTokenExpirationDate" - type:[NSDate class] - conversion:[OIDFieldMapping dateSinceNowConversion]]; - fieldMap[kTokenTypeKey] = - [[OIDFieldMapping alloc] initWithName:@"_tokenType" type:[NSString class]]; - fieldMap[kIDTokenKey] = - [[OIDFieldMapping alloc] initWithName:@"_idToken" type:[NSString class]]; - fieldMap[kRefreshTokenKey] = - [[OIDFieldMapping alloc] initWithName:@"_refreshToken" type:[NSString class]]; - fieldMap[kScopeKey] = - [[OIDFieldMapping alloc] initWithName:@"_scope" type:[NSString class]]; - }); - return fieldMap; -} - -#pragma mark - Initializers - -- (instancetype)init - OID_UNAVAILABLE_USE_INITIALIZER(@selector(initWithRequest:parameters:)) - -- (instancetype)initWithRequest:(OIDTokenRequest *)request - parameters:(NSDictionary *> *)parameters { - self = [super init]; - if (self) { - _request = [request copy]; - NSDictionary *> *additionalParameters = - [OIDFieldMapping remainingParametersWithMap:[[self class] fieldMap] - parameters:parameters - instance:self]; - _additionalParameters = additionalParameters; - } - return self; -} - -#pragma mark - NSCopying - -- (instancetype)copyWithZone:(nullable NSZone *)zone { - // The documentation for NSCopying specifically advises us to return a reference to the original - // instance in the case where instances are immutable (as ours is): - // "Implement NSCopying by retaining the original instead of creating a new copy when the class - // and its contents are immutable." - return self; -} - -#pragma mark - NSSecureCoding - -+ (BOOL)supportsSecureCoding { - return YES; -} - -- (nullable instancetype)initWithCoder:(NSCoder *)aDecoder { - OIDTokenRequest *request = - [aDecoder decodeObjectOfClass:[OIDTokenRequest class] forKey:kRequestKey]; - self = [self initWithRequest:request parameters:@{ }]; - if (self) { - [OIDFieldMapping decodeWithCoder:aDecoder map:[[self class] fieldMap] instance:self]; - _additionalParameters = [aDecoder decodeObjectOfClasses:[OIDFieldMapping JSONTypes] - forKey:kAdditionalParametersKey]; - } - return self; -} - -- (void)encodeWithCoder:(NSCoder *)aCoder { - [OIDFieldMapping encodeWithCoder:aCoder map:[[self class] fieldMap] instance:self]; - [aCoder encodeObject:_request forKey:kRequestKey]; - [aCoder encodeObject:_additionalParameters forKey:kAdditionalParametersKey]; -} - -#pragma mark - NSObject overrides - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@: %p, accessToken: \"%@\", accessTokenExpirationDate: %@, " - "tokenType: %@, idToken: \"%@\", refreshToken: \"%@\", " - "scope: \"%@\", additionalParameters: %@, request: %@>", - NSStringFromClass([self class]), - (void *)self, - [OIDTokenUtilities redact:_accessToken], - _accessTokenExpirationDate, - _tokenType, - [OIDTokenUtilities redact:_idToken], - [OIDTokenUtilities redact:_refreshToken], - _scope, - _additionalParameters, - _request]; -} - -#pragma mark - - -@end diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDTokenUtilities.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDTokenUtilities.h deleted file mode 100644 index fda89854..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDTokenUtilities.h +++ /dev/null @@ -1,67 +0,0 @@ -/*! @file OIDTokenUtilities.h - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -NS_ASSUME_NONNULL_BEGIN - -/*! @brief Provides data encoding/decoding methods, random string generators, etc. - */ -@interface OIDTokenUtilities : NSObject - -/*! @internal - @brief Unavailable. This class should not be initialized. - */ -- (instancetype)init NS_UNAVAILABLE; - -/*! @brief Base64url-nopadding encodes the given data. - @param data The input data. - @return The base64url encoded data as a NSString. - @discussion Base64url-nopadding is used in several identity specs such as PKCE and - OpenID Connect. - */ -+ (NSString *)encodeBase64urlNoPadding:(NSData *)data; - -/*! @brief Generates a URL-safe string of random data. - @param size The number of random bytes to encode. NB. the length of the output string will be - greater than the number of random bytes, due to the URL-safe encoding. - @return Random data encoded with base64url. - */ -+ (nullable NSString *)randomURLSafeStringWithSize:(NSUInteger)size; - -/*! @brief SHA256 hashes the input string. - @param inputString The input string. - @return The SHA256 data. - */ -+ (NSData *)sha256:(NSString *)inputString; - -/*! @brief Truncated intput string after first 6 characters followed by ellipses - @param inputString The input string. - @return Truncated string. - */ -+ (nullable NSString *)redact:(nullable NSString *)inputString; - -/*! @brief Form url encode the input string by applying application/x-www-form-urlencoded algorithm - @param inputString The input string. - @return The encoded string. - */ -+ (NSString*)formUrlEncode:(NSString*)inputString; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDTokenUtilities.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDTokenUtilities.m deleted file mode 100644 index 3280c856..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDTokenUtilities.m +++ /dev/null @@ -1,89 +0,0 @@ -/*! @file OIDTokenUtilities.m - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDTokenUtilities.h" - -#import - -/*! @brief String representing the set of characters that are allowed as is for the - application/x-www-form-urlencoded encoding algorithm. - */ -static NSString *const kFormUrlEncodedAllowedCharacters = - @" *-._0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; - -@implementation OIDTokenUtilities - -+ (NSString *)encodeBase64urlNoPadding:(NSData *)data { - NSString *base64string = [data base64EncodedStringWithOptions:0]; - // converts base64 to base64url - base64string = [base64string stringByReplacingOccurrencesOfString:@"+" withString:@"-"]; - base64string = [base64string stringByReplacingOccurrencesOfString:@"/" withString:@"_"]; - // strips padding - base64string = [base64string stringByReplacingOccurrencesOfString:@"=" withString:@""]; - return base64string; -} - -+ (nullable NSString *)randomURLSafeStringWithSize:(NSUInteger)size { - NSMutableData *randomData = [NSMutableData dataWithLength:size]; - int result = SecRandomCopyBytes(kSecRandomDefault, randomData.length, randomData.mutableBytes); - if (result != 0) { - return nil; - } - return [[self class] encodeBase64urlNoPadding:randomData]; -} - -+ (NSData *)sha256:(NSString *)inputString { - NSData *verifierData = [inputString dataUsingEncoding:NSUTF8StringEncoding]; - NSMutableData *sha256Verifier = [NSMutableData dataWithLength:CC_SHA256_DIGEST_LENGTH]; - CC_SHA256(verifierData.bytes, (CC_LONG)verifierData.length, sha256Verifier.mutableBytes); - return sha256Verifier; -} - -+ (NSString *)redact:(NSString *)inputString { - if (inputString == nil) { - return nil; - } - switch(inputString.length){ - case 0: - return @""; - case 1 ... 8: - return @"[redacted]"; - case 9: - default: - return [[inputString substringToIndex:6] stringByAppendingString:@"...[redacted]"]; - } -} - -+ (NSString*)formUrlEncode:(NSString*)inputString { - // https://www.w3.org/TR/html5/sec-forms.html#application-x-www-form-urlencoded-encoding-algorithm - // Following the spec from the above link, application/x-www-form-urlencoded percent encode all - // the characters except *-._A-Za-z0-9 - // Space character is replaced by + in the resulting bytes sequence - if (inputString.length == 0) { - return inputString; - } - NSCharacterSet *allowedCharacters = - [NSCharacterSet characterSetWithCharactersInString:kFormUrlEncodedAllowedCharacters]; - // Percent encode all characters not present in the provided set. - NSString *encodedString = - [inputString stringByAddingPercentEncodingWithAllowedCharacters:allowedCharacters]; - // Replace occurences of space by '+' character - return [encodedString stringByReplacingOccurrencesOfString:@" " withString:@"+"]; -} - -@end diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDURLQueryComponent.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDURLQueryComponent.h deleted file mode 100644 index 054b11ea..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDURLQueryComponent.h +++ /dev/null @@ -1,93 +0,0 @@ -/*! @file OIDURLQueryComponent.h - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -@class OIDAuthorizationRequest; - -NS_ASSUME_NONNULL_BEGIN - -/*! @brief If set to YES, will force the iOS 7-only code for @c OIDURLQueryComponent to be used, - even on non-iOS 7 devices and simulators. Useful for testing the iOS 7 code paths on the - simulator. Defaults to NO. - */ -extern BOOL gOIDURLQueryComponentForceIOS7Handling; - -/*! @brief A utility class for creating and parsing URL query components encoded with the - application/x-www-form-urlencoded format. - @description Supports application/x-www-form-urlencoded encoding and decoding, specifically - '+' is replaced with space before percent decoding. For encoding, simply percent encodes - space, as this is valid application/x-www-form-urlencoded. - @see https://tools.ietf.org/html/rfc6749#section-4.1.2 - @see https://tools.ietf.org/html/rfc6749#section-4.1.3 - @see https://tools.ietf.org/html/rfc6749#appendix-B - @see https://url.spec.whatwg.org/#urlencoded-parsing - */ -@interface OIDURLQueryComponent : NSObject - -/*! @brief The parameter names in the query. - */ -@property(nonatomic, readonly) NSArray *parameters; - -/*! @brief The parameters represented as a dictionary. - @remarks All values are @c NSString except for parameters which contain multiple values, in - which case the value is an @c NSArray *. - */ -@property(nonatomic, readonly) NSDictionary *> *dictionaryValue; - -/*! @brief Creates an @c OIDURLQueryComponent by parsing the query string in a URL. - @param URL The URL from which to extract a query component. - */ -- (nullable instancetype)initWithURL:(NSURL *)URL; - -/*! @brief The value (or values) for a named parameter in the query. - @param parameter The parameter name. Case sensitive. - @return The value (or values) for a named parameter in the query. - */ -- (NSArray *)valuesForParameter:(NSString *)parameter; - -/*! @brief Adds a parameter value to the query. - @param parameter The name of the parameter. Case sensitive. - @param value The value to add. - */ -- (void)addParameter:(NSString *)parameter value:(NSString *)value; - -/*! @brief Adds multiple parameters with associated values to the query. - @param parameters The parameter name value pairs to add to the query. - */ -- (void)addParameters:(NSDictionary *)parameters; - -/*! @param URL The URL to add the query component to. - @return The original URL with the query component replaced by the parameters from this query. - */ -- (NSURL *)URLByReplacingQueryInURL:(NSURL *)URL; - -/*! @brief Builds an x-www-form-urlencoded string representing the parameters. - @return The x-www-form-urlencoded string representing the parameters. - */ -- (NSString *)URLEncodedParameters; - -/*! @brief A NSMutableCharacterSet containing allowed characters in URL parameter values (that is - the "value" part of "?key=value"). This has less allowed characters than - @c URLQueryAllowedCharacterSet, as the query component includes both the key & value. - */ -+ (NSMutableCharacterSet *)URLParamValueAllowedCharacters; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDURLQueryComponent.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDURLQueryComponent.m deleted file mode 100644 index 07050c90..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDURLQueryComponent.m +++ /dev/null @@ -1,219 +0,0 @@ -/*! @file OIDURLQueryComponent.m - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDURLQueryComponent.h" - -BOOL gOIDURLQueryComponentForceIOS7Handling = NO; - -/*! @brief String representing the set of characters that are valid for the URL query - (per @ NSCharacterSet.URLQueryAllowedCharacterSet), but are disallowed in URL query - parameters and values. - */ -static NSString *const kQueryStringParamAdditionalDisallowedCharacters = @"=&+"; - -@implementation OIDURLQueryComponent { - /*! @brief A dictionary of parameter names and values representing the contents of the query. - */ - NSMutableDictionary *> *_parameters; -} - -- (nullable instancetype)init { - self = [super init]; - if (self) { - _parameters = [NSMutableDictionary dictionary]; - } - return self; -} - -- (nullable instancetype)initWithURL:(NSURL *)URL { - self = [self init]; - if (self) { - if (@available(iOS 8.0, macOS 10.10, *)) { - // If NSURLQueryItem is available, use it for deconstructing the new URL. (iOS 8+) - if (!gOIDURLQueryComponentForceIOS7Handling) { - NSURLComponents *components = - [NSURLComponents componentsWithURL:URL resolvingAgainstBaseURL:NO]; - // As OAuth uses application/x-www-form-urlencoded encoding, interprets '+' as a space - // in addition to regular percent decoding. https://url.spec.whatwg.org/#urlencoded-parsing - components.percentEncodedQuery = - [components.percentEncodedQuery stringByReplacingOccurrencesOfString:@"+" - withString:@"%20"]; - // NB. @c queryItems are already percent decoded - NSArray *queryItems = components.queryItems; - for (NSURLQueryItem *queryItem in queryItems) { - [self addParameter:queryItem.name value:queryItem.value]; - } - return self; - } - } - - // Fallback for iOS 7 - NSString *query = URL.query; - // As OAuth uses application/x-www-form-urlencoded encoding, interprets '+' as a space - // in addition to regular percent decoding. https://url.spec.whatwg.org/#urlencoded-parsing - query = [query stringByReplacingOccurrencesOfString:@"+" withString:@"%20"]; - - NSArray *queryParts = [query componentsSeparatedByString:@"&"]; - for (NSString *queryPart in queryParts) { - NSRange equalsRange = [queryPart rangeOfString:@"="]; - if (equalsRange.location == NSNotFound) { - continue; - } - NSString *name = [queryPart substringToIndex:equalsRange.location]; - name = name.stringByRemovingPercentEncoding; - NSString *value = [queryPart substringFromIndex:equalsRange.location + equalsRange.length]; - value = value.stringByRemovingPercentEncoding; - [self addParameter:name value:value]; - } - return self; - } - return self; -} - -- (NSArray *)parameters { - return _parameters.allKeys; -} - -- (NSDictionary *> *)dictionaryValue { - // This method will flatten arrays in our @c _parameters' values if only one value exists. - NSMutableDictionary *> *values = [NSMutableDictionary dictionary]; - for (NSString *parameter in _parameters.allKeys) { - NSArray *value = _parameters[parameter]; - if (value.count == 1) { - values[parameter] = [value.firstObject copy]; - } else { - values[parameter] = [value copy]; - } - } - return values; -} - -- (NSArray *)valuesForParameter:(NSString *)parameter { - return _parameters[parameter]; -} - -- (void)addParameter:(NSString *)parameter value:(NSString *)value { - NSMutableArray *parameterValues = _parameters[parameter]; - if (!parameterValues) { - parameterValues = [NSMutableArray array]; - _parameters[parameter] = parameterValues; - } - [parameterValues addObject:value]; -} - -- (void)addParameters:(NSDictionary *)parameters { - for (NSString *parameterName in parameters.allKeys) { - [self addParameter:parameterName value:parameters[parameterName]]; - } -} - -/*! @brief Builds a query items array that can be set to @c NSURLComponents.queryItems - @discussion The parameter names and values are NOT URL encoded. - @return An array of unencoded @c NSURLQueryItem objects. - */ -- (NSMutableArray *)queryItems NS_AVAILABLE(10.10, 8.0) { - NSMutableArray *queryParameters = [NSMutableArray array]; - for (NSString *parameterName in _parameters.allKeys) { - NSArray *values = _parameters[parameterName]; - for (NSString *value in values) { - NSURLQueryItem *item = [NSURLQueryItem queryItemWithName:parameterName value:value]; - [queryParameters addObject:item]; - } - } - return queryParameters; -} - -+ (NSMutableCharacterSet *)URLParamValueAllowedCharacters { - // Starts with the standard URL-allowed character set. - NSMutableCharacterSet *allowedParamCharacters = - [[NSCharacterSet URLQueryAllowedCharacterSet] mutableCopy]; - // Removes additional characters we don't want to see in the query component. - [allowedParamCharacters removeCharactersInString:kQueryStringParamAdditionalDisallowedCharacters]; - return allowedParamCharacters; -} - -/*! @brief Builds a query string that can be set to @c NSURLComponents.percentEncodedQuery - @discussion This string is percent encoded, and shouldn't be used with - @c NSURLComponents.query. - @return An percentage encoded query string. - */ -- (NSString *)percentEncodedQueryString { - NSMutableArray *parameterizedValues = [NSMutableArray array]; - - // Starts with the standard URL-allowed character set. - NSMutableCharacterSet *allowedParamCharacters = [[self class] URLParamValueAllowedCharacters]; - - for (NSString *parameterName in _parameters.allKeys) { - NSString *encodedParameterName = - [parameterName stringByAddingPercentEncodingWithAllowedCharacters:allowedParamCharacters]; - - NSArray *values = _parameters[parameterName]; - for (NSString *value in values) { - NSString *encodedValue = - [value stringByAddingPercentEncodingWithAllowedCharacters:allowedParamCharacters]; - NSString *parameterizedValue = - [NSString stringWithFormat:@"%@=%@", encodedParameterName, encodedValue]; - [parameterizedValues addObject:parameterizedValue]; - } - } - - NSString *queryString = [parameterizedValues componentsJoinedByString:@"&"]; - return queryString; -} - -- (NSString *)URLEncodedParameters { - // If NSURLQueryItem is available, uses it for constructing the encoded parameters. (iOS 8+) - if (@available(iOS 8.0, macOS 10.10, *)) { - if (!gOIDURLQueryComponentForceIOS7Handling) { - NSURLComponents *components = [[NSURLComponents alloc] init]; - components.queryItems = [self queryItems]; - NSString *encodedQuery = components.percentEncodedQuery; - // NSURLComponents.percentEncodedQuery creates a validly escaped URL query component, but - // doesn't encode the '+' leading to potential ambiguity with application/x-www-form-urlencoded - // encoding. Percent encodes '+' to avoid this ambiguity. - encodedQuery = [encodedQuery stringByReplacingOccurrencesOfString:@"+" withString:@"%2B"]; - return encodedQuery; - } - } - - // else, falls back to building query string manually (iOS 7) - return [self percentEncodedQueryString]; -} - -- (NSURL *)URLByReplacingQueryInURL:(NSURL *)URL { - NSURLComponents *components = - [NSURLComponents componentsWithURL:URL resolvingAgainstBaseURL:NO]; - - // Replaces encodedQuery component - NSString *queryString = [self URLEncodedParameters]; - components.percentEncodedQuery = queryString; - - NSURL *URLWithParameters = components.URL; - return URLWithParameters; -} - -#pragma mark - NSObject overrides - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@: %p, parameters: %@>", - NSStringFromClass([self class]), - (void *)self, - _parameters]; -} - -@end diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDURLSessionProvider.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDURLSessionProvider.h deleted file mode 100644 index 28e91169..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDURLSessionProvider.h +++ /dev/null @@ -1,40 +0,0 @@ -/*! @file OIDURLSessionProvider.h - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -NS_ASSUME_NONNULL_BEGIN - -/*! @brief A NSURLSession provider that allows clients to provide custom implementation - for NSURLSession - */ -@interface OIDURLSessionProvider : NSObject - -/*! @brief Obtains the current @c NSURLSession; using the +[NSURLSession sharedSession] if - no custom implementation is provided. - @return NSURLSession object to be used for making network requests. - */ -+ (NSURLSession *)session; - -/*! @brief Allows library consumers to change the @c NSURLSession instance used to make - network requests. - @param session The @c NSURLSession instance that should be used for making network requests. - */ -+ (void)setSession:(NSURLSession *)session; -@end -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDURLSessionProvider.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDURLSessionProvider.m deleted file mode 100644 index fca17fe7..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/OIDURLSessionProvider.m +++ /dev/null @@ -1,39 +0,0 @@ -/*! @file OIDURLSessionProvider.m - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDURLSessionProvider.h" - -NS_ASSUME_NONNULL_BEGIN - -static NSURLSession *__nullable gURLSession; - -@implementation OIDURLSessionProvider - -+ (NSURLSession *)session { - if (!gURLSession) { - gURLSession = [NSURLSession sharedSession]; - } - return gURLSession; -} - -+ (void)setSession:(NSURLSession *)session { - NSAssert(session, @"Parameter: |session| must be non-nil."); - gURLSession = session; -} -@end -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/iOS/OIDAuthState+IOS.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/iOS/OIDAuthState+IOS.h deleted file mode 100644 index 8afc5dcc..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/iOS/OIDAuthState+IOS.h +++ /dev/null @@ -1,50 +0,0 @@ -/*! @file OIDAuthState+IOS.h - @brief AppAuth iOS SDK - @copyright - Copyright 2016 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -#import "OIDAuthState.h" - -NS_ASSUME_NONNULL_BEGIN - -/*! @brief iOS specific convenience methods for @c OIDAuthState. - */ -@interface OIDAuthState (IOS) - -/*! @brief Convenience method to create a @c OIDAuthState by presenting an authorization request - and performing the authorization code exchange in the case of code flow requests. For - the hybrid flow, the caller should validate the id_token and c_hash, then perform the token - request (@c OIDAuthorizationService.performTokenRequest:callback:) - and update the OIDAuthState with the results (@c - OIDAuthState.updateWithTokenResponse:error:). - @param authorizationRequest The authorization request to present. - @param presentingViewController The view controller from which to present the - @c SFSafariViewController. - @param callback The method called when the request has completed or failed. - @return A @c OIDExternalUserAgentSession instance which will terminate when it - receives a @c OIDExternalUserAgentSession.cancel message, or after processing a - @c OIDExternalUserAgentSession.resumeExternalUserAgentFlowWithURL: message. - */ -+ (id) - authStateByPresentingAuthorizationRequest:(OIDAuthorizationRequest *)authorizationRequest - presentingViewController:(UIViewController *)presentingViewController - callback:(OIDAuthStateAuthorizationCallback)callback; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/iOS/OIDAuthState+IOS.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/iOS/OIDAuthState+IOS.m deleted file mode 100644 index 5e7b1fee..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/iOS/OIDAuthState+IOS.m +++ /dev/null @@ -1,37 +0,0 @@ -/*! @file OIDAuthState+IOS.m - @brief AppAuth iOS SDK - @copyright - Copyright 2016 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDAuthState+IOS.h" - -#import "OIDExternalUserAgentIOS.h" - -@implementation OIDAuthState (IOS) - -+ (id) - authStateByPresentingAuthorizationRequest:(OIDAuthorizationRequest *)authorizationRequest - presentingViewController:(UIViewController *)presentingViewController - callback:(OIDAuthStateAuthorizationCallback)callback { - OIDExternalUserAgentIOS *externalUserAgent = - [[OIDExternalUserAgentIOS alloc] - initWithPresentingViewController:presentingViewController]; - return [self authStateByPresentingAuthorizationRequest:authorizationRequest - externalUserAgent:externalUserAgent - callback:callback]; -} - -@end diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/iOS/OIDAuthorizationService+IOS.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/iOS/OIDAuthorizationService+IOS.h deleted file mode 100644 index 5cdc6cfe..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/iOS/OIDAuthorizationService+IOS.h +++ /dev/null @@ -1,44 +0,0 @@ -/*! @file OIDAuthorizationService+IOS.h - @brief AppAuth iOS SDK - @copyright - Copyright 2016 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -#import "OIDAuthorizationService.h" -#import "OIDExternalUserAgentSession.h" - -NS_ASSUME_NONNULL_BEGIN - -/*! @brief Provides iOS specific authorization request handling. - */ -@interface OIDAuthorizationService (IOS) - -/*! @brief Perform an authorization flow using \SFSafariViewController. - @param request The authorization request. - @param presentingViewController The view controller from which to present the - \SFSafariViewController. - @param callback The method called when the request has completed or failed. - @return A @c OIDExternalUserAgentSession instance which will terminate when it - receives a @c OIDExternalUserAgentSession.cancel message, or after processing a - @c OIDExternalUserAgentSession.resumeExternalUserAgentFlowWithURL: message. - */ -+ (id) presentAuthorizationRequest:(OIDAuthorizationRequest *)request - presentingViewController:(UIViewController *)presentingViewController - callback:(OIDAuthorizationCallback)callback; -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/iOS/OIDAuthorizationService+IOS.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/iOS/OIDAuthorizationService+IOS.m deleted file mode 100644 index 7364f7f1..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/iOS/OIDAuthorizationService+IOS.m +++ /dev/null @@ -1,37 +0,0 @@ -/*! @file OIDAuthorizationService+IOS.m - @brief AppAuth iOS SDK - @copyright - Copyright 2016 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDAuthorizationService+IOS.h" - -#import "OIDExternalUserAgentIOS.h" - -NS_ASSUME_NONNULL_BEGIN - -@implementation OIDAuthorizationService (IOS) - -+ (id) presentAuthorizationRequest:(OIDAuthorizationRequest *)request - presentingViewController:(UIViewController *)presentingViewController - callback:(OIDAuthorizationCallback)callback { - OIDExternalUserAgentIOS *externalUserAgent = [[OIDExternalUserAgentIOS alloc] - initWithPresentingViewController:presentingViewController]; - return [self presentAuthorizationRequest:request externalUserAgent:externalUserAgent callback:callback]; -} - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/iOS/OIDExternalUserAgentIOS.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/iOS/OIDExternalUserAgentIOS.h deleted file mode 100644 index 9f5ebdff..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/iOS/OIDExternalUserAgentIOS.h +++ /dev/null @@ -1,67 +0,0 @@ -/*! @file OIDExternalUserAgentIOS.h - @brief AppAuth iOS SDK - @copyright - Copyright 2016 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -#import "OIDExternalUserAgent.h" - -@class SFSafariViewController; - -NS_ASSUME_NONNULL_BEGIN - -/*! @brief Allows library consumers to bootstrap an @c SFSafariViewController as they see fit. - @remarks Useful for customizing tint colors and presentation styles. - */ -@protocol OIDSafariViewControllerFactory - -/*! @brief Creates and returns a new @c SFSafariViewController. - @param URL The URL which the @c SFSafariViewController should load initially. - */ -- (SFSafariViewController *)safariViewControllerWithURL:(NSURL *)URL; - -@end - -/*! @brief An iOS specific external user-agent that uses the best possible user-agent available - depending on the version of iOS to present the request. - */ -@interface OIDExternalUserAgentIOS : NSObject - -/*! @brief Allows library consumers to change the @c OIDSafariViewControllerFactory used to create - new instances of @c SFSafariViewController. - @remarks Useful for customizing tint colors and presentation styles. - @param factory The @c OIDSafariViewControllerFactory to use for creating new instances of - @c SFSafariViewController. - */ -+ (void)setSafariViewControllerFactory:(id)factory; - -/*! @internal - @brief Unavailable. Please use @c initWithPresentingViewController: - */ -- (nonnull instancetype)init NS_UNAVAILABLE; - -/*! @brief The designated initializer. - @param presentingViewController The view controller from which to present the - \SFSafariViewController. - */ -- (nullable instancetype)initWithPresentingViewController: - (UIViewController *)presentingViewController - NS_DESIGNATED_INITIALIZER; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/iOS/OIDExternalUserAgentIOS.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/iOS/OIDExternalUserAgentIOS.m deleted file mode 100644 index 2c834bbc..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/iOS/OIDExternalUserAgentIOS.m +++ /dev/null @@ -1,236 +0,0 @@ -/*! @file OIDExternalUserAgentIOS.m - @brief AppAuth iOS SDK - @copyright - Copyright 2016 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDExternalUserAgentIOS.h" - -#import -#import - -#import "OIDErrorUtilities.h" -#import "OIDExternalUserAgentSession.h" -#import "OIDExternalUserAgentRequest.h" - -NS_ASSUME_NONNULL_BEGIN - -/** @brief The global/shared Safari view controller factory. Responsible for creating all new - instances of @c SFSafariViewController. - */ -static id __nullable gSafariViewControllerFactory; - -/** @brief The default @c OIDSafariViewControllerFactory which creates new instances of - @c SFSafariViewController using known best practices. - */ -@interface OIDDefaultSafariViewControllerFactory : NSObject -@end - -@interface OIDExternalUserAgentIOS () -@end - -@implementation OIDExternalUserAgentIOS { - UIViewController *_presentingViewController; - - BOOL _externalUserAgentFlowInProgress; - __weak id _session; -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wpartial-availability" - __weak SFSafariViewController *_safariVC; - SFAuthenticationSession *_authenticationVC; - ASWebAuthenticationSession *_webAuthenticationVC; -#pragma clang diagnostic pop -} - -/** @brief Obtains the current @c OIDSafariViewControllerFactory; creating a new default instance if - required. - */ -+ (id)safariViewControllerFactory { - if (!gSafariViewControllerFactory) { - gSafariViewControllerFactory = [[OIDDefaultSafariViewControllerFactory alloc] init]; - } - return gSafariViewControllerFactory; -} - -+ (void)setSafariViewControllerFactory:(id)factory { - NSAssert(factory, @"Parameter: |factory| must be non-nil."); - gSafariViewControllerFactory = factory; -} - -- (nullable instancetype)initWithPresentingViewController: - (UIViewController *)presentingViewController { - self = [super init]; - if (self) { - _presentingViewController = presentingViewController; - } - return self; -} - -- (BOOL)presentExternalUserAgentRequest:(id)request - session:(id)session { - if (_externalUserAgentFlowInProgress) { - // TODO: Handle errors as authorization is already in progress. - return NO; - } - - _externalUserAgentFlowInProgress = YES; - _session = session; - BOOL openedSafari = NO; - NSURL *requestURL = [request externalUserAgentRequestURL]; - - // iOS 12 and later, use ASWebAuthenticationSession - if (@available(iOS 12.0, *)) { - __weak OIDExternalUserAgentIOS *weakSelf = self; - NSString *redirectScheme = request.redirectScheme; - ASWebAuthenticationSession *authenticationVC = - [[ASWebAuthenticationSession alloc] initWithURL:requestURL - callbackURLScheme:redirectScheme - completionHandler:^(NSURL * _Nullable callbackURL, - NSError * _Nullable error) { - __strong OIDExternalUserAgentIOS *strongSelf = weakSelf; - if (!strongSelf) { - return; - } - strongSelf->_webAuthenticationVC = nil; - if (callbackURL) { - [strongSelf->_session resumeExternalUserAgentFlowWithURL:callbackURL]; - } else { - NSError *safariError = - [OIDErrorUtilities errorWithCode:OIDErrorCodeUserCanceledAuthorizationFlow - underlyingError:error - description:nil]; - [strongSelf->_session failExternalUserAgentFlowWithError:safariError]; - } - }]; - _webAuthenticationVC = authenticationVC; - openedSafari = [authenticationVC start]; - // iOS 11, use SFAuthenticationSession - } else if (@available(iOS 11.0, *)) { - __weak OIDExternalUserAgentIOS *weakSelf = self; - NSString *redirectScheme = request.redirectScheme; - SFAuthenticationSession *authenticationVC = - [[SFAuthenticationSession alloc] initWithURL:requestURL - callbackURLScheme:redirectScheme - completionHandler:^(NSURL * _Nullable callbackURL, - NSError * _Nullable error) { - __strong OIDExternalUserAgentIOS *strongSelf = weakSelf; - if (!strongSelf) { - return; - } - strongSelf->_authenticationVC = nil; - if (callbackURL) { - [strongSelf->_session resumeExternalUserAgentFlowWithURL:callbackURL]; - } else { - NSError *safariError = - [OIDErrorUtilities errorWithCode:OIDErrorCodeUserCanceledAuthorizationFlow - underlyingError:error - description:@"User cancelled."]; - [strongSelf->_session failExternalUserAgentFlowWithError:safariError]; - } - }]; - _authenticationVC = authenticationVC; - openedSafari = [authenticationVC start]; - // iOS 9 and 10, use SFSafariViewController - } else if (@available(iOS 9.0, *)) { - SFSafariViewController *safariVC = - [[[self class] safariViewControllerFactory] safariViewControllerWithURL:requestURL]; - safariVC.delegate = self; - _safariVC = safariVC; - [_presentingViewController presentViewController:safariVC animated:YES completion:nil]; - openedSafari = YES; - // iOS 8 and earlier, use mobile Safari - } else { - openedSafari = [[UIApplication sharedApplication] openURL:requestURL]; - } - - if (!openedSafari) { - [self cleanUp]; - NSError *safariError = [OIDErrorUtilities errorWithCode:OIDErrorCodeSafariOpenError - underlyingError:nil - description:@"Unable to open Safari."]; - [session failExternalUserAgentFlowWithError:safariError]; - } - return openedSafari; -} - -- (void)dismissExternalUserAgentAnimated:(BOOL)animated completion:(void (^)(void))completion { - if (!_externalUserAgentFlowInProgress) { - // Ignore this call if there is no authorization flow in progress. - return; - } - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wpartial-availability" - SFSafariViewController *safariVC = _safariVC; - SFAuthenticationSession *authenticationVC = _authenticationVC; -#pragma clang diagnostic pop - - [self cleanUp]; - - if (@available(iOS 11.0, *)) { - [authenticationVC cancel]; - if (completion) completion(); - } else if (@available(iOS 9.0, *)) { - if (safariVC) { - [safariVC dismissViewControllerAnimated:YES completion:completion]; - } else { - if (completion) completion(); - } - } else { - if (completion) completion(); - } -} - -- (void)cleanUp { - // The weak references to |_safariVC| and |_session| are set to nil to avoid accidentally using - // them while not in an authorization flow. - _safariVC = nil; - _authenticationVC = nil; - _session = nil; - _externalUserAgentFlowInProgress = NO; -} - -#pragma mark - SFSafariViewControllerDelegate - -- (void)safariViewControllerDidFinish:(SFSafariViewController *)controller NS_AVAILABLE_IOS(9.0) { - if (controller != _safariVC) { - // Ignore this call if the safari view controller do not match. - return; - } - if (!_externalUserAgentFlowInProgress) { - // Ignore this call if there is no authorization flow in progress. - return; - } - id session = _session; - [self cleanUp]; - NSError *error = [OIDErrorUtilities errorWithCode:OIDErrorCodeUserCanceledAuthorizationFlow - underlyingError:nil - description:@"No external user agent flow in progress."]; - [session failExternalUserAgentFlowWithError:error]; -} - -@end - -@implementation OIDDefaultSafariViewControllerFactory - -- (SFSafariViewController *)safariViewControllerWithURL:(NSURL *)URL NS_AVAILABLE_IOS(9.0) { - SFSafariViewController *safariViewController = - [[SFSafariViewController alloc] initWithURL:URL entersReaderIfAvailable:NO]; - return safariViewController; -} - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/iOS/OIDExternalUserAgentIOSCustomBrowser.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/iOS/OIDExternalUserAgentIOSCustomBrowser.h deleted file mode 100644 index 8d1dc936..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/iOS/OIDExternalUserAgentIOSCustomBrowser.h +++ /dev/null @@ -1,106 +0,0 @@ -/*! @file OIDExternalUserAgentIOSCustomBrowser.h - @brief AppAuth iOS SDK - @copyright - Copyright 2018 Google LLC - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -#import "OIDExternalUserAgent.h" - -NS_ASSUME_NONNULL_BEGIN - -/*! @brief A block that transforms a regular http/https URL into one that will open in an - alternative browser. - @param requestURL the http/https request URL to be transformed. - @return transformed URL. - */ -typedef NSURL *_Nullable (^OIDCustomBrowserURLTransformation)(NSURL *_Nullable requestURL); - -/*! @brief An implementation of the OIDExternalUserAgent protocol for iOS that uses - a custom browser (i.e. not Safari) for external requests. It is suitable for browsers that - offer a custom url scheme that simply replaces the "https" scheme. It is not designed - for browsers that require other modifications to the URL. If the browser is not installed - the user will be prompted to install it. - */ -@interface OIDExternalUserAgentIOSCustomBrowser : NSObject - -/*! @brief URL transformation block for the browser. - */ -@property(nonatomic, readonly) OIDCustomBrowserURLTransformation URLTransformation; - -/*! @brief URL Scheme used to test for whether the browser is installed. - */ -@property(nonatomic, readonly, nullable) NSString *canOpenURLScheme; - -/*! @brief URL of the browser's App Store listing. - */ -@property(nonatomic, readonly, nullable) NSURL *appStoreURL; - -/*! @brief An instance of @c OIDExternalUserAgentIOSCustomBrowser for Chrome. - */ -+ (instancetype)CustomBrowserChrome; - -/*! @brief An instance of @c OIDExternalUserAgentIOSCustomBrowser for Firefox. - */ -+ (instancetype)CustomBrowserFirefox; - -/*! @brief An instance of @c OIDExternalUserAgentIOSCustomBrowser for Opera. - */ -+ (instancetype)CustomBrowserOpera; - -/*! @brief An instance of @c OIDExternalUserAgentIOSCustomBrowser for Safari. - */ -+ (instancetype)CustomBrowserSafari; - -/*! @brief Creates a @c OIDCustomBrowserURLTransformation using the scheme substitution method used - iOS browsers like Chrome and Firefox. - */ -+ (OIDCustomBrowserURLTransformation) - URLTransformationSchemeSubstitutionHTTPS:(NSString *)browserSchemeHTTPS - HTTP:(nullable NSString *)browserSchemeHTTP; - -/*! @brief Creates a @c OIDCustomBrowserURLTransformation with the URL prefix method used by - iOS browsers like Firefox. - */ -+ (OIDCustomBrowserURLTransformation) URLTransformationSchemeConcatPrefix:(NSString*)URLprefix; - -/*! @internal - @brief Unavailable. Please use @c initWithURLTransformation:canOpenURLScheme:appStoreURL: - */ -- (nonnull instancetype)init NS_UNAVAILABLE; - -/*! @brief OIDExternalUserAgent for a custom browser. @c presentExternalUserAgentRequest:session method - will return NO if the browser isn't installed. - */ -- (nullable instancetype)initWithURLTransformation:(OIDCustomBrowserURLTransformation)URLTransformation; - -/*! @brief The designated initializer. - @param URLTransformation the transformation block to translate the URL into one that will open - in the desired custom browser. - @param canOpenURLScheme any scheme supported by the browser used to check if the browser is - installed. - @param appStoreURL URL of the browser in the app store. When this and @c canOpenURLScheme - are non-nil, @c presentExternalUserAgentRequest:session will redirect the user to the app store - if the browser is not installed. - */ -- (nullable instancetype)initWithURLTransformation:(OIDCustomBrowserURLTransformation)URLTransformation - canOpenURLScheme:(nullable NSString *)canOpenURLScheme - appStoreURL:(nullable NSURL *)appStoreURL - NS_DESIGNATED_INITIALIZER; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/iOS/OIDExternalUserAgentIOSCustomBrowser.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/iOS/OIDExternalUserAgentIOSCustomBrowser.m deleted file mode 100644 index 7bca4c7e..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/iOS/OIDExternalUserAgentIOSCustomBrowser.m +++ /dev/null @@ -1,161 +0,0 @@ -/*! @file OIDExternalUserAgentIOSCustomBrowser.m - @brief AppAuth iOS SDK - @copyright - Copyright 2018 Google LLC - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDExternalUserAgentIOSCustomBrowser.h" - -#import - -#import "OIDAuthorizationRequest.h" -#import "OIDAuthorizationService.h" -#import "OIDErrorUtilities.h" -#import "OIDURLQueryComponent.h" - -NS_ASSUME_NONNULL_BEGIN - -@implementation OIDExternalUserAgentIOSCustomBrowser - -+ (instancetype)CustomBrowserChrome { - // Chrome iOS documentation: https://developer.chrome.com/multidevice/ios/links - OIDCustomBrowserURLTransformation transform = [[self class] URLTransformationSchemeSubstitutionHTTPS:@"googlechromes" HTTP:@"googlechrome"]; - NSURL *appStoreURL = - [NSURL URLWithString:@"itms-apps://itunes.apple.com/us/app/chrome/id535886823"]; - return [[[self class] alloc] initWithURLTransformation:transform - canOpenURLScheme:@"googlechromes" - appStoreURL:appStoreURL]; -} - -+ (instancetype)CustomBrowserFirefox { - // Firefox iOS documentation: https://github.com/mozilla-mobile/firefox-ios-open-in-client - OIDCustomBrowserURLTransformation transform = - [[self class] URLTransformationSchemeConcatPrefix:@"firefox://open-url?url="]; - NSURL *appStoreURL = - [NSURL URLWithString:@"itms-apps://itunes.apple.com/us/app/firefox-web-browser/id989804926"]; - return [[[self class] alloc] initWithURLTransformation:transform - canOpenURLScheme:@"firefox" - appStoreURL:appStoreURL]; -} - -+ (instancetype)CustomBrowserOpera { - OIDCustomBrowserURLTransformation transform = - [[self class] URLTransformationSchemeSubstitutionHTTPS:@"opera-https" HTTP:@"opera-http"]; - NSURL *appStoreURL = - [NSURL URLWithString:@"itms-apps://itunes.apple.com/us/app/opera-mini-web-browser/id363729560"]; - return [[[self class] alloc] initWithURLTransformation:transform - canOpenURLScheme:@"opera-https" - appStoreURL:appStoreURL]; -} - -+ (instancetype)CustomBrowserSafari { - OIDCustomBrowserURLTransformation transformNOP = ^NSURL *(NSURL *requestURL) { - return requestURL; - }; - OIDExternalUserAgentIOSCustomBrowser *transform = - [[[self class] alloc] initWithURLTransformation:transformNOP]; - return transform; -} - -+ (OIDCustomBrowserURLTransformation) - URLTransformationSchemeSubstitutionHTTPS:(NSString *)browserSchemeHTTPS - HTTP:(nullable NSString *)browserSchemeHTTP { - OIDCustomBrowserURLTransformation transform = ^NSURL *(NSURL *requestURL) { - // Replace the URL Scheme with the Chrome equivalent. - NSString *newScheme = nil; - if ([requestURL.scheme isEqualToString:@"https"]) { - newScheme = browserSchemeHTTPS; - } else if ([requestURL.scheme isEqualToString:@"http"]) { - if (!browserSchemeHTTP) { - NSAssert(false, @"No HTTP scheme registered for browser"); - return nil; - } - newScheme = browserSchemeHTTP; - } - - // Replaces the URI scheme with the custom scheme - NSURLComponents *components = [NSURLComponents componentsWithURL:requestURL - resolvingAgainstBaseURL:YES]; - components.scheme = newScheme; - return components.URL; - }; - return transform; -} - -+ (OIDCustomBrowserURLTransformation)URLTransformationSchemeConcatPrefix:(NSString *)URLprefix { - OIDCustomBrowserURLTransformation transform = ^NSURL *(NSURL *requestURL) { - NSString *requestURLString = [requestURL absoluteString]; - NSMutableCharacterSet *allowedParamCharacters = - [OIDURLQueryComponent URLParamValueAllowedCharacters]; - NSString *encodedUrl = [requestURLString stringByAddingPercentEncodingWithAllowedCharacters:allowedParamCharacters]; - NSString *newURL = [NSString stringWithFormat:@"%@%@", URLprefix, encodedUrl]; - return [NSURL URLWithString:newURL]; - }; - return transform; -} - -- (nullable instancetype)initWithURLTransformation: - (OIDCustomBrowserURLTransformation)URLTransformation { - return [self initWithURLTransformation:URLTransformation canOpenURLScheme:nil appStoreURL:nil]; -} - -- (nullable instancetype) - initWithURLTransformation:(OIDCustomBrowserURLTransformation)URLTransformation - canOpenURLScheme:(nullable NSString *)canOpenURLScheme - appStoreURL:(nullable NSURL *)appStoreURL { - self = [super init]; - if (self) { - _URLTransformation = URLTransformation; - _canOpenURLScheme = canOpenURLScheme; - _appStoreURL = appStoreURL; - } - return self; -} - -- (BOOL)presentExternalUserAgentRequest:(nonnull id)request - session:(nonnull id)session { - // If the app store URL is set, checks if the app is installed and if not opens the app store. - if (_appStoreURL && _canOpenURLScheme) { - // Verifies existence of LSApplicationQueriesSchemes Info.plist key. - NSArray __unused* canOpenURLs = - [[NSBundle mainBundle] objectForInfoDictionaryKey:@"LSApplicationQueriesSchemes"]; - NSAssert(canOpenURLs, @"plist missing LSApplicationQueriesSchemes key"); - NSAssert1([canOpenURLs containsObject:_canOpenURLScheme], - @"plist missing LSApplicationQueriesSchemes entry for '%@'", _canOpenURLScheme); - - // Opens AppStore if app isn't installed - NSString *testURLString = [NSString stringWithFormat:@"%@://example.com", _canOpenURLScheme]; - NSURL *testURL = [NSURL URLWithString:testURLString]; - if (![[UIApplication sharedApplication] canOpenURL:testURL]) { - [[UIApplication sharedApplication] openURL:_appStoreURL]; - return NO; - } - } - - // Transforms the request URL and opens it. - NSURL *requestURL = [request externalUserAgentRequestURL]; - requestURL = _URLTransformation(requestURL); - BOOL openedInBrowser = [[UIApplication sharedApplication] openURL:requestURL]; - return openedInBrowser; -} - -- (void)dismissExternalUserAgentAnimated:(BOOL)animated - completion:(nonnull void (^)(void))completion { - completion(); -} - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/macOS/LoopbackHTTPServer/OIDLoopbackHTTPServer.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/macOS/LoopbackHTTPServer/OIDLoopbackHTTPServer.h deleted file mode 100644 index b78bfa51..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/macOS/LoopbackHTTPServer/OIDLoopbackHTTPServer.h +++ /dev/null @@ -1,188 +0,0 @@ -/*! @file OIDLoopbackHTTPServer.h - @brief AppAuth iOS SDK - @copyright - Copyright 2016 The AppAuth Authors. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -// Based on the MiniSOAP Sample -// https://developer.apple.com/library/mac/samplecode/MiniSOAP/Introduction/Intro.html -// Modified to limit connections to the loopback interface only. - -#import -#import - -@class HTTPConnection, HTTPServerRequest, TCPServer; - -extern NSString * const TCPServerErrorDomain; - -typedef enum { - kTCPServerCouldNotBindToIPv4Address = 1, - kTCPServerCouldNotBindToIPv6Address = 2, - kTCPServerNoSocketsAvailable = 3, -} TCPServerErrorCode; - -@protocol TCPServerDelegate - -- (void)TCPServer:(TCPServer *)server - didReceiveConnectionFromAddress:(NSData *)addr - inputStream:(NSInputStream *)istr - outputStream:(NSOutputStream *)ostr; - -@end - -@interface TCPServer : NSObject { -@private - __weak id delegate; - NSString *domain; - NSString *name; - NSString *type; - uint16_t port; - CFSocketRef ipv4socket; - CFSocketRef ipv6socket; - NSNetService *netService; -} - -- (id)delegate; -- (void)setDelegate:(id)value; - -- (NSString *)domain; -- (void)setDomain:(NSString *)value; - -- (NSString *)name; -- (void)setName:(NSString *)value; - -- (NSString *)type; -- (void)setType:(NSString *)value; - -- (uint16_t)port; -- (void)setPort:(uint16_t)value; - -- (BOOL)start:(NSError **)error; -- (BOOL)stop; - -- (BOOL)hasIPv4Socket; -- (BOOL)hasIPv6Socket; - -// called when a new connection comes in; by default, informs the delegate -- (void)handleNewConnectionFromAddress:(NSData *)addr - inputStream:(NSInputStream *)istr - outputStream:(NSOutputStream *)ostr; - -@end - -@interface HTTPServer : TCPServer { -@private - Class connClass; - NSURL *docRoot; - // Currently active connections spawned from the HTTPServer. - NSMutableArray *connections; -} - -- (Class)connectionClass; -// used to configure the subclass of HTTPConnection to create when -// a new connection comes in; by default, this is HTTPConnection -- (void)setConnectionClass:(Class)value; - -@end - -@interface HTTPServer (HTTPServerDelegateMethods) -// If the delegate implements this method, this is called -// by an HTTPServer when a new connection comes in. If the -// delegate wishes to refuse the connection, then it should -// invalidate the connection object from within this method. -- (void)HTTPServer:(HTTPServer *)serv didMakeNewConnection:(HTTPConnection *)conn; -@end - - -// This class represents each incoming client connection. -@interface HTTPConnection : NSObject { -@private - __weak id delegate; - NSData *peerAddress; - __weak HTTPServer *server; - NSMutableArray *requests; - NSInputStream *istream; - NSOutputStream *ostream; - NSMutableData *ibuffer; - NSMutableData *obuffer; - BOOL isValid; - BOOL firstResponseDone; -} - -- (id)initWithPeerAddress:(NSData *)addr - inputStream:(NSInputStream *)istr - outputStream:(NSOutputStream *)ostr - forServer:(HTTPServer *)serv; - -- (id)delegate; -- (void)setDelegate:(id)value; - -- (NSData *)peerAddress; - -- (HTTPServer *)server; - -// get the next request that needs to be responded to -- (HTTPServerRequest *)nextRequest; - -- (BOOL)isValid; -// shut down the connection -- (void)invalidate; - -// perform the default handling action: GET and HEAD requests for files -// in the local file system (relative to the documentRoot of the server) -- (void)performDefaultRequestHandling:(HTTPServerRequest *)sreq; - -@end - -@interface HTTPConnection (HTTPConnectionDelegateMethods) -// The "didReceiveRequest:" tells the delegate when a new request comes in. -- (void)HTTPConnection:(HTTPConnection *)conn didReceiveRequest:(HTTPServerRequest *)mess; -- (void)HTTPConnection:(HTTPConnection *)conn didSendResponse:(HTTPServerRequest *)mess; -@end - - -// As NSURLRequest and NSURLResponse are not entirely suitable for use from -// the point of view of an HTTP server, we use CFHTTPMessageRef to encapsulate -// requests and responses. This class packages the (future) response with a -// request and other info for convenience. -@interface HTTPServerRequest : NSObject { -@private - HTTPConnection *connection; - CFHTTPMessageRef request; - CFHTTPMessageRef response; - NSInputStream *responseStream; -} - -- (id)initWithRequest:(CFHTTPMessageRef)req connection:(HTTPConnection *)conn; - -- (HTTPConnection *)connection; - -- (CFHTTPMessageRef)request; - -// The response may include a body. As soon as the response is set, -// the response may be written out to the network. -- (CFHTTPMessageRef)response; -- (void)setResponse:(CFHTTPMessageRef)value; - -- (NSInputStream *)responseBodyStream; -// If there is to be a response body stream (when, say, a big -// file is to be returned, rather than reading the whole thing -// into memory), then it must be set on the request BEFORE the -// response [headers] itself. -- (void)setResponseBodyStream:(NSInputStream *)value; - -@end - - diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/macOS/LoopbackHTTPServer/OIDLoopbackHTTPServer.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/macOS/LoopbackHTTPServer/OIDLoopbackHTTPServer.m deleted file mode 100644 index 5c9d23be..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/macOS/LoopbackHTTPServer/OIDLoopbackHTTPServer.m +++ /dev/null @@ -1,612 +0,0 @@ -/*! @file OIDLoopbackHTTPServer.m - @brief AppAuth iOS SDK - @copyright - Copyright 2016 The AppAuth Authors. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDLoopbackHTTPServer.h" -#include -#include -#include - -// We'll ignore the pointer arithmetic warnings for now. -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wpointer-arith" - -@implementation HTTPServer - -- (id)init { - self = [super init]; - connClass = [HTTPConnection self]; - connections = [[NSMutableArray alloc] init]; - return self; -} - -- (Class)connectionClass { - return connClass; -} - -- (void)setConnectionClass:(Class)value { - connClass = value; -} - -// Removes the connection from the list of active connections. -- (void)removeConnection:(HTTPConnection *)connection { - [connections removeObject:connection]; -} - -// Converts the TCPServer delegate notification into the HTTPServer delegate method. -- (void)handleNewConnectionFromAddress:(NSData *)addr inputStream:(NSInputStream *)istr outputStream:(NSOutputStream *)ostr { - HTTPConnection *connection = [[connClass alloc] initWithPeerAddress:addr inputStream:istr outputStream:ostr forServer:self]; - // Adds connection to the active connection list to retain it. - [connections addObject:connection]; - [connection setDelegate:[self delegate]]; - if ([self delegate] && [[self delegate] respondsToSelector:@selector(HTTPServer:didMakeNewConnection:)]) { - [[self delegate] HTTPServer:self didMakeNewConnection:connection]; - } -} - -@end - - -@implementation HTTPConnection - -- (id)init { - return nil; -} - -- (id)initWithPeerAddress:(NSData *)addr inputStream:(NSInputStream *)istr outputStream:(NSOutputStream *)ostr forServer:(HTTPServer *)serv { - peerAddress = [addr copy]; - server = serv; - istream = istr; - ostream = ostr; - [istream setDelegate:self]; - [ostream setDelegate:self]; - [istream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:(id)kCFRunLoopCommonModes]; - [ostream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:(id)kCFRunLoopCommonModes]; - [istream open]; - [ostream open]; - isValid = YES; - return self; -} - -- (void)dealloc { - [self invalidate]; -} - -- (id)delegate { - return delegate; -} - -- (void)setDelegate:(id)value { - delegate = value; -} - -- (NSData *)peerAddress { - return peerAddress; -} - -- (HTTPServer *)server { - return server; -} - -- (HTTPServerRequest *)nextRequest { - for (HTTPServerRequest *request in requests) { - if (![request response]) { - return request; - } - } - return nil; -} - -- (BOOL)isValid { - return isValid; -} - -- (void)invalidate { - if (isValid) { - isValid = NO; - [server removeConnection:self]; - [istream setDelegate:nil]; - [ostream setDelegate:nil]; - [istream close]; - [ostream close]; - istream = nil; - ostream = nil; - ibuffer = nil; - obuffer = nil; - requests = nil; - } -} - -// YES return means that a complete request was parsed, and the caller -// should call again as the buffered bytes may have another complete -// request available. -- (BOOL)processIncomingBytes { - CFHTTPMessageRef working = CFHTTPMessageCreateEmpty(kCFAllocatorDefault, TRUE); - CFHTTPMessageAppendBytes(working, [ibuffer bytes], [ibuffer length]); - - // This "try and possibly succeed" approach is potentially expensive - // (lots of bytes being copied around), but the only API available for - // the server to use, short of doing the parsing itself. - - // HTTPConnection does not handle the chunked transfer encoding - // described in the HTTP spec. And if there is no Content-Length - // header, then the request is the remainder of the stream bytes. - - if (CFHTTPMessageIsHeaderComplete(working)) { - NSString *contentLengthValue = (__bridge_transfer NSString *)CFHTTPMessageCopyHeaderFieldValue(working, (CFStringRef)@"Content-Length"); - - unsigned contentLength = contentLengthValue ? [contentLengthValue intValue] : 0; - NSData *body = (__bridge_transfer NSData *)CFHTTPMessageCopyBody(working); - NSUInteger bodyLength = [body length]; - if (contentLength <= bodyLength) { - NSData *newBody = [NSData dataWithBytes:[body bytes] length:contentLength]; - [ibuffer setLength:0]; - [ibuffer appendBytes:([body bytes] + contentLength) length:(bodyLength - contentLength)]; - CFHTTPMessageSetBody(working, (__bridge CFDataRef)newBody); - } else { - CFRelease(working); - return NO; - } - } else { - return NO; - } - - HTTPServerRequest *request = [[HTTPServerRequest alloc] initWithRequest:working connection:self]; - if (!requests) { - requests = [[NSMutableArray alloc] init]; - } - [requests addObject:request]; - if (delegate && [delegate respondsToSelector:@selector(HTTPConnection:didReceiveRequest:)]) { - // Schedules the delegate to be executed later on the main thread. Cannot call the delegate - // directly as this method is called in a loop in order to process multiple messages, and - // the delegate may choose to stop and dealloc the listener – so we need queue the messages - // and process them separately. - id myDelegate = delegate; - dispatch_async(dispatch_get_main_queue(), ^() { - [myDelegate HTTPConnection:self didReceiveRequest:request]; - }); - } else { - [self performDefaultRequestHandling:request]; - } - - CFRelease(working); - return YES; -} - -- (void)processOutgoingBytes { - // The HTTP headers, then the body if any, then the response stream get - // written out, in that order. The Content-Length: header is assumed to - // be properly set in the response. Outgoing responses are processed in - // the order the requests were received (required by HTTP). - - // Write as many bytes as possible, from buffered bytes, response - // headers and body, and response stream. - - if (![ostream hasSpaceAvailable]) { - return; - } - - NSUInteger olen = [obuffer length]; - if (0 < olen) { - NSInteger writ = [ostream write:[obuffer bytes] maxLength:olen]; - // buffer any unwritten bytes for later writing - if (writ < olen) { - memmove([obuffer mutableBytes], [obuffer mutableBytes] + writ, olen - writ); - [obuffer setLength:olen - writ]; - return; - } - [obuffer setLength:0]; - } - - NSUInteger cnt = requests ? [requests count] : 0; - HTTPServerRequest *req = (0 < cnt) ? [requests objectAtIndex:0] : nil; - - CFHTTPMessageRef cfresp = req ? [req response] : NULL; - if (!cfresp) return; - - if (!obuffer) { - obuffer = [[NSMutableData alloc] init]; - } - - if (!firstResponseDone) { - firstResponseDone = YES; - NSData *serialized = (__bridge_transfer NSData *)CFHTTPMessageCopySerializedMessage(cfresp); - NSUInteger olen = [serialized length]; - if (0 < olen) { - NSInteger writ = [ostream write:[serialized bytes] maxLength:olen]; - if (writ < olen) { - // buffer any unwritten bytes for later writing - [obuffer setLength:(olen - writ)]; - memmove([obuffer mutableBytes], [serialized bytes] + writ, olen - writ); - return; - } - } - } - - NSInputStream *respStream = [req responseBodyStream]; - if (respStream) { - if ([respStream streamStatus] == NSStreamStatusNotOpen) { - [respStream open]; - } - // read some bytes from the stream into our local buffer - [obuffer setLength:16 * 1024]; - NSInteger read = [respStream read:[obuffer mutableBytes] maxLength:[obuffer length]]; - [obuffer setLength:read]; - } - - if (0 == [obuffer length]) { - // When we get to this point with an empty buffer, then the - // processing of the response is done. If the input stream - // is closed or at EOF, then no more requests are coming in. - if (delegate && [delegate respondsToSelector:@selector(HTTPConnection:didSendResponse:)]) { - [delegate HTTPConnection:self didSendResponse:req]; - } - [requests removeObjectAtIndex:0]; - firstResponseDone = NO; - if ([istream streamStatus] == NSStreamStatusAtEnd && [requests count] == 0) { - [self invalidate]; - } - return; - } - - olen = [obuffer length]; - if (0 < olen) { - NSInteger writ = [ostream write:[obuffer bytes] maxLength:olen]; - // buffer any unwritten bytes for later writing - if (writ < olen) { - memmove([obuffer mutableBytes], [obuffer mutableBytes] + writ, olen - writ); - } - [obuffer setLength:olen - writ]; - } -} - -- (void)stream:(NSStream *)stream handleEvent:(NSStreamEvent)streamEvent { - switch(streamEvent) { - case NSStreamEventHasBytesAvailable:; - uint8_t buf[16 * 1024]; - uint8_t *buffer = NULL; - NSUInteger len = 0; - if (![istream getBuffer:&buffer length:&len]) { - NSInteger amount = [istream read:buf maxLength:sizeof(buf)]; - buffer = buf; - len = amount; - } - if (0 < len) { - if (!ibuffer) { - ibuffer = [[NSMutableData alloc] init]; - } - [ibuffer appendBytes:buffer length:len]; - } - do {} while ([self processIncomingBytes]); - break; - case NSStreamEventHasSpaceAvailable:; - [self processOutgoingBytes]; - break; - case NSStreamEventEndEncountered:; - [self processIncomingBytes]; - if (stream == ostream) { - // When the output stream is closed, no more writing will succeed and - // will abandon the processing of any pending requests and further - // incoming bytes. - [self invalidate]; - } - break; - case NSStreamEventErrorOccurred:; - NSLog(@"HTTPServer stream error: %@", [stream streamError]); - break; - default: - break; - } -} - -- (void)performDefaultRequestHandling:(HTTPServerRequest *)mess { - CFHTTPMessageRef request = [mess request]; - - NSString *vers = (__bridge_transfer id)CFHTTPMessageCopyVersion(request); - if (!vers || ![vers isEqual:(id)kCFHTTPVersion1_1]) { - CFHTTPMessageRef response = CFHTTPMessageCreateResponse(kCFAllocatorDefault, 505, NULL, (__bridge CFStringRef)vers); // Version Not Supported - [mess setResponse:response]; - CFRelease(response); - return; - } - - // 500s all requests when no delegate set to handle them. - CFHTTPMessageRef response = CFHTTPMessageCreateResponse(kCFAllocatorDefault, 500, NULL, kCFHTTPVersion1_1); // Bad Request - [mess setResponse:response]; - CFRelease(response); -} - -@end - - -@implementation HTTPServerRequest - -- (id)init { - return nil; -} - -- (id)initWithRequest:(CFHTTPMessageRef)req connection:(HTTPConnection *)conn { - connection = conn; - request = (CFHTTPMessageRef)CFRetain(req); - return self; -} - -- (void)dealloc { - if (request) CFRelease(request); - if (response) CFRelease(response); -} - -- (HTTPConnection *)connection { - return connection; -} - -- (CFHTTPMessageRef)request { - return request; -} - -- (CFHTTPMessageRef)response { - return response; -} - -- (void)setResponse:(CFHTTPMessageRef)value { - if (value != response) { - if (response) CFRelease(response); - response = (CFHTTPMessageRef)CFRetain(value); - if (response) { - // check to see if the response can now be sent out - [connection processOutgoingBytes]; - } - } -} - -- (NSInputStream *)responseBodyStream { - return responseStream; -} - -- (void)setResponseBodyStream:(NSInputStream *)value { - if (value != responseStream) { - responseStream = value; - } -} - -@end - -NSString * const TCPServerErrorDomain = @"TCPServerErrorDomain"; - -@implementation TCPServer - -- (id)init { - return self; -} - -- (void)dealloc { - [self stop]; -} - -- (id)delegate { - return delegate; -} - -- (void)setDelegate:(id)value { - delegate = value; -} - -- (NSString *)domain { - return domain; -} - -- (void)setDomain:(NSString *)value { - if (domain != value) { - domain = [value copy]; - } -} - -- (NSString *)name { - return name; -} - -- (void)setName:(NSString *)value { - if (name != value) { - name = [value copy]; - } -} - -- (NSString *)type { - return type; -} - -- (void)setType:(NSString *)value { - if (type != value) { - type = [value copy]; - } -} - -- (uint16_t)port { - return port; -} - -- (void)setPort:(uint16_t)value { - port = value; -} - -- (void)handleNewConnectionFromAddress:(NSData *)addr inputStream:(NSInputStream *)istr outputStream:(NSOutputStream *)ostr { - // if the delegate implements the delegate method, call it - if (delegate && [(NSObject*)delegate respondsToSelector:@selector(TCPServer:didReceiveConnectionFromAddress:inputStream:outputStream:)]) { - [delegate TCPServer:self didReceiveConnectionFromAddress:addr inputStream:istr outputStream:ostr]; - } -} - -// This function is called by CFSocket when a new connection comes in. -// We gather some data here, and convert the function call to a method -// invocation on TCPServer. -static void TCPServerAcceptCallBack(CFSocketRef socket, CFSocketCallBackType type, CFDataRef address, const void *data, void *info) { - TCPServer *server = (__bridge TCPServer *)info; - if (kCFSocketAcceptCallBack == type) { - // for an AcceptCallBack, the data parameter is a pointer to a CFSocketNativeHandle - CFSocketNativeHandle nativeSocketHandle = *(CFSocketNativeHandle *)data; - uint8_t name[SOCK_MAXADDRLEN]; - socklen_t namelen = sizeof(name); - NSData *peer = nil; - if (0 == getpeername(nativeSocketHandle, (struct sockaddr *)name, &namelen)) { - peer = [NSData dataWithBytes:name length:namelen]; - } - CFReadStreamRef readStream = NULL; - CFWriteStreamRef writeStream = NULL; - CFStreamCreatePairWithSocket(kCFAllocatorDefault, nativeSocketHandle, &readStream, &writeStream); - if (readStream && writeStream) { - CFReadStreamSetProperty(readStream, kCFStreamPropertyShouldCloseNativeSocket, kCFBooleanTrue); - CFWriteStreamSetProperty(writeStream, kCFStreamPropertyShouldCloseNativeSocket, kCFBooleanTrue); - [server handleNewConnectionFromAddress:peer inputStream:(__bridge NSInputStream *)readStream outputStream:(__bridge NSOutputStream *)writeStream]; - } else { - // on any failure, need to destroy the CFSocketNativeHandle - // since we are not going to use it any more - close(nativeSocketHandle); - } - if (readStream) CFRelease(readStream); - if (writeStream) CFRelease(writeStream); - } -} - -- (BOOL)start:(NSError **)error { - CFSocketContext socketCtxt = {0, (__bridge void *)(self), NULL, NULL, NULL}; - ipv4socket = CFSocketCreate(kCFAllocatorDefault, PF_INET, SOCK_STREAM, IPPROTO_TCP, kCFSocketAcceptCallBack, (CFSocketCallBack)&TCPServerAcceptCallBack, &socketCtxt); - ipv6socket = CFSocketCreate(kCFAllocatorDefault, PF_INET6, SOCK_STREAM, IPPROTO_TCP, kCFSocketAcceptCallBack, (CFSocketCallBack)&TCPServerAcceptCallBack, &socketCtxt); - - if (NULL == ipv4socket || NULL == ipv6socket) { - if (error) *error = [[NSError alloc] initWithDomain:TCPServerErrorDomain code:kTCPServerNoSocketsAvailable userInfo:nil]; - if (ipv4socket) CFRelease(ipv4socket); - if (ipv6socket) CFRelease(ipv6socket); - ipv4socket = NULL; - ipv6socket = NULL; - return NO; - } - - int yes = 1; - setsockopt(CFSocketGetNative(ipv4socket), SOL_SOCKET, SO_REUSEADDR, (void *)&yes, sizeof(yes)); - setsockopt(CFSocketGetNative(ipv6socket), SOL_SOCKET, SO_REUSEADDR, (void *)&yes, sizeof(yes)); - - // set up the IPv4 endpoint; if port is 0, this will cause the kernel to choose a port for us - struct sockaddr_in addr4; - memset(&addr4, 0, sizeof(addr4)); - addr4.sin_len = sizeof(addr4); - addr4.sin_family = AF_INET; - addr4.sin_port = htons(port); - addr4.sin_addr.s_addr = htonl(INADDR_LOOPBACK); - NSData *address4 = [NSData dataWithBytes:&addr4 length:sizeof(addr4)]; - - if (kCFSocketSuccess == CFSocketSetAddress(ipv4socket, (CFDataRef)address4)) { - if (0 == port) { - // now that the binding was successful, we get the port number - // -- we will need it for the v6 endpoint and for the NSNetService - NSData *addr = (__bridge_transfer NSData *)CFSocketCopyAddress(ipv4socket); - memcpy(&addr4, [addr bytes], [addr length]); - port = ntohs(addr4.sin_port); - } - } else { - if (ipv4socket) CFRelease(ipv4socket); - ipv4socket = NULL; - } - - // set up the IPv6 endpoint - struct sockaddr_in6 addr6; - memset(&addr6, 0, sizeof(addr6)); - addr6.sin6_len = sizeof(addr6); - addr6.sin6_family = AF_INET6; - addr6.sin6_port = htons(port); - memcpy(&(addr6.sin6_addr), &in6addr_loopback, sizeof(addr6.sin6_addr)); - NSData *address6 = [NSData dataWithBytes:&addr6 length:sizeof(addr6)]; - - if (kCFSocketSuccess == CFSocketSetAddress(ipv6socket, (CFDataRef)address6)) { - if (0 == port) { - // In this case the IPv4 socket failed to bind but the IPv6 socket succeeded - // Get the port number of the IPv6 socket - NSData *addr = (__bridge_transfer NSData *)CFSocketCopyAddress(ipv6socket); - memcpy(&addr6, [addr bytes], [addr length]); - port = ntohs(addr6.sin6_port); - } - } else { - if (ipv6socket) CFRelease(ipv6socket); - ipv6socket = NULL; - } - - if (!ipv4socket && !ipv6socket) { - // Couldn't bind an IPv4 or IPv6 socket, return an error - if (error) *error = [[NSError alloc] initWithDomain:TCPServerErrorDomain code:kTCPServerCouldNotBindToIPv4Address userInfo:nil]; - return NO; - } - - // set up the run loop sources for the sockets - CFRunLoopRef cfrl = CFRunLoopGetCurrent(); - - if (ipv4socket) { - CFRunLoopSourceRef source4 = CFSocketCreateRunLoopSource(kCFAllocatorDefault, ipv4socket, 0); - CFRunLoopAddSource(cfrl, source4, kCFRunLoopCommonModes); - CFRelease(source4); - } - - if (ipv6socket) { - CFRunLoopSourceRef source6 = CFSocketCreateRunLoopSource(kCFAllocatorDefault, ipv6socket, 0); - CFRunLoopAddSource(cfrl, source6, kCFRunLoopCommonModes); - CFRelease(source6); - } - - // we can only publish the service if we have a type to publish with - if (nil != type) { - NSString *publishingDomain = domain ? domain : @""; - NSString *publishingName = nil; - if (nil != name) { - publishingName = name; - } else { - NSString * thisHostName = [[NSProcessInfo processInfo] hostName]; - if ([thisHostName hasSuffix:@".local"]) { - publishingName = [thisHostName substringToIndex:([thisHostName length] - 6)]; - } - } - netService = [[NSNetService alloc] initWithDomain:publishingDomain type:type name:publishingName port:port]; - [netService publish]; - } - - return YES; -} - -- (BOOL)stop { - [netService stop]; - netService = nil; - if (ipv4socket) { - CFSocketInvalidate(ipv4socket); - CFRelease(ipv4socket); - ipv4socket = NULL; - } - if (ipv6socket) { - CFSocketInvalidate(ipv6socket); - CFRelease(ipv6socket); - ipv6socket = NULL; - } - return YES; -} - -- (BOOL)hasIPv4Socket { - return ipv4socket != nil; -} - -- (BOOL)hasIPv6Socket { - return ipv6socket != nil; -} - -@end - -#pragma GCC diagnostic pop diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/macOS/OIDAuthState+Mac.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/macOS/OIDAuthState+Mac.h deleted file mode 100644 index e412a788..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/macOS/OIDAuthState+Mac.h +++ /dev/null @@ -1,45 +0,0 @@ -/*! @file OIDAuthState+Mac.h - @brief AppAuth iOS SDK - @copyright - Copyright 2016 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDAuthState.h" - -NS_ASSUME_NONNULL_BEGIN - -/*! @brief macOS specific convenience methods for @c OIDAuthState. - */ -@interface OIDAuthState (Mac) - -/*! @brief Convenience method to create a @c OIDAuthState by presenting an authorization request - and performing the authorization code exchange in the case of code flow requests. For - the hybrid flow, the caller should validate the id_token and c_hash, then perform the token - request (@c OIDAuthorizationService.performTokenRequest:callback:) - and update the OIDAuthState with the results (@c - OIDAuthState.updateWithTokenResponse:error:). - @param authorizationRequest The authorization request to present. - @param callback The method called when the request has completed or failed. - @return A @c OIDExternalUserAgentSession instance which will terminate when it - receives a @c OIDExternalUserAgentSession.cancel message, or after processing a - @c OIDExternalUserAgentSession.resumeExternalUserAgentFlowWithURL: message. - */ -+ (id) - authStateByPresentingAuthorizationRequest:(OIDAuthorizationRequest *)authorizationRequest - callback:(OIDAuthStateAuthorizationCallback)callback; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/macOS/OIDAuthState+Mac.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/macOS/OIDAuthState+Mac.m deleted file mode 100644 index ce99a737..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/macOS/OIDAuthState+Mac.m +++ /dev/null @@ -1,34 +0,0 @@ -/*! @file OIDAuthState+Mac.m - @brief AppAuth iOS SDK - @copyright - Copyright 2016 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDAuthState+Mac.h" - -#import "OIDExternalUserAgentMac.h" - -@implementation OIDAuthState (Mac) - -+ (id) - authStateByPresentingAuthorizationRequest:(OIDAuthorizationRequest *)authorizationRequest - callback:(OIDAuthStateAuthorizationCallback)callback { - OIDExternalUserAgentMac *externalUserAgent = [[OIDExternalUserAgentMac alloc] init]; - return [self authStateByPresentingAuthorizationRequest:authorizationRequest - externalUserAgent:externalUserAgent - callback:callback]; -} - -@end diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/macOS/OIDAuthorizationService+Mac.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/macOS/OIDAuthorizationService+Mac.h deleted file mode 100644 index 405d25ce..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/macOS/OIDAuthorizationService+Mac.h +++ /dev/null @@ -1,39 +0,0 @@ -/*! @file OIDAuthorizationService+Mac.h - @brief AppAuth iOS SDK - @copyright - Copyright 2016 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDAuthorizationService.h" - -NS_ASSUME_NONNULL_BEGIN - -/*! @brief Provides macOS specific authorization request handling. - */ -@interface OIDAuthorizationService (Mac) - -/*! @brief Perform an authorization flow using the default browser. - @param request The authorization request. - @param callback The method called when the request has completed or failed. - @return A @c OIDExternalUserAgentSession instance which will terminate when it - receives a @c OIDExternalUserAgentSession.cancel message, or after processing a - @c OIDExternalUserAgentSession.resumeExternalUserAgentFlowWithURL: message. - */ -+ (id)presentAuthorizationRequest:(OIDAuthorizationRequest *)request - callback:(OIDAuthorizationCallback)callback; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/macOS/OIDAuthorizationService+Mac.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/macOS/OIDAuthorizationService+Mac.m deleted file mode 100644 index 78139425..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/macOS/OIDAuthorizationService+Mac.m +++ /dev/null @@ -1,37 +0,0 @@ -/*! @file OIDAuthorizationService+Mac.m - @brief AppAuth iOS SDK - @copyright - Copyright 2016 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDAuthorizationService+Mac.h" - -#import "OIDExternalUserAgentMac.h" - -NS_ASSUME_NONNULL_BEGIN - -@implementation OIDAuthorizationService (Mac) - -+ (id) presentAuthorizationRequest:(OIDAuthorizationRequest *)request - callback:(OIDAuthorizationCallback)callback { - OIDExternalUserAgentMac *externalUserAgent = [[OIDExternalUserAgentMac alloc] init]; - return [self presentAuthorizationRequest:request - externalUserAgent:externalUserAgent - callback:callback]; -} - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/macOS/OIDExternalUserAgentMac.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/macOS/OIDExternalUserAgentMac.h deleted file mode 100644 index ed2d2c27..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/macOS/OIDExternalUserAgentMac.h +++ /dev/null @@ -1,30 +0,0 @@ -/*! @file OIDExternalUserAgentMac.h - @brief AppAuth iOS SDK - @copyright - Copyright 2016 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDExternalUserAgent.h" - -NS_ASSUME_NONNULL_BEGIN - -/*! @brief A Mac-specific external user-agent UI Coordinator that uses the default browser to - present an external user-agent request. - */ -@interface OIDExternalUserAgentMac : NSObject - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/macOS/OIDExternalUserAgentMac.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/macOS/OIDExternalUserAgentMac.m deleted file mode 100644 index d064f406..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/macOS/OIDExternalUserAgentMac.m +++ /dev/null @@ -1,74 +0,0 @@ -/*! @file OIDExternalUserAgentMac.m - @brief AppAuth iOS SDK - @copyright - Copyright 2016 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDExternalUserAgentMac.h" - -#import - -#import "OIDErrorUtilities.h" -#import "OIDExternalUserAgentSession.h" -#import "OIDExternalUserAgentRequest.h" - -NS_ASSUME_NONNULL_BEGIN - -@implementation OIDExternalUserAgentMac { - BOOL _externalUserAgentFlowInProgress; - __weak id _session; -} - -- (BOOL)presentExternalUserAgentRequest:(id)request - session:(id)session { - if (_externalUserAgentFlowInProgress) { - // TODO: Handle errors as authorization is already in progress. - return NO; - } - - _externalUserAgentFlowInProgress = YES; - _session = session; - NSURL *requestURL = [request externalUserAgentRequestURL]; - - BOOL openedBrowser = [[NSWorkspace sharedWorkspace] openURL:requestURL]; - if (!openedBrowser) { - [self cleanUp]; - NSError *safariError = [OIDErrorUtilities errorWithCode:OIDErrorCodeBrowserOpenError - underlyingError:nil - description:@"Unable to open the browser."]; - [session failExternalUserAgentFlowWithError:safariError]; - } - return openedBrowser; -} - -- (void)dismissExternalUserAgentAnimated:(BOOL)animated completion:(void (^)(void))completion { - if (!_externalUserAgentFlowInProgress) { - // Ignore this call if there is no authorization flow in progress. - return; - } - // Ideally the browser tab with the URL should be closed here, but the AppAuth library does not - // control the browser. - [self cleanUp]; - if (completion) completion(); -} - -- (void)cleanUp { - _session = nil; - _externalUserAgentFlowInProgress = NO; -} - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/macOS/OIDRedirectHTTPHandler.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/macOS/OIDRedirectHTTPHandler.h deleted file mode 100644 index 50b6584f..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/macOS/OIDRedirectHTTPHandler.h +++ /dev/null @@ -1,71 +0,0 @@ -/*! @file OIDRedirectHTTPHandler.h - @brief AppAuth iOS SDK - @copyright - Copyright 2016 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -NS_ASSUME_NONNULL_BEGIN - -@protocol OIDExternalUserAgentSession; - -/*! @brief Start a HTTP server on the loopback interface (i.e. @c 127.0.0.1) to receive the OAuth - response redirects on macOS. - */ -@interface OIDRedirectHTTPHandler : NSObject - -/*! @brief The external user-agent request flow session which receives the return URL from the - browser. - @discussion The loopback HTTP server will try sending incoming request URLs to the OAuth - redirect handler to continue the flow. This should be set while an external user-agent - request flow is in progress. - */ -@property(nonatomic, strong, nullable) id currentAuthorizationFlow; - -/*! @brief Creates an a loopback HTTP redirect URI handler with the given success URL. - @param successURL The URL that the user is redirected to after the external user-agent request flow completes - either with a result of success or error. The contents of this page should instruct the user - to return to the app. - @discussion Once you have initiated the external user-agent request, be sure to set - @c currentAuthorizationFlow on this object so that any responses received by this listener will - be routed accordingly. - */ -- (instancetype)initWithSuccessURL:(nullable NSURL *)successURL; - -/*! @brief Starts listening on the loopback interface on a random available port, and returns a URL - with the base address. Use the returned redirect URI to build a @c OIDExternalUserAgentRequest, - and once you initiate the request, set the resulting @c OIDExternalUserAgentSession to - @c currentAuthorizationFlow so the response can be handled. - @param error The error if an error occurred while starting the local HTTP server. - @return The URL containing the address of the server with the randomly assigned available port. - @discussion Each instance of @c OIDRedirectHTTPHandler can only listen for a single response. - Calling this more than once will result in the previous listener being cancelled (equivalent - of @c cancelHTTPListener being called). - */ -- (NSURL *)startHTTPListener:(NSError **)error; - -/*! @brief Stops listening the loopback interface and sends an cancellation error (in the domain - ::OIDGeneralErrorDomain, with the code ::OIDErrorCodeProgramCanceledAuthorizationFlow) to - the @c currentAuthorizationFlow. Has no effect if called when no requests are pending. - @discussion The HTTP listener is stopped automatically on receiving a valid response (regardless - of whether the request succeeded or not), this method should not be called except when - abandoning the external user-agent request. - */ -- (void)cancelHTTPListener; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/macOS/OIDRedirectHTTPHandler.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/macOS/OIDRedirectHTTPHandler.m deleted file mode 100644 index 28953ad0..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/Source/macOS/OIDRedirectHTTPHandler.m +++ /dev/null @@ -1,165 +0,0 @@ -/*! @file OIDRedirectHTTPHandler.m - @brief AppAuth iOS SDK - @copyright - Copyright 2016 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDRedirectHTTPHandler.h" - -#import "OIDAuthorizationService.h" -#import "OIDErrorUtilities.h" -#import "OIDExternalUserAgentSession.h" -#import "OIDLoopbackHTTPServer.h" - -/*! @brief Page that is returned following a completed authorization. Show your own page instead by - supplying a URL in @c initWithSuccessURL that the user will be redirected to. - */ -static NSString *const kHTMLAuthorizationComplete = - @"Authorization complete.
Return to the app."; - -/*! @brief Error warning that the @c currentAuthorizationFlow is not set on this object (likely a - developer error, unless the user stumbled upon the loopback server before the authorization - had started completely). - @description An object conforming to @c OIDExternalUserAgentSession is returned when the - authorization is presented with - @c OIDAuthorizationService::presentAuthorizationRequest:callback:. It should be set to - @c currentAuthorization when using a loopback redirect. - */ -static NSString *const kHTMLErrorMissingCurrentAuthorizationFlow = - @"AppAuth Error: No currentAuthorizationFlow is set on the " - "OIDRedirectHTTPHandler. Cannot process redirect."; - -/*! @brief Error warning that the URL does not represent a valid redirect. This should be rare, may - happen if the user stumbles upon the loopback server randomly. - */ -static NSString *const kHTMLErrorRedirectNotValid = - @"AppAuth Error: Not a valid redirect."; - -@implementation OIDRedirectHTTPHandler { - HTTPServer *_httpServ; - NSURL *_successURL; -} - -- (instancetype)init { - return [self initWithSuccessURL:nil]; -} - -- (instancetype)initWithSuccessURL:(nullable NSURL *)successURL { - self = [super init]; - if (self) { - _successURL = [successURL copy]; - } - return self; -} - -- (NSURL *)startHTTPListener:(NSError **)returnError { - // Cancels any pending requests. - [self cancelHTTPListener]; - - // Starts a HTTP server on the loopback interface. - // By not specifying a port, a random available one will be assigned. - _httpServ = [[HTTPServer alloc] init]; - [_httpServ setDelegate:self]; - NSError *error = nil; - if (![_httpServ start:&error]) { - if (returnError) { - *returnError = error; - } - return nil; - } else if ([_httpServ hasIPv4Socket]) { - // Prefer the IPv4 loopback address - NSString *serverURL = [NSString stringWithFormat:@"http://127.0.0.1:%d/", [_httpServ port]]; - return [NSURL URLWithString:serverURL]; - } else if ([_httpServ hasIPv6Socket]) { - // Use the IPv6 loopback address if IPv4 isn't available - NSString *serverURL = [NSString stringWithFormat:@"http://[::1]:%d/", [_httpServ port]]; - return [NSURL URLWithString:serverURL]; - } - - return nil; -} - -- (void)cancelHTTPListener { - [self stopHTTPListener]; - - // Cancels the pending authorization flow (if any) with error. - NSError *cancelledError = - [OIDErrorUtilities errorWithCode:OIDErrorCodeProgramCanceledAuthorizationFlow - underlyingError:nil - description:@"The HTTP listener was cancelled programmatically."]; - [_currentAuthorizationFlow failExternalUserAgentFlowWithError:cancelledError]; - _currentAuthorizationFlow = nil; -} - -/*! @brief Stops listening on the loopback interface without modifying the state of the - @c currentAuthorizationFlow. Should be called when the authorization flow completes or is - cancelled. - */ -- (void)stopHTTPListener { - _httpServ.delegate = nil; - [_httpServ stop]; - _httpServ = nil; -} - -- (void)HTTPConnection:(HTTPConnection *)conn didReceiveRequest:(HTTPServerRequest *)mess { - // Sends URL to AppAuth. - CFURLRef url = CFHTTPMessageCopyRequestURL(mess.request); - BOOL handled = [_currentAuthorizationFlow resumeExternalUserAgentFlowWithURL:(__bridge NSURL *)url]; - - // Stops listening to further requests after the first valid authorization response. - if (handled) { - _currentAuthorizationFlow = nil; - [self stopHTTPListener]; - } - - // Responds to browser request. - NSString *bodyText = kHTMLAuthorizationComplete; - NSInteger httpResponseCode = (_successURL) ? 302 : 200; - // Returns an error page if a URL other than the expected redirect is requested. - if (!handled) { - if (_currentAuthorizationFlow) { - bodyText = kHTMLErrorRedirectNotValid; - httpResponseCode = 404; - } else { - bodyText = kHTMLErrorMissingCurrentAuthorizationFlow; - httpResponseCode = 400; - } - } - NSData *data = [bodyText dataUsingEncoding:NSUTF8StringEncoding]; - - CFHTTPMessageRef response = CFHTTPMessageCreateResponse(kCFAllocatorDefault, - httpResponseCode, - NULL, - kCFHTTPVersion1_1); - if (httpResponseCode == 302) { - CFHTTPMessageSetHeaderFieldValue(response, - (__bridge CFStringRef)@"Location", - (__bridge CFStringRef)_successURL.absoluteString); - } - CFHTTPMessageSetHeaderFieldValue(response, - (__bridge CFStringRef)@"Content-Length", - (__bridge CFStringRef)[NSString stringWithFormat:@"%lu", - (unsigned long)data.length]); - CFHTTPMessageSetBody(response, (__bridge CFDataRef)data); - - [mess setResponse:response]; - CFRelease(response); -} - -- (void)dealloc { - [self cancelHTTPListener]; -} - -@end diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDAppAuthTests-Bridging-Header.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDAppAuthTests-Bridging-Header.h deleted file mode 100644 index 5ebc7886..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDAppAuthTests-Bridging-Header.h +++ /dev/null @@ -1,21 +0,0 @@ -/*! @file OIDAppAuthTests-Bridging-Header.h - @brief AppAuth iOS SDK - @copyright - Copyright 2017 The AppAuth for iOS Authors. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -// Public headers exposed to Swift. - -#import "AppAuth.h" diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDAuthStateTests.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDAuthStateTests.h deleted file mode 100644 index 5be7d605..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDAuthStateTests.h +++ /dev/null @@ -1,38 +0,0 @@ -/*! @file OIDAuthStateTests.h - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -#import "Source/OIDAuthStateChangeDelegate.h" -#import "Source/OIDAuthStateErrorDelegate.h" - -@class OIDAuthState; - -NS_ASSUME_NONNULL_BEGIN - -/*! @brief Unit tests for @c OIDAuthState. - */ -@interface OIDAuthStateTests : XCTestCase - -/*! @brief Creates a new @c OIDAuthState for testing. - */ -+ (OIDAuthState *)testInstance; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDAuthStateTests.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDAuthStateTests.m deleted file mode 100644 index 97d3caa0..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDAuthStateTests.m +++ /dev/null @@ -1,434 +0,0 @@ -/*! @file OIDAuthStateTests.m - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDAuthStateTests.h" - -#import "OIDAuthorizationResponseTests.h" -#import "OIDRegistrationResponseTests.h" -#import "OIDTokenResponseTests.h" -#import "Source/OIDAuthState.h" -#import "Source/OIDAuthorizationResponse.h" -#import "Source/OIDErrorUtilities.h" -#import "Source/OIDRegistrationResponse.h" -#import "Source/OIDTokenResponse.h" -#import "OIDTokenRequestTests.h" - -// Ignore warnings about "Use of GNU statement expression extension" which is raised by our use of -// the XCTAssert___ macros. -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wgnu" - -@interface OIDAuthState (Testing) - // expose private method for simple testing -- (BOOL)isTokenFresh; -@end - -@interface OIDAuthStateTests () -@end - -@implementation OIDAuthStateTests { - /*! @brief An expectation for tests waiting on OIDAuthStateChangeDelegate.didChangeState:. - */ - XCTestExpectation *_didChangeStateExpectation; - - /*! @brief An expectation for tests waiting on - OIDAuthStateErrorDelegate.didEncounterAuthorizationError:. - */ - XCTestExpectation *_didEncounterAuthorizationErrorExpectation; - - /*! @brief An expectation for tests waiting on - OIDAuthStateErrorDelegate.didEncounterTransientError:. - */ - XCTestExpectation *_didEncounterTransientErrorExpectation; -} - -+ (OIDAuthState *)testInstance { - OIDAuthorizationResponse *authorizationResponse = - [OIDAuthorizationResponseTests testInstanceCodeFlow]; - OIDTokenResponse *tokenResponse = [OIDTokenResponseTests testInstanceCodeExchange]; - OIDAuthState *authstate = - [[OIDAuthState alloc] initWithAuthorizationResponse:authorizationResponse - tokenResponse:tokenResponse]; - return authstate; -} - -/*! @brief NSError for an invalid_request on the authorization endpoint. - */ -+ (NSError *)OAuthAuthorizationError { - NSError *oauthError = - [OIDErrorUtilities OAuthErrorWithDomain:OIDOAuthAuthorizationErrorDomain - OAuthResponse:@{@"error": @"invalid_request"} - underlyingError:nil]; - return oauthError; -} - -/*! @param underlyingError The underlying error, or nil. - @brief NSError for an invalid_grant error on the token endpoint. - */ -+ (NSError *)OAuthTokenInvalidGrantErrorWithUnderlyingError:(NSError *)underlyingError { - NSError *oauthError = - [OIDErrorUtilities OAuthErrorWithDomain:OIDOAuthTokenErrorDomain - OAuthResponse:@{@"error": @"invalid_grant"} - underlyingError:underlyingError]; - return oauthError; -} - -/*! @brief NSError for an invalid_client error on the token endpoint. - */ -+ (NSError *)OAuthTokenInvalidClientError { - NSError *oauthError = - [OIDErrorUtilities OAuthErrorWithDomain:OIDOAuthTokenErrorDomain - OAuthResponse:@{@"error": @"invalid_client"} - underlyingError:nil]; - return oauthError; -} - -#pragma mark OIDAuthStateChangeDelegate methods - -- (void)didChangeState:(OIDAuthState *)state { - // in this test, this method should only be called when we expect it - XCTAssertNotNil(_didChangeStateExpectation, @""); - - [_didChangeStateExpectation fulfill]; -} - -#pragma mark OIDAuthStateErrorDelegate methods - -- (void)authState:(OIDAuthState *)state didEncounterAuthorizationError:(NSError *)error { - // in this test, this method should only be called when we expect it - XCTAssertNotNil(_didEncounterAuthorizationErrorExpectation, @""); - - [_didEncounterAuthorizationErrorExpectation fulfill]; -} - -- (void)tearDown { - _didChangeStateExpectation = nil; - _didEncounterAuthorizationErrorExpectation = nil; - _didEncounterTransientErrorExpectation = nil; - - [super tearDown]; -} - -#pragma mark Tests - -/*! @brief Tests that the isAuthorized state is correctly reflected when updated with an error. - */ -- (void)testErrorState { - OIDAuthState *authstate = [[self class] testInstance]; - - // starting state should be authorized - XCTAssert([authstate isAuthorized], @""); - XCTAssertFalse([authstate authorizationError], @""); - - NSError *oauthError = [[self class] OAuthTokenInvalidGrantErrorWithUnderlyingError:nil]; - - [authstate updateWithAuthorizationError:oauthError]; - - // after updating with an error, should no longer be authorized - XCTAssertFalse([authstate isAuthorized], @""); - XCTAssert([authstate authorizationError], @""); -} - -/*! @brief Tests that the didChangeState delegate is called. - */ -- (void)testStateChangeDelegates { - _didChangeStateExpectation = [self expectationWithDescription: - @"OIDAuthStateChangeDelegate.didChangeState: should be called."]; - - OIDAuthState *authstate = [[self class] testInstance]; - authstate.stateChangeDelegate = self; - - NSError *oauthError = [[self class] OAuthTokenInvalidGrantErrorWithUnderlyingError:nil]; - [authstate updateWithAuthorizationError:oauthError]; - - [self waitForExpectationsWithTimeout:2 handler:nil]; -} - -/*! @brief Tests that the isAuthorized state is correctly reflected when updated with an error. - */ -- (void)testErrorDelegates { - OIDAuthState *authstate = [[self class] testInstance]; - authstate.errorDelegate = self; - - // test invalid_grant error - _didEncounterAuthorizationErrorExpectation = [self expectationWithDescription: - @"OIDAuthStateErrorDelegate.authState:didEncounterAuthorizationErrorExpectation: delegate " - "should be called for invalid_grant error."]; - NSError *oauthErrorInvalidGrant = - [[self class] OAuthTokenInvalidGrantErrorWithUnderlyingError:nil]; - [authstate updateWithAuthorizationError:oauthErrorInvalidGrant]; - // waits for OIDAuthStateErrorDelegate.authState:didEncounterInvalidGrantError: - [self waitForExpectationsWithTimeout:2 handler:nil]; - - // test invalid_client error - _didEncounterAuthorizationErrorExpectation = [self expectationWithDescription: - @"OIDAuthStateErrorDelegate.authState:didEncounterAuthorizationErrorExpectation: delegate " - "should be called for invalid_client error."]; - NSError *oauthErrorInvalidClient = [[self class] OAuthTokenInvalidClientError]; - [authstate updateWithAuthorizationError:oauthErrorInvalidClient]; - - // waits for OIDAuthStateErrorDelegate.authState:didEncounterAuthorizationErrorExpectation: - [self waitForExpectationsWithTimeout:2 handler:nil]; - _didEncounterAuthorizationErrorExpectation = nil; -} - -/*! @brief Tests archiving OIDAuthState after sending it an NSError object that isn't NSCoding - compliant. - */ -- (void)testNonCompliantNSCodingNSErrors { - OIDAuthState *authstate = [[self class] testInstance]; - NSError *nonCompliantError = [NSError errorWithDomain:@"domain" - code:1 - userInfo:@{@"object": [[NSObject alloc] init]}]; - NSError *oauthError = - [[self class] OAuthTokenInvalidGrantErrorWithUnderlyingError:nonCompliantError]; - [authstate updateWithAuthorizationError:oauthError]; - XCTAssertNoThrow([NSKeyedArchiver archivedDataWithRootObject:authstate], @""); -} - -/*! @brief Tests @c OIDAuthState.updateWithAuthorizationResponse:error: with a success response. - */ -- (void)testUpdateWithAuthorizationResponseSuccess { - OIDAuthState *authState = [[self class] testInstance]; - OIDAuthorizationResponse *authorizationResponse = - [OIDAuthorizationResponseTests testInstanceCodeFlow]; - [authState updateWithAuthorizationResponse:authorizationResponse error:nil]; - XCTAssertEqual(authState.lastAuthorizationResponse, authorizationResponse, @""); - XCTAssertNil(authState.authorizationError, @""); -} - -/*! @brief Tests @c OIDAuthState.updateWithAuthorizationResponse:error: with an authorization - error. - */ -- (void)testUpdateWithAuthorizationResponseOAuthError { - OIDAuthState *authState = [[self class] testInstance]; - NSError *oauthError = [[self class] OAuthAuthorizationError]; - [authState updateWithAuthorizationResponse:nil error:oauthError]; - XCTAssertNotNil(authState.authorizationError, @""); -} - -/*! @brief Tests @c OIDAuthState.updateWithAuthorizationResponse:error: with a transient - (non-OAuth) error. - */ -- (void)testUpdateWithAuthorizationResponseTransientError { - OIDAuthState *authState = [[self class] testInstance]; - NSError *transientError = [[NSError alloc] init]; - [authState updateWithAuthorizationResponse:nil error:transientError]; - XCTAssertNil(authState.authorizationError, @""); -} - -/*! @brief Tests @c OIDAuthState.updateWithAuthorizationResponse:error: with both a success - response and an authorization error. - */ -- (void)testUpdateWithAuthorizationResponseBothSuccessAndError { - OIDAuthState *authState = [[self class] testInstance]; - OIDAuthorizationResponse *authorizationResponse = - [OIDAuthorizationResponseTests testInstanceCodeFlow]; - NSError *oauthError = [[self class] OAuthAuthorizationError]; - [authState updateWithAuthorizationResponse:authorizationResponse error:oauthError]; - XCTAssertNotNil(authState.authorizationError, @""); -} - -/*! @brief Tests @c OIDAuthState.updateWithRegistrationResponse: with a success response. - */ -- (void)testupdateWithRegistrationResponse { - OIDAuthState *authState = [[self class] testInstance]; - OIDRegistrationResponse *registrationResponse = [OIDRegistrationResponseTests testInstance]; - [authState updateWithRegistrationResponse:registrationResponse]; - XCTAssertEqualObjects(authState.lastRegistrationResponse, registrationResponse); - XCTAssertNil(authState.refreshToken); - XCTAssertNil(authState.scope); - XCTAssertNil(authState.lastAuthorizationResponse); - XCTAssertNil(authState.authorizationError); - XCTAssertFalse(authState.isAuthorized); -} - -/*! @brief Tests @c OIDAuthState.updateWithTokenResponse:error: with a success response. - */ -- (void)testUpdateWithTokenResponseSuccess { - OIDAuthState *authState = [[self class] testInstance]; - OIDTokenResponse *tokenResponse = [OIDTokenResponseTests testInstanceRefresh]; - [authState updateWithTokenResponse:tokenResponse error:nil]; - XCTAssertEqual(authState.lastTokenResponse, tokenResponse, @""); - XCTAssertNotNil(authState.refreshToken, @""); - XCTAssertTrue(authState.isAuthorized, @""); - XCTAssertNil(authState.authorizationError, @""); -} - -/*! @brief Tests @c OIDAuthState.updateWithTokenResponse:error: with an authorization error. - */ -- (void)testUpdateWithTokenResponseOAuthError { - OIDAuthState *authState = [[self class] testInstance]; - NSError *oauthError = [[self class] OAuthTokenInvalidGrantErrorWithUnderlyingError:nil]; - [authState updateWithTokenResponse:nil error:oauthError]; - XCTAssertFalse(authState.isAuthorized, @""); - XCTAssertNotNil(authState.authorizationError, @""); -} - -/*! @brief Tests @c OIDAuthState.updateWithTokenResponse:error: with a transient (non-OAuth) error. - */ -- (void)testUpdateWithTokenResponseTransientError { - OIDAuthState *authState = [[self class] testInstance]; - NSError *transientError = [[NSError alloc] init]; - [authState updateWithTokenResponse:nil error:transientError]; - XCTAssertNotNil(authState.lastTokenResponse, @""); - XCTAssertNotNil(authState.refreshToken, @""); - XCTAssertTrue(authState.isAuthorized, @""); - XCTAssertNil(authState.authorizationError, @""); -} - -/*! @brief Tests @c OIDAuthState.updateWithTokenResponse:error: with both a success response - and an authorization error. - */ -- (void)testUpdateWithTokenResponseBothSuccessAndError { - OIDAuthState *authState = [[self class] testInstance]; - OIDTokenResponse *tokenResponse = [OIDTokenResponseTests testInstanceRefresh]; - NSError *oauthError = [[self class] OAuthTokenInvalidGrantErrorWithUnderlyingError:nil]; - [authState updateWithTokenResponse:tokenResponse error:oauthError]; - XCTAssertFalse(authState.isAuthorized, @""); - XCTAssertNotNil(authState.authorizationError, @""); -} - -/*! @brief Full lifecycle test of the code flow from code exchange, refresh, error and re-auth. - */ -- (void)testCodeFlowLifecycle { - OIDAuthorizationResponse *authorizationResponse = - [OIDAuthorizationResponseTests testInstanceCodeFlow]; - - // initializes from code flow authorization response - OIDAuthState *authState = - [[OIDAuthState alloc] initWithAuthorizationResponse:authorizationResponse]; - XCTAssertEqual(authState.lastAuthorizationResponse, authorizationResponse, @""); - XCTAssertFalse(authState.isAuthorized, - @"Shouldn't be authorized as the code needs to be exchanged"); - - // updates with result from token exchange - OIDTokenResponse *tokenResponseCodeExchange = [OIDTokenResponseTests testInstanceCodeExchange]; - [authState updateWithTokenResponse:tokenResponseCodeExchange error:nil]; - XCTAssertEqual(authState.lastTokenResponse, tokenResponseCodeExchange, @""); - XCTAssertTrue(authState.isAuthorized, @""); - - // updates with code refresh - OIDTokenResponse *tokenResponseRefresh = [OIDTokenResponseTests testInstanceRefresh]; - [authState updateWithTokenResponse:tokenResponseRefresh error:nil]; - XCTAssertEqual(authState.lastTokenResponse, tokenResponseRefresh, @""); - XCTAssertTrue(authState.isAuthorized, @""); - - // simulates token error (invalid_grant, token revoked) - NSError *oauthError = [[self class] OAuthTokenInvalidGrantErrorWithUnderlyingError:nil]; - [authState updateWithTokenResponse:nil error:oauthError]; - XCTAssertFalse(authState.isAuthorized, @""); - XCTAssertNotNil(authState.authorizationError, @""); - - // simulates successful re-auth response - [authState updateWithAuthorizationResponse:authorizationResponse error:nil]; - XCTAssertEqual(authState.lastAuthorizationResponse, authorizationResponse, @""); - XCTAssertNil(authState.authorizationError, @"Error should be nil now."); - XCTAssertFalse(authState.isAuthorized, - @"Since this is the code flow, AuthState should still not be isAuthorized."); - - // updates with result from token exchange - [authState updateWithTokenResponse:tokenResponseCodeExchange error:nil]; - XCTAssertEqual(authState.lastTokenResponse, tokenResponseCodeExchange, @""); - XCTAssertTrue(authState.isAuthorized, @"Should be in an authorized state now"); -} - -- (void)testSecureCoding { - XCTAssert([OIDAuthState supportsSecureCoding], @""); - - OIDAuthState *authState = [[self class] testInstance]; - NSData *data = [NSKeyedArchiver archivedDataWithRootObject:authState]; - OIDAuthState *authStateCopy = [NSKeyedUnarchiver unarchiveObjectWithData:data]; - - XCTAssertEqualObjects(authStateCopy.refreshToken, authState.refreshToken, @""); - XCTAssertEqualObjects(authStateCopy.scope, authState.scope, @""); - XCTAssertEqualObjects(authStateCopy.lastAuthorizationResponse.authorizationCode, - authState.lastAuthorizationResponse.authorizationCode, @""); - XCTAssertEqualObjects(authStateCopy.lastTokenResponse.refreshToken, - authState.lastTokenResponse.refreshToken, @""); - XCTAssertEqualObjects(authStateCopy.authorizationError.domain, - authState.authorizationError.domain, @""); - XCTAssertEqual(authStateCopy.authorizationError.code, authState.authorizationError.code, @""); - XCTAssertEqual(authStateCopy.isAuthorized, authState.isAuthorized, @""); - - // Verify the error object is indeed restored. - NSError *oauthError = [[self class] OAuthTokenInvalidGrantErrorWithUnderlyingError:nil]; - [authState updateWithTokenResponse:nil error:oauthError]; - data = [NSKeyedArchiver archivedDataWithRootObject:authState]; - XCTAssertNotNil(authState.authorizationError, @""); - authStateCopy = [NSKeyedUnarchiver unarchiveObjectWithData:data]; - XCTAssertEqualObjects(authStateCopy.authorizationError.domain, - authState.authorizationError.domain, @""); - XCTAssertEqual(authStateCopy.authorizationError.code, authState.authorizationError.code, @""); -} - -- (void)testIsTokenFreshWithFreshToken { - OIDAuthorizationResponse *authorizationResponse = - [OIDAuthorizationResponseTests testInstanceCodeFlow]; - OIDTokenRequest *tokenRequest = [OIDTokenRequestTests testInstance]; - OIDTokenResponse *tokenResponse = - [[OIDTokenResponse alloc] initWithRequest:tokenRequest - parameters:@{@"access_token": @"abc123", - @"expires_in": @(3600) - }]; - - OIDAuthState *authState = - [[OIDAuthState alloc] initWithAuthorizationResponse:authorizationResponse - tokenResponse:tokenResponse]; - XCTAssertEqual([authState isTokenFresh], YES, @""); -} - -- (void)testIsTokenFreshWithExpiredToken { - OIDAuthorizationResponse *authorizationResponse = - [OIDAuthorizationResponseTests testInstanceCodeFlow]; - OIDTokenRequest *tokenRequest = [OIDTokenRequestTests testInstance]; - OIDTokenResponse *tokenResponse = - [[OIDTokenResponse alloc] initWithRequest:tokenRequest - parameters:@{@"access_token": @"abc123", - @"expires_in": @(0) - }]; - - OIDAuthState *authState = - [[OIDAuthState alloc] initWithAuthorizationResponse:authorizationResponse - tokenResponse:tokenResponse]; - XCTAssertEqual([authState isTokenFresh], NO, @""); -} - -- (void)testIsTokenFreshRespectsTokenRefreshOverride { - OIDAuthState *authState = [[self class] testInstance]; - [authState setNeedsTokenRefresh]; - XCTAssertEqual([authState isTokenFresh], NO, @""); -} - -- (void)testIsTokenFreshHandlesTokenWithoutExpirationTime { - OIDAuthorizationResponse *authorizationResponse = - [OIDAuthorizationResponseTests testInstanceCodeFlow]; - OIDTokenRequest *tokenRequest = [OIDTokenRequestTests testInstance]; - OIDTokenResponse *tokenResponse = - [[OIDTokenResponse alloc] initWithRequest:tokenRequest - parameters:@{ @"access_token": @"abc123" }]; - - OIDAuthState *authState = - [[OIDAuthState alloc] initWithAuthorizationResponse:authorizationResponse - tokenResponse:tokenResponse]; - XCTAssertEqual([authState isTokenFresh], YES, @""); -} - -@end - -#pragma GCC diagnostic pop diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDAuthorizationRequestTests.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDAuthorizationRequestTests.h deleted file mode 100644 index db387d5b..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDAuthorizationRequestTests.h +++ /dev/null @@ -1,44 +0,0 @@ -/*! @file OIDAuthorizationRequestTests.h - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -@class OIDAuthorizationRequest; - -NS_ASSUME_NONNULL_BEGIN - -/*! @brief Unit tests for @c OIDAuthorizationRequest. - */ -@interface OIDAuthorizationRequestTests : XCTestCase - -/*! @brief Creates a new @c OIDAuthorizationRequest for testing. - */ -+ (OIDAuthorizationRequest *)testInstance; - -/*! @brief Creates a new @c OIDAuthorizationRequest testing a code flow request. - */ -+ (OIDAuthorizationRequest *)testInstanceCodeFlow; - -/*! @brief Creates a new @c OIDAuthorizationRequest testing a code flow request - with client authentication. - */ -+ (OIDAuthorizationRequest *)testInstanceCodeFlowClientAuth; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDAuthorizationRequestTests.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDAuthorizationRequestTests.m deleted file mode 100644 index 93b4f598..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDAuthorizationRequestTests.m +++ /dev/null @@ -1,529 +0,0 @@ -/*! @file OIDAuthorizationRequestTests.m - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDAuthorizationRequestTests.h" - -#import "OIDServiceConfigurationTests.h" -#import "Source/OIDAuthorizationRequest.h" -#import "Source/OIDScopeUtilities.h" -#import "Source/OIDServiceConfiguration.h" - -// Ignore warnings about "Use of GNU statement expression extension" which is raised by our use of -// the XCTAssert___ macros. -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wgnu" - -/*! @brief Test value for the @c responseType property. - */ -static NSString *const kTestResponseType = @"code"; - -/*! @brief Test value for the @c clientID property. - */ -static NSString *const kTestClientID = @"ClientID"; - -/*! @brief Test value for the @c clientID property. - */ -static NSString *const kTestClientSecret = @"ClientSecret"; - -/*! @brief Test value for the @c scope property. - */ -static NSString *const kTestScope = @"Scope"; - -/*! @brief Test value for the @c scope property. - */ -static NSString *const kTestScopeA = @"ScopeA"; - -/*! @brief Test value for the @c scope property. - */ -static NSString *const kTestScopesMerged = @"Scope ScopeA"; - -/*! @brief Test value for the @c redirectURL property. - */ -static NSString *const kTestRedirectURL = @"http://www.google.com/"; - -/*! @brief Test key for the @c additionalParameters property. - */ -static NSString *const kTestAdditionalParameterKey = @"A"; - -/*! @brief Test value for the @c additionalParameters property. - */ -static NSString *const kTestAdditionalParameterValue = @"1"; - -/*! @brief Test value for the @c state property. - */ -static NSString *const kTestState = @"State"; - -/*! @brief Test value for the @c nonce property. - */ -static NSString *const kTestNonce = @"Nonce"; - -/*! @brief Test value for the @c codeVerifier property. - */ -static NSString *const kTestCodeVerifier = @"code verifier"; - -/*! @brief This test scope contains a character which is one character below the allowed character - range. - */ -static NSString *const kTestInvalidScope1 = @"\x20"; - -/*! @brief This test scope contains the double-quote character, which is one of two characters not - allowed from the general allowed characters range. - */ -static NSString *const kTestInvalidScope2 = @"\x22"; - -/*! @brief This test scope contains the second of two characters which is not allowed in the general - allowed characters range (the forward slash "\"). - */ -static NSString *const kTestInvalidScope3 = @"\x5C"; - -/*! @brief This test scope contains the character immediately after the allowed character range. - */ -static NSString *const kTestInvalidScope4 = @"\x7F"; - -/*! @brief This test scope contains a valid character from the allowed character range. - */ -static NSString *const kTestValidScope1 = @"\x21"; - -/*! @brief This test scope contains a valid character from the allowed character range. - */ -static NSString *const kTestValidScope2 = @"\x23"; - -/*! @brief This test scope contains a valid character from the allowed character range. - */ -static NSString *const kTestValidScope3 = @"\x5B"; - -/*! @brief This test scope contains a valid character from the allowed character range. - */ -static NSString *const kTestValidScope4 = @"\x5D"; - -/*! @brief This test scope contains a valid character from the allowed character range. - */ -static NSString *const kTestValidScope5 = @"\x7E"; - -/*! @brief The minimum length of the codeVerifier per the PKCE spec. - @see https://tools.ietf.org/html/rfc7636#section-4.1 - */ -static int const kCodeVerifierMinLength = 43; - -/*! @brief The maximum length of the codeVerifier per the PKCE spec. - @see https://tools.ietf.org/html/rfc7636#section-4.1 - */ -static int const kCodeVerifierMaxLength = 128; - -/*! @brief The RECOMMENDED length of the codeVerifier per the PKCE spec. - @see https://tools.ietf.org/html/rfc7636#section-4.1 - */ -static int const kCodeVerifierRecommendedLength = 43; - -@implementation OIDAuthorizationRequestTests - -+ (NSString *)codeChallenge { - return [OIDAuthorizationRequest codeChallengeS256ForVerifier:kTestCodeVerifier]; -} -+ (NSString *)codeChallengeMethod { - return OIDOAuthorizationRequestCodeChallengeMethodS256; -} - -+ (OIDAuthorizationRequest *)testInstance { - NSDictionary *additionalParameters = - @{ kTestAdditionalParameterKey : kTestAdditionalParameterValue }; - OIDServiceConfiguration *configuration = [OIDServiceConfigurationTests testInstance]; - OIDAuthorizationRequest *request = - [[OIDAuthorizationRequest alloc] initWithConfiguration:configuration - clientId:kTestClientID - clientSecret:kTestClientSecret - scope:[OIDScopeUtilities scopesWithArray:@[ kTestScope, kTestScopeA ]] - redirectURL:[NSURL URLWithString:kTestRedirectURL] - responseType:kTestResponseType - state:kTestState - nonce:kTestNonce - codeVerifier:kTestCodeVerifier - codeChallenge:[[self class] codeChallenge] - codeChallengeMethod:[[self class] codeChallengeMethod] - additionalParameters:additionalParameters]; - return request; -} - -+ (OIDAuthorizationRequest *)testInstanceCodeFlow { - OIDServiceConfiguration *configuration = [OIDServiceConfigurationTests testInstance]; - OIDAuthorizationRequest *request = - [[OIDAuthorizationRequest alloc] initWithConfiguration:configuration - clientId:kTestClientID - clientSecret:nil - scope:[OIDScopeUtilities scopesWithArray:@[ kTestScope, kTestScopeA ]] - redirectURL:[NSURL URLWithString:kTestRedirectURL] - responseType:OIDResponseTypeCode - state:kTestState - nonce:kTestNonce - codeVerifier:kTestCodeVerifier - codeChallenge:[[self class] codeChallenge] - codeChallengeMethod:[[self class] codeChallengeMethod] - additionalParameters:nil]; - return request; -} - -+ (OIDAuthorizationRequest *)testInstanceCodeFlowClientAuth { - OIDServiceConfiguration *configuration = [OIDServiceConfigurationTests testInstance]; - OIDAuthorizationRequest *request = - [[OIDAuthorizationRequest alloc] initWithConfiguration:configuration - clientId:kTestClientID - clientSecret:kTestClientSecret - scope:[OIDScopeUtilities scopesWithArray:@[ kTestScope, kTestScopeA ]] - redirectURL:[NSURL URLWithString:kTestRedirectURL] - responseType:OIDResponseTypeCode - state:kTestState - nonce:kTestNonce - codeVerifier:kTestCodeVerifier - codeChallenge:[[self class] codeChallenge] - codeChallengeMethod:[[self class] codeChallengeMethod] - additionalParameters:nil]; - return request; -} - -/*! @brief Tests the initializer which takes an array of scopes. - */ -- (void)testScopeInitializerWithManyScopesAndNoClientSecret { - NSDictionary *additionalParameters = - @{ kTestAdditionalParameterKey : kTestAdditionalParameterValue }; - OIDServiceConfiguration *configuration = [OIDServiceConfigurationTests testInstance]; - OIDAuthorizationRequest *request = - [[OIDAuthorizationRequest alloc] initWithConfiguration:configuration - clientId:kTestClientID - scopes:@[ kTestScope, kTestScopeA ] - redirectURL:[NSURL URLWithString:kTestRedirectURL] - responseType:OIDResponseTypeCode - additionalParameters:additionalParameters]; - - XCTAssertEqualObjects(request.responseType, @"code", @""); - XCTAssertEqualObjects(request.scope, kTestScopesMerged, @""); - XCTAssertEqualObjects(request.clientID, kTestClientID, @""); - XCTAssertEqualObjects(request.clientSecret, nil, @""); - XCTAssertEqualObjects(request.redirectURL, [NSURL URLWithString:kTestRedirectURL], @""); - XCTAssertEqualObjects(request.additionalParameters[kTestAdditionalParameterKey], - kTestAdditionalParameterValue, @""); -} - -- (void)testScopeInitializerWithManyScopesAndClientSecret { - NSDictionary *additionalParameters = - @{ kTestAdditionalParameterKey : kTestAdditionalParameterValue }; - OIDServiceConfiguration *configuration = [OIDServiceConfigurationTests testInstance]; - OIDAuthorizationRequest *request = - [[OIDAuthorizationRequest alloc] initWithConfiguration:configuration - clientId:kTestClientID - clientSecret:kTestClientSecret - scopes:@[ kTestScope, kTestScopeA ] - redirectURL:[NSURL URLWithString:kTestRedirectURL] - responseType:OIDResponseTypeCode - additionalParameters:additionalParameters]; - - XCTAssertEqualObjects(request.responseType, @"code", @""); - XCTAssertEqualObjects(request.scope, kTestScopesMerged, @""); - XCTAssertEqualObjects(request.clientID, kTestClientID, @""); - XCTAssertEqualObjects(request.clientSecret, kTestClientSecret, @""); - XCTAssertEqualObjects(request.redirectURL, [NSURL URLWithString:kTestRedirectURL], @""); - XCTAssertEqualObjects(request.additionalParameters[kTestAdditionalParameterKey], - kTestAdditionalParameterValue, @""); -} - -/*! @brief Tests the @c NSCopying implementation by round-tripping an instance through the copying - process and checking to make sure the source and destination instances are equivalent. - */ -- (void)testCopying { - OIDAuthorizationRequest *request = [[self class] testInstance]; - - XCTAssertEqualObjects(request.responseType, kTestResponseType, @""); - XCTAssertEqualObjects(request.scope, kTestScopesMerged, @""); - XCTAssertEqualObjects(request.clientID, kTestClientID, @""); - XCTAssertEqualObjects(request.clientSecret, kTestClientSecret, @""); - XCTAssertEqualObjects(request.redirectURL, [NSURL URLWithString:kTestRedirectURL], @""); - XCTAssertEqualObjects(request.state, kTestState, @""); - XCTAssertEqualObjects(request.nonce, kTestNonce, @""); - XCTAssertEqualObjects(request.codeVerifier, kTestCodeVerifier, @""); - XCTAssertEqualObjects(request.codeChallenge, [[self class] codeChallenge], @""); - XCTAssertEqualObjects(request.codeChallengeMethod, [[self class] codeChallengeMethod], @""); - XCTAssertEqualObjects(request.additionalParameters[kTestAdditionalParameterKey], - kTestAdditionalParameterValue, @""); - - OIDAuthorizationRequest *requestCopy = [request copy]; - - XCTAssertNotNil(requestCopy.configuration, @""); - XCTAssertEqualObjects(requestCopy.configuration, request.configuration, @""); - XCTAssertEqualObjects(requestCopy.responseType, request.responseType, @""); - XCTAssertEqualObjects(requestCopy.scope, request.scope, @""); - XCTAssertEqualObjects(requestCopy.clientID, request.clientID, @""); - XCTAssertEqualObjects(requestCopy.clientSecret, request.clientSecret, @""); - XCTAssertEqualObjects(requestCopy.redirectURL, request.redirectURL, @""); - XCTAssertEqualObjects(requestCopy.state, request.state, @""); - XCTAssertEqualObjects(requestCopy.codeVerifier, request.codeVerifier, @""); - XCTAssertEqualObjects(requestCopy.codeChallenge, request.codeChallenge, @""); - XCTAssertEqualObjects(requestCopy.codeChallengeMethod, request.codeChallengeMethod, @""); - XCTAssertEqualObjects(requestCopy.additionalParameters, - request.additionalParameters, @""); -} - -/*! @brief Tests the @c NSSecureCoding by round-tripping an instance through the coding process and - checking to make sure the source and destination instances are equivalent. - */ -- (void)testSecureCoding { - OIDAuthorizationRequest *request = [[self class] testInstance]; - - XCTAssertEqualObjects(request.responseType, kTestResponseType, @""); - XCTAssertEqualObjects(request.scope, kTestScopesMerged, @""); - XCTAssertEqualObjects(request.clientID, kTestClientID, @""); - XCTAssertEqualObjects(request.clientSecret, kTestClientSecret, @""); - XCTAssertEqualObjects(request.redirectURL, [NSURL URLWithString:kTestRedirectURL], @""); - XCTAssertEqualObjects(request.state, kTestState, @""); - XCTAssertEqualObjects(request.codeVerifier, kTestCodeVerifier, @""); - XCTAssertEqualObjects(request.codeChallenge, [[self class] codeChallenge], @""); - XCTAssertEqualObjects(request.codeChallengeMethod, [[self class] codeChallengeMethod], @""); - XCTAssertEqualObjects(request.additionalParameters[kTestAdditionalParameterKey], - kTestAdditionalParameterValue, @""); - - NSData *data = [NSKeyedArchiver archivedDataWithRootObject:request]; - OIDAuthorizationRequest *requestCopy = [NSKeyedUnarchiver unarchiveObjectWithData:data]; - - // Not a full test of the configuration deserialization, but should be sufficient as a smoke test - // to make sure the configuration IS actually getting serialized and deserialized in the - // NSSecureCoding implementation. We'll leave it up to the OIDServiceConfiguration tests to make - // sure the NSSecureCoding implementation of that class is correct. - XCTAssertNotNil(requestCopy.configuration, @""); - XCTAssertEqualObjects(requestCopy.configuration.authorizationEndpoint, - request.configuration.authorizationEndpoint, @""); - - XCTAssertEqualObjects(requestCopy.responseType, kTestResponseType, @""); - XCTAssertEqualObjects(requestCopy.scope, kTestScopesMerged, @""); - XCTAssertEqualObjects(requestCopy.clientID, kTestClientID, @""); - XCTAssertEqualObjects(requestCopy.redirectURL, [NSURL URLWithString:kTestRedirectURL], @""); - XCTAssertEqualObjects(requestCopy.state, kTestState, @""); - XCTAssertEqualObjects(requestCopy.codeVerifier, kTestCodeVerifier, @""); - XCTAssertEqualObjects(requestCopy.codeChallenge, [[self class] codeChallenge], @""); - XCTAssertEqualObjects(requestCopy.codeChallengeMethod, [[self class] codeChallengeMethod], @""); - XCTAssertEqualObjects(requestCopy.additionalParameters[kTestAdditionalParameterKey], - kTestAdditionalParameterValue, @""); -} - -/*! @brief Tests the scope string logic to make sure the disallowed characters are properly - enforced. - */ -- (void)testDisallowedCharactersInScopes { - NSURL *redirectURL = [NSURL URLWithString:kTestRedirectURL]; - OIDServiceConfiguration *configuration = [OIDServiceConfigurationTests testInstance]; - XCTAssertThrows( - [[OIDAuthorizationRequest alloc] initWithConfiguration:configuration - clientId:kTestClientID - scopes:@[ kTestInvalidScope1 ] - redirectURL:redirectURL - responseType:OIDResponseTypeCode - additionalParameters:nil], @""); - XCTAssertThrows( - [[OIDAuthorizationRequest alloc] initWithConfiguration:configuration - clientId:kTestClientID - scopes:@[ kTestInvalidScope2 ] - redirectURL:redirectURL - responseType:OIDResponseTypeCode - additionalParameters:nil], @""); - XCTAssertThrows( - [[OIDAuthorizationRequest alloc] initWithConfiguration:configuration - clientId:kTestClientID - scopes:@[ kTestInvalidScope3 ] - redirectURL:redirectURL - responseType:OIDResponseTypeCode - additionalParameters:nil], @""); - XCTAssertThrows( - [[OIDAuthorizationRequest alloc] initWithConfiguration:configuration - clientId:kTestClientID - scopes:@[ kTestInvalidScope4 ] - redirectURL:redirectURL - responseType:OIDResponseTypeCode - additionalParameters:nil], @""); - XCTAssertNoThrow( - [[OIDAuthorizationRequest alloc] initWithConfiguration:configuration - clientId:kTestClientID - scopes:@[ kTestValidScope1 ] - redirectURL:redirectURL - responseType:OIDResponseTypeCode - additionalParameters:nil], @""); - XCTAssertNoThrow( - [[OIDAuthorizationRequest alloc] initWithConfiguration:configuration - clientId:kTestClientID - scopes:@[ kTestValidScope2 ] - redirectURL:redirectURL - responseType:OIDResponseTypeCode - additionalParameters:nil], @""); - XCTAssertNoThrow( - [[OIDAuthorizationRequest alloc] initWithConfiguration:configuration - clientId:kTestClientID - scopes:@[ kTestValidScope3 ] - redirectURL:redirectURL - responseType:OIDResponseTypeCode - additionalParameters:nil], @""); - XCTAssertNoThrow( - [[OIDAuthorizationRequest alloc] initWithConfiguration:configuration - clientId:kTestClientID - scopes:@[ kTestValidScope4 ] - redirectURL:redirectURL - responseType:OIDResponseTypeCode - additionalParameters:nil], @""); - XCTAssertNoThrow( - [[OIDAuthorizationRequest alloc] initWithConfiguration:configuration - clientId:kTestClientID - scopes:@[ kTestValidScope5 ] - redirectURL:redirectURL - responseType:OIDResponseTypeCode - additionalParameters:nil], @""); -} -/*! @brief Returns a character set with all legal PKCE characters for the codeVerifier. - @return Character set representing all legal codeVerifier characters. - @see https://tools.ietf.org/html/rfc7636#section-4.1 - */ -+ (NSCharacterSet *)legalPKCECharacters { - // per spec: [A-Z] / [a-z] / [0-9] / "-" / "." / "_" / "~" - NSMutableCharacterSet *legalChars = [[NSMutableCharacterSet alloc] init]; - [legalChars addCharactersInString:@"ABCDEFGHIJKLMNOPQRSTUVWXYZ"]; - [legalChars addCharactersInString:@"abcdefghijklmnopqrstuvwxyz"]; - [legalChars addCharactersInString:@"0123456789"]; - [legalChars addCharactersInString:@"-._~"]; - return legalChars; -} - -/*! @brief Tests generated PKCE codeVerifiers for strict spec compliance. - @see https://tools.ietf.org/html/rfc7636#section-4.1 - */ -- (void)testPKCEVerifierCompliance { - // as this test involves random numbers, repeats multiple times - for (int i = 0; i < 1000; i++) { - NSString *codeVerifier = [OIDAuthorizationRequest generateCodeVerifier]; - XCTAssertNotNil(codeVerifier, @""); - - // tests that the code verifier is within the specified size bounds - XCTAssertGreaterThanOrEqual(codeVerifier.length, kCodeVerifierMinLength, @""); - XCTAssertLessThanOrEqual(codeVerifier.length, kCodeVerifierMaxLength, @""); - - // tests that the code verifier uses legal characters - NSCharacterSet *legalChars = [[self class] legalPKCECharacters]; - NSCharacterSet *illegalChars = [legalChars invertedSet]; - NSArray *components = [codeVerifier componentsSeparatedByCharactersInSet:illegalChars]; - XCTAssertEqual(components.count, 1, @"codeVerifier contains illegal characters"); - } -} - -/*! @brief Tests generated PKCE codeVerifiers for adherence to spec RECOMMENDED requirements. - @see https://tools.ietf.org/html/rfc7636#section-4.1 - */ -- (void)testPKCEVerifierRecommendations { - NSString *codeVerifier = [OIDAuthorizationRequest generateCodeVerifier]; - XCTAssertNotNil(codeVerifier, @""); - XCTAssertEqual(codeVerifier.length, - kCodeVerifierRecommendedLength, - @"The spec RECOMMENDS a '43-octet URL safe string'"); -} - -- (void)testSupportedResponseTypes { - NSDictionary *additionalParameters = - @{ kTestAdditionalParameterKey : kTestAdditionalParameterValue }; - OIDServiceConfiguration *configuration = [OIDServiceConfigurationTests testInstance]; - - NSString *scope = [OIDScopeUtilities scopesWithArray:@[ kTestScope, kTestScopeA ]]; - - XCTAssertNoThrow( - [[OIDAuthorizationRequest alloc] initWithConfiguration:configuration - clientId:kTestClientID - clientSecret:kTestClientSecret - scope:scope - redirectURL:[NSURL URLWithString:kTestRedirectURL] - responseType:@"code id_token" - state:kTestState - nonce:kTestNonce - codeVerifier:kTestCodeVerifier - codeChallenge:[[self class] codeChallenge] - codeChallengeMethod:[[self class] codeChallengeMethod] - additionalParameters:additionalParameters] - ); - - // https://tools.ietf.org/html/rfc6749#section-3.1.1 says the order of values does not matter - XCTAssertNoThrow( - [[OIDAuthorizationRequest alloc] initWithConfiguration:configuration - clientId:kTestClientID - clientSecret:kTestClientSecret - scope:scope - redirectURL:[NSURL URLWithString:kTestRedirectURL] - responseType:@"id_token code" - state:kTestState - nonce:kTestNonce - codeVerifier:kTestCodeVerifier - codeChallenge:[[self class] codeChallenge] - codeChallengeMethod:[[self class] codeChallengeMethod] - additionalParameters:additionalParameters] - ); - - XCTAssertThrows( - [[OIDAuthorizationRequest alloc] initWithConfiguration:configuration - clientId:kTestClientID - clientSecret:kTestClientSecret - scope:scope - redirectURL:[NSURL URLWithString:kTestRedirectURL] - responseType:@"code token id_token" - state:kTestState - nonce:kTestNonce - codeVerifier:kTestCodeVerifier - codeChallenge:[[self class] codeChallenge] - codeChallengeMethod:[[self class] codeChallengeMethod] - additionalParameters:additionalParameters] - ); - - XCTAssertThrows( - [[OIDAuthorizationRequest alloc] initWithConfiguration:configuration - clientId:kTestClientID - clientSecret:kTestClientSecret - scope:scope - redirectURL:[NSURL URLWithString:kTestRedirectURL] - responseType:@"token" - state:kTestState - nonce:kTestNonce - codeVerifier:kTestCodeVerifier - codeChallenge:[[self class] codeChallenge] - codeChallengeMethod:[[self class] codeChallengeMethod] - additionalParameters:additionalParameters] - ); - - XCTAssertNoThrow( - [[OIDAuthorizationRequest alloc] initWithConfiguration:configuration - clientId:kTestClientID - clientSecret:kTestClientSecret - scope:scope - redirectURL:[NSURL URLWithString:kTestRedirectURL] - responseType:@"code" - state:kTestState - nonce:kTestNonce - codeVerifier:kTestCodeVerifier - codeChallenge:[[self class] codeChallenge] - codeChallengeMethod:[[self class] codeChallengeMethod] - additionalParameters:additionalParameters] - ); - -} - -- (void)testExternalUserAgentMethods { - OIDAuthorizationRequest *request = [[self class] testInstance]; - XCTAssertEqualObjects([request externalUserAgentRequestURL], [request authorizationRequestURL]); - XCTAssert([[request redirectScheme] isEqualToString:request.redirectURL.scheme]); -} - -@end - -#pragma GCC diagnostic pop diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDAuthorizationResponseTests.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDAuthorizationResponseTests.h deleted file mode 100644 index 8f7e669d..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDAuthorizationResponseTests.h +++ /dev/null @@ -1,44 +0,0 @@ -/*! @file OIDAuthorizationResponseTests.h - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -@class OIDAuthorizationResponse; - -NS_ASSUME_NONNULL_BEGIN - -/*! @brief Unit tests for @c OIDAuthorizationResponse. - */ -@interface OIDAuthorizationResponseTests : XCTestCase - -/*! @brief Creates a new @c OIDAuthorizationResponse for testing. - */ -+ (OIDAuthorizationResponse *)testInstance; - -/*! @brief Creates a new @c OIDAuthorizationResponse for testing the code flow. - */ -+ (OIDAuthorizationResponse *)testInstanceCodeFlow; - -/*! @brief Creates a new @c OIDAuthorizationResponse with client authentication for testing the - code flow. - */ -+ (OIDAuthorizationResponse *)testInstanceCodeFlowClientAuth; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDAuthorizationResponseTests.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDAuthorizationResponseTests.m deleted file mode 100644 index 6206ccab..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDAuthorizationResponseTests.m +++ /dev/null @@ -1,180 +0,0 @@ -/*! @file OIDAuthorizationResponseTests.m - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDAuthorizationResponseTests.h" - -#import "OIDAuthorizationRequestTests.h" -#import "Source/OIDAuthorizationRequest.h" -#import "Source/OIDAuthorizationResponse.h" -#import "Source/OIDGrantTypes.h" - -// Ignore warnings about "Use of GNU statement expression extension" which is raised by our use of -// the XCTAssert___ macros. -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wgnu" - -/*! @brief Test value for the @c authorizationCode property. - */ -static NSString *const kTestAuthorizationCode = @"Code"; - -/*! @brief Test value for the @c authorizationCodeVerifier property. - */ -static NSString *const kTestAuthorizationCodeVerifier = @"Verifier"; - -/*! @brief Test key for the @c additionalParameters property. - */ -static NSString *const kTestAdditionalParameterKey = @"A"; - -/*! @brief Test value for the @c additionalParameters property. - */ -static NSString *const kTestAdditionalParameterValue = @"1"; - -/*! @brief Test value for the @c state property. - */ -static NSString *const kTestState = @"State"; - -/*! @brief Test value for the @c accessToken property. - */ -static NSString *const kTestAccessToken = @"Access Token"; - -/*! @brief Test value for the @c accessTokenExpirationDate property. - */ -static long long const kTestExpirationSeconds = 60; - -/*! @brief Test value for the @c idToken property. - */ -static NSString *const kTestIDToken = @"ID Token"; - -/*! @brief Test value for the @c tokenType property. - */ -static NSString *const kTestTokenType = @"Token Type"; - -/*! @brief Test value for the @c scopes property. - */ -static NSString *const kTestScope = @"Scope"; - -@implementation OIDAuthorizationResponseTests - -+ (OIDAuthorizationResponse *)testInstance { - OIDAuthorizationRequest *request = [OIDAuthorizationRequestTests testInstance]; - OIDAuthorizationResponse *response = - [[OIDAuthorizationResponse alloc] initWithRequest:request parameters:@{ - @"code" : kTestAuthorizationCode, - @"code_verifier" : kTestAuthorizationCodeVerifier, - @"state" : kTestState, - @"access_token" : kTestAccessToken, - @"expires_in" : @(kTestExpirationSeconds), - @"id_token" : kTestIDToken, - @"token_type" : kTestTokenType, - @"scope" : kTestScope, - kTestAdditionalParameterKey : kTestAdditionalParameterValue - }]; - return response; -} - -+ (OIDAuthorizationResponse *)testInstanceCodeFlow { - OIDAuthorizationRequest *request = [OIDAuthorizationRequestTests testInstanceCodeFlow]; - OIDAuthorizationResponse *response = - [[OIDAuthorizationResponse alloc] initWithRequest:request parameters:@{ - @"code" : kTestAuthorizationCode, - @"code_verifier" : kTestAuthorizationCodeVerifier, - @"state" : kTestState, - @"token_type" : OIDGrantTypeAuthorizationCode, - kTestAdditionalParameterKey : kTestAdditionalParameterValue - }]; - return response; -} - -+ (OIDAuthorizationResponse *)testInstanceCodeFlowClientAuth { - OIDAuthorizationRequest *request = [OIDAuthorizationRequestTests testInstanceCodeFlowClientAuth]; - OIDAuthorizationResponse *response = - [[OIDAuthorizationResponse alloc] initWithRequest:request parameters:@{ - @"code" : kTestAuthorizationCode, - @"code_verifier" : kTestAuthorizationCodeVerifier, - @"state" : kTestState, - @"token_type" : OIDGrantTypeAuthorizationCode, - kTestAdditionalParameterKey : kTestAdditionalParameterValue - }]; - return response; -} - -/*! @brief Tests the @c NSCopying implementation by round-tripping an instance through the copying - process and checking to make sure the source and destination instances are equivalent. - */ -- (void)testCopying { - OIDAuthorizationResponse *response = [[self class] testInstance]; - XCTAssertEqualObjects(response.authorizationCode, kTestAuthorizationCode, @""); - XCTAssertEqualObjects(response.state, kTestState, @""); - XCTAssertEqualObjects(response.accessToken, kTestAccessToken, @""); - XCTAssertEqualObjects(response.idToken, kTestIDToken, @""); - XCTAssertEqualObjects(response.tokenType, kTestTokenType, @""); - XCTAssertEqualObjects(response.scope, kTestScope, @""); - XCTAssertEqualObjects(response.additionalParameters[kTestAdditionalParameterKey], - kTestAdditionalParameterValue, @""); - - // Should be ~ kTestExpirationSeconds seconds. Avoiding swizzling NSDate here for certainty - // to keep dependencies down, and simply making an assumption that this check will be executed - // relatively quickly after the initialization above (less than 5 seconds.) - NSTimeInterval expiration = [response.accessTokenExpirationDate timeIntervalSinceNow]; - XCTAssert(expiration > kTestExpirationSeconds - 5 && expiration <= kTestExpirationSeconds, @""); - - OIDAuthorizationResponse *responseCopy = [response copy]; - - XCTAssertEqualObjects(responseCopy.request, response.request, @""); - XCTAssertEqualObjects(responseCopy.authorizationCode, response.authorizationCode, @""); - XCTAssertEqualObjects(responseCopy.state, response.state, @""); - XCTAssertEqualObjects(responseCopy.accessToken, response.accessToken, @""); - XCTAssertEqualObjects(responseCopy.accessTokenExpirationDate, - response.accessTokenExpirationDate, @""); - XCTAssertEqualObjects(responseCopy.idToken, response.idToken, @""); - XCTAssertEqualObjects(responseCopy.tokenType, response.tokenType, @""); - XCTAssertEqualObjects(responseCopy.scope, response.scope, @""); - XCTAssertEqualObjects(responseCopy.additionalParameters, - response.additionalParameters, @""); -} - -/*! @brief Tests the @c NSSecureCoding by round-tripping an instance through the coding process and - checking to make sure the source and destination instances are equivalent. - */ -- (void)testSecureCoding { - OIDAuthorizationResponse *response = [[self class] testInstance]; - NSData *data = [NSKeyedArchiver archivedDataWithRootObject:response]; - OIDAuthorizationResponse *responseCopy = [NSKeyedUnarchiver unarchiveObjectWithData:data]; - - // Not a full test of the request deserialization, but should be sufficient as a smoke test - // to make sure the request IS actually getting serialized and deserialized in the - // NSSecureCoding implementation. We'll leave it up to the OIDAuthorizationRequest tests to make - // sure the NSSecureCoding implementation of that class is correct. - XCTAssertNotNil(responseCopy.request, @""); - XCTAssertEqualObjects(responseCopy.request.clientID, response.request.clientID, @""); - - XCTAssertEqualObjects(responseCopy.authorizationCode, kTestAuthorizationCode, @""); - XCTAssertEqualObjects(responseCopy.state, kTestState, @""); - XCTAssertEqualObjects(responseCopy.accessToken, kTestAccessToken, @""); - XCTAssertEqualObjects(responseCopy.idToken, kTestIDToken, @""); - XCTAssertEqualObjects(responseCopy.tokenType, kTestTokenType, @""); - XCTAssertEqualObjects(responseCopy.scope, kTestScope, @""); - XCTAssertEqualObjects(responseCopy.accessTokenExpirationDate, response.accessTokenExpirationDate, - @""); - XCTAssertEqualObjects(responseCopy.additionalParameters[kTestAdditionalParameterKey], - kTestAdditionalParameterValue, @""); -} - -@end - -#pragma GCC diagnostic pop diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDGrantTypesTests.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDGrantTypesTests.m deleted file mode 100644 index fb4c9e3f..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDGrantTypesTests.m +++ /dev/null @@ -1,54 +0,0 @@ -/*! @file OIDGrantTypesTests.m - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -#import "Source/OIDGrantTypes.h" - -// Ignore warnings about "Use of GNU statement expression extension" which is raised by our use of -// the XCTAssert___ macros. -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wgnu" - -/*! @brief Unit tests for constants in @c OIDGrantTypes.m. - @remarks Arguably not worth tests for this file, but adding them for consistency, and so that - any future enhancements have a place to add tests if need be. - */ -@interface OIDGrantTypesTests : XCTestCase -@end -@implementation OIDGrantTypesTests - -- (void)testAuthorizationCode { - XCTAssertEqualObjects(OIDGrantTypeAuthorizationCode, @"authorization_code"); -} - -- (void)testRefreshToken { - XCTAssertEqualObjects(OIDGrantTypeRefreshToken, @"refresh_token"); -} - -- (void)testPassword { - XCTAssertEqualObjects(OIDGrantTypePassword, @"password"); -} - -- (void)testClientCredentials { - XCTAssertEqualObjects(OIDGrantTypeClientCredentials, @"client_credentials"); -} - -@end - -#pragma GCC diagnostic pop diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDRPProfileCode.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDRPProfileCode.h deleted file mode 100644 index c613b39d..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDRPProfileCode.h +++ /dev/null @@ -1,28 +0,0 @@ -/*! @file OIDRPProfileCode.h - @brief AppAuth iOS SDK - @copyright - Copyright 2017 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -#import "OIDExternalUserAgent.h" - -NS_ASSUME_NONNULL_BEGIN - - - - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDRPProfileCode.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDRPProfileCode.m deleted file mode 100644 index 0bb61fe9..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDRPProfileCode.m +++ /dev/null @@ -1,568 +0,0 @@ -/*! @file OIDRPProfileCode.m - @brief AppAuth iOS SDK - @copyright - Copyright 2017 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDRPProfileCode.h" - -#import "OIDAuthorizationRequest.h" -#import "OIDAuthorizationResponse.h" -#import "OIDAuthorizationService.h" -#import "OIDAuthState.h" -#import "OIDExternalUserAgentSession.h" -#import "OIDIDToken.h" -#import "OIDRegistrationRequest.h" -#import "OIDRegistrationResponse.h" -#import "OIDScopes.h" -#import "OIDServiceConfiguration.h" -#import "OIDServiceDiscovery.h" -#import "OIDTokenRequest.h" -#import "OIDTokenResponse.h" - -static NSString *const kRedirectURI = @"com.example.app:/oauth2redirect/example-provider"; - -// Open ID RP Certification test server http://openid.net/certification/rp_testing/ -static NSString *const kTestURIBase = - @"https://rp.certification.openid.net:8080/appauth-ios-macos/"; - -/*! @brief A UI Coordinator for testing, has no user agent and doesn't support user interaction. - Simply performs the authorization request as a GET request, and looks for a redirect in - the response. - */ -@interface OIDAuthorizationUICoordinatorNonInteractive : NSObject { - NSURLSession *_urlSession; - __weak id _session; -} -@end - -@implementation OIDAuthorizationUICoordinatorNonInteractive - -- (BOOL)presentExternalUserAgentRequest:(id )request - session:(id)session { - _session = session; - NSURL *requestURL = [request externalUserAgentRequestURL]; - NSMutableURLRequest *URLRequest = [[NSURLRequest requestWithURL:requestURL] mutableCopy]; - NSURLSessionConfiguration* config = [NSURLSessionConfiguration defaultSessionConfiguration]; - _urlSession = [NSURLSession sessionWithConfiguration:config delegate:self delegateQueue:nil]; - [[_urlSession dataTaskWithRequest:URLRequest - completionHandler:^(NSData *_Nullable data, - NSURLResponse *_Nullable response, - NSError *_Nullable error) { - NSDictionary* headers = [(NSHTTPURLResponse *)response allHeaderFields]; - NSString *location = [headers objectForKey:@"Location"]; - NSURL *url = [NSURL URLWithString:location]; - [session resumeExternalUserAgentFlowWithURL:url]; - }] resume]; - - return YES; -} - -- (void)dismissExternalUserAgentAnimated:(BOOL)animated completion:(void (^)(void))completion { - if (completion) completion(); -} - -- (void)URLSession:(NSURLSession *)session - task:(NSURLSessionTask *)task - willPerformHTTPRedirection:(NSHTTPURLResponse *)response - newRequest:(NSURLRequest *)request - completionHandler:(void (^)(NSURLRequest *))completionHandler { - // Disables HTTP redirection in the NSURLSession - completionHandler(NULL); -} -@end - -@interface OIDAuthorizationSession : NSObject - -- (instancetype)init NS_UNAVAILABLE; - -- (instancetype)initWithRequest:(OIDAuthorizationRequest *)request - NS_DESIGNATED_INITIALIZER; - -@end - -@interface OIDRPProfileCode : XCTestCase { - // private variables - OIDAuthorizationUICoordinatorNonInteractive *_coordinator; - FILE * _logFile; -} -typedef void (^PostRegistrationCallback)(OIDServiceConfiguration *configuration, - OIDRegistrationResponse *registrationResponse, - NSError *error - ); - -typedef void (^CodeExchangeCompletion)(OIDAuthorizationResponse *_Nullable authorizationResponse, - OIDTokenResponse *_Nullable tokenResponse, - NSError *tokenError - ); - -typedef void (^UserInfoCompletion)(OIDAuthState *_Nullable authState, - NSDictionary *_Nullable userInfoDictionary, - NSError *userInfo - ); - -@end - -@implementation OIDRPProfileCode - -- (void)setUp { - [super setUp]; -} - -- (void)tearDown { - [super tearDown]; - - [self endCertificationTest]; -} - -/*! @brief Performs client registration. - @param issuer The issuer to register the client with. - @param callback Completion block. - */ -- (void)doRegistrationWithIssuer:(NSURL *)issuer callback:(PostRegistrationCallback)callback { - NSURL *redirectURI = [NSURL URLWithString:kRedirectURI]; - - // discovers endpoints - [OIDAuthorizationService discoverServiceConfigurationForIssuer:issuer - completion:^(OIDServiceConfiguration *_Nullable configuration, NSError *_Nullable error) { - - if (!configuration) { - callback(nil, nil, error); - return; - } - - OIDRegistrationRequest *request = - [[OIDRegistrationRequest alloc] initWithConfiguration:configuration - redirectURIs:@[ redirectURI ] - responseTypes:nil - grantTypes:nil - subjectType:nil - tokenEndpointAuthMethod:@"client_secret_basic" - additionalParameters:@{@"id_token_signed_response_alg": - @"none", - @"contacts": - @"appauth@wdenniss.com"}]; - - [self certificationLog:@"Registration request: %@", request]; - - // performs registration request - [OIDAuthorizationService performRegistrationRequest:request - completion:^(OIDRegistrationResponse *_Nullable regResp, NSError *_Nullable error) { - if (regResp) { - callback(configuration, regResp, nil); - } else { - callback(nil, nil, error); - } - }]; - }]; -} - -/*! @brief Performs the code flow on the test server. - @param test The test ID used to configure the test server. - @param completion Completion block. - */ -- (void)codeFlowWithExchangeForTest:(NSString *)test completion:(CodeExchangeCompletion)completion { - [self codeFlowWithExchangeForTest:test scope:@[ OIDScopeOpenID ] completion:completion]; -} - -/*! @brief Performs the code flow on the test server. - @param test The test ID used to configure the test server. - @param scope Scope to use in the authorization request. - @param completion Completion block. - */ -- (void)codeFlowWithExchangeForTest:(NSString *)test - scope:(NSArray *)scope - completion:(CodeExchangeCompletion)completion { - - NSString *issuerString = [kTestURIBase stringByAppendingString:test]; - - XCTestExpectation *expectation = - [self expectationWithDescription:@"Discovery and registration should complete."]; - XCTestExpectation *auth_complete = - [self expectationWithDescription:@"Authorization should complete."]; - XCTestExpectation *token_exchange = - [self expectationWithDescription:@"Token Exchange should complete."]; - - NSURL *issuer = [NSURL URLWithString:issuerString]; - - [self doRegistrationWithIssuer:issuer callback:^(OIDServiceConfiguration *configuration, - OIDRegistrationResponse *registrationResponse, - NSError *error) { - [expectation fulfill]; - XCTAssertNotNil(configuration); - XCTAssertNotNil(registrationResponse); - XCTAssertNil(error); - - if (error) { - return; - } - - NSURL *redirectURI = [NSURL URLWithString:kRedirectURI]; - // builds authentication request - OIDAuthorizationRequest *request = - [[OIDAuthorizationRequest alloc] initWithConfiguration:configuration - clientId:registrationResponse.clientID - clientSecret:registrationResponse.clientSecret - scopes:scope - redirectURL:redirectURI - responseType:OIDResponseTypeCode - additionalParameters:nil]; - - self->_coordinator = [[OIDAuthorizationUICoordinatorNonInteractive alloc] init]; - - [self certificationLog:@"Initiating authorization request: %@", - [request authorizationRequestURL]]; - - [OIDAuthorizationService presentAuthorizationRequest:request - externalUserAgent:self->_coordinator - callback:^(OIDAuthorizationResponse *_Nullable authorizationResponse, - NSError *error) { - [auth_complete fulfill]; - XCTAssertNotNil(authorizationResponse); - XCTAssertNil(error); - - OIDTokenRequest *tokenExchangeRequest = [authorizationResponse tokenExchangeRequest]; - [OIDAuthorizationService performTokenRequest:tokenExchangeRequest - originalAuthorizationResponse:authorizationResponse - callback:^(OIDTokenResponse *_Nullable tokenResponse, - NSError *_Nullable tokenError) { - [token_exchange fulfill]; - completion(authorizationResponse, tokenResponse, tokenError); - }]; - }]; - }]; - [self waitForExpectationsWithTimeout:30 handler:nil]; -} - -/*! @brief Performs the code flow on the test server and expects a successful result. - @param test The test ID. - */ -- (void)codeFlowWithExchangeExpectSuccessForTest:(NSString *)test { - [self codeFlowWithExchangeForTest:test - completion:^(OIDAuthorizationResponse * _Nullable authorizationResponse, - OIDTokenResponse * _Nullable tokenResponse, - NSError *tokenError) { - XCTAssertNotNil(tokenResponse); - XCTAssertNil(tokenError); - // testRP_id_token_sig_none - XCTAssertNotNil(tokenResponse.idToken); - - [self certificationLog:@"PASS: Got token response: %@", tokenResponse]; - }]; -} - -- (void)testRP_response_type_code { - NSString *testName = @"rp-response_type-code"; - [self startCertificationTest:testName]; - [self codeFlowWithExchangeExpectSuccessForTest:testName]; -} - -- (void)testRP_id_token_sig_none { - NSString *testName = @"rp-id_token-sig-none"; - [self startCertificationTest:testName]; - [self codeFlowWithExchangeExpectSuccessForTest:testName]; -} - -- (void)testRP_token_endpoint_client_secret_basic { - NSString *testName = @"rp-token_endpoint-client_secret_basic"; - [self startCertificationTest:testName]; - - [self codeFlowWithExchangeExpectSuccessForTest:testName]; -} - -/*! @brief Performs the code flow on the test server and expects a failure result. - @param test The test ID. - */ -- (void)codeFlowWithExchangeExpectFailForTest:(NSString *)test { - [self codeFlowWithExchangeForTest:test - completion:^(OIDAuthorizationResponse * _Nullable authorizationResponse, - OIDTokenResponse * _Nullable tokenResponse, - NSError *tokenError) { - XCTAssertNil(tokenResponse); - XCTAssertNotNil(tokenError); - - if (tokenError) { - [self certificationLog:@"PASS: Token exchange failed with %@", tokenError]; - } - }]; -} - -- (void)testRP_id_token_aud { - NSString *testName = @"rp-id_token-aud"; - [self startCertificationTest:testName]; - [self codeFlowWithExchangeExpectFailForTest:testName]; -} - -- (void)testRP_id_token_iat { - NSString *testName = @"rp-id_token-iat"; - [self startCertificationTest:testName]; - [self codeFlowWithExchangeExpectFailForTest:testName]; -} - -- (void)testRP_id_token_sub { - NSString *testName = @"rp-id_token-sub"; - [self startCertificationTest:testName]; - [self codeFlowWithExchangeExpectFailForTest:testName]; -} - -- (void)testRP_id_token_issuer_mismatch { - NSString *testName = @"rp-id_token-issuer-mismatch"; - [self startCertificationTest:testName]; - [self codeFlowWithExchangeExpectFailForTest:testName]; -} - -- (void)testRP_nonce_invalid { - NSString *testName = @"rp-nonce-invalid"; - [self startCertificationTest:testName]; - [self codeFlowWithExchangeExpectFailForTest:testName]; -} - -/*! @brief Makes a UserInfo request then calls completion block. - @param test The test ID used to configure the test server. - @param completion Completion block. - */ -- (void)codeFlowThenUserInfoForTest:(NSString *)test completion:(UserInfoCompletion)completion { - - // Adds another expectation that codeFlowWithExchangeForTest will wait for. - XCTestExpectation *userinfoExpectation = - [self expectationWithDescription:@"Userinfo response."]; - - NSArray *scope = - @[ OIDScopeOpenID, OIDScopeProfile, OIDScopeEmail, OIDScopeAddress, OIDScopePhone ]; - [self codeFlowWithExchangeForTest:test - scope:scope - completion:^(OIDAuthorizationResponse * _Nullable authorizationResponse, - OIDTokenResponse * _Nullable tokenResponse, - NSError *tokenError) { - XCTAssertNotNil(tokenResponse); - XCTAssertNil(tokenError); - - [self certificationLog:@"Got access token: %@", tokenResponse.accessToken]; - - OIDAuthState *authState = - [[OIDAuthState alloc] initWithAuthorizationResponse:authorizationResponse - tokenResponse:tokenResponse]; - - NSURL *userinfoEndpoint = - authState.lastAuthorizationResponse.request.configuration.discoveryDocument.userinfoEndpoint; - XCTAssertNotNil(userinfoEndpoint); - - [authState performActionWithFreshTokens:^(NSString *_Nonnull accessToken, - NSString *_Nonnull idToken, - NSError *_Nullable error) { - XCTAssertNil(error); - - // creates request to the userinfo endpoint, with access token in the Authorization header - NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:userinfoEndpoint]; - NSString *authorizationHeaderValue = [NSString stringWithFormat:@"Bearer %@", accessToken]; - [request addValue:authorizationHeaderValue forHTTPHeaderField:@"Authorization"]; - - NSURLSessionConfiguration *configuration = - [NSURLSessionConfiguration defaultSessionConfiguration]; - NSURLSession *session = [NSURLSession sessionWithConfiguration:configuration - delegate:nil - delegateQueue:nil]; - - [self certificationLog:@"Performing UserInfo request to: %@", userinfoEndpoint]; - [self certificationLog:@"- Headers: %@", request.allHTTPHeaderFields]; - - // performs HTTP request - NSURLSessionDataTask *postDataTask = - [session dataTaskWithRequest:request - completionHandler:^(NSData *_Nullable data, - NSURLResponse *_Nullable response, - NSError *_Nullable error) { - dispatch_async(dispatch_get_main_queue(), ^() { - [userinfoExpectation fulfill]; - XCTAssertNil(error); - XCTAssert([response isKindOfClass:[NSHTTPURLResponse class]]); - NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)response; - XCTAssert( (int)httpResponse.statusCode == 200); - id jsonDictionaryOrArray = - [NSJSONSerialization JSONObjectWithData:data options:0 error:NULL]; - completion(authState, jsonDictionaryOrArray, error); - }); - }]; - - [postDataTask resume]; - }]; - }]; -} - -- (void)testRP_userinfo_bearer_header { - NSString *testName = @"rp-userinfo-bearer-header"; - [self startCertificationTest:testName]; - [self codeFlowThenUserInfoForTest:testName - completion:^(OIDAuthState * _Nullable authState, - NSDictionary * _Nullable userInfoDictionary, - NSError *userInfoError) { - XCTAssertNotNil(userInfoDictionary); - [self certificationLog:@"PASS: User info dictionary: %@", userInfoDictionary]; - }]; -} - -- (void)testRP_userinfo_bad_sub_claim { - NSString *testName = @"rp-userinfo-bad-sub-claim"; - [self startCertificationTest:testName]; - - [self codeFlowThenUserInfoForTest:testName - completion:^(OIDAuthState * _Nullable authState, - NSDictionary * _Nullable userInfoDictionary, - NSError *userInfo) { - - NSString *sub = userInfoDictionary[@"sub"]; - XCTAssertNotNil(sub); - OIDIDToken *idToken = - [[OIDIDToken alloc] initWithIDTokenString:authState.lastTokenResponse.idToken]; - XCTAssertNotNil(idToken); - XCTAssertNotEqual(sub, idToken.subject); - - if (![sub isEqualToString:idToken.subject]) { - [self certificationLog:@"PASS: UserInfo subject '%@' does not match id token subject '%@'", - sub, - idToken.subject]; - } - }]; -} - -- (void)testRP_scope_userinfo_claims { - NSString *testName = @"rp-scope-userinfo-claims"; - [self startCertificationTest:testName]; - [self codeFlowThenUserInfoForTest:testName - completion:^(OIDAuthState * _Nullable authState, - NSDictionary * _Nullable userInfoDictionary, - NSError *userInfo) { - - [self certificationLog:@"User info dictionary: %@", userInfoDictionary]; - - XCTAssertNotNil(userInfoDictionary[@"name"]); - XCTAssertNotNil(userInfoDictionary[@"email"]); - XCTAssertNotNil(userInfoDictionary[@"email_verified"]); - XCTAssertNotNil(userInfoDictionary[@"address"]); - XCTAssertNotNil(userInfoDictionary[@"phone_number"]); - if (userInfoDictionary[@"name"] - && userInfoDictionary[@"email"] - && userInfoDictionary[@"email_verified"] - && userInfoDictionary[@"address"] - && userInfoDictionary[@"phone_number"]) { - [self certificationLog:@"PASS: name, email, email_verified, address, phone_number " - "claims present"]; - } - }]; -} - -- (void)testRP_id_token_kid_absent_single_jwks { - NSString *testName = @"rp-id_token-kid-absent-single-jwks"; - [self skippedTest:testName]; -} -- (void)testRP_id_token_kid_absent_multiple_jwks { - NSString *testName = @"rp-id_token-kid-absent-multiple-jwks"; - [self skippedTest:testName]; -} -- (void)testRP_rp_id_token_bad_sig_rs256 { - NSString *testName = @"rp-id_token-bad-sig-rs256"; - [self skippedTest:testName]; -} - -- (void)testRP_id_token_sig_rs256 { - NSString *testName = @"rp-id_token-sig-rs256"; - [self skippedTest:testName]; -} - -- (void)skippedTest:(NSString *)testName { - [self startCertificationTest:testName]; - - NSString *issuerString = [kTestURIBase stringByAppendingString:testName]; - - XCTestExpectation *expectation = - [self expectationWithDescription:@"Discovery and registration should complete."]; - - NSURL *issuer = [NSURL URLWithString:issuerString]; - - [self doRegistrationWithIssuer:issuer callback:^(OIDServiceConfiguration *configuration, - OIDRegistrationResponse *registrationResponse, - NSError *error) { - [expectation fulfill]; - - XCTAssertNil(registrationResponse); - XCTAssertNotNil(error); - - if (error) { - [self certificationLog:@"Registration error: %@", error]; - [self certificationLog:@"SKIP. With id_token_signed_response_alg set to `none` in registration, error recieved and test skipped."]; - } - - }]; - [self waitForExpectationsWithTimeout:30 handler:nil]; -} - - -/*! @brief Creates a log file to record the certification logs. - @param testName The test ID used to configure the test server. - */ -- (void)startCertificationTest:(NSString *)testName { - if (_logFile) { - [self endCertificationTest]; - } - - NSString* filename = [NSString stringWithFormat:@"%@.txt", testName]; - - NSString *documentsDirectory = - NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES)[0]; - NSString *codeDir = [documentsDirectory stringByAppendingPathComponent:@"code"]; - [[NSFileManager defaultManager] createDirectoryAtPath:codeDir - withIntermediateDirectories:NO - attributes:nil - error:nil]; - NSString *pathForLog = [codeDir stringByAppendingPathComponent:filename]; - - NSLog(@"Writing logs for test %@ to %@", testName, pathForLog); - _logFile = fopen([pathForLog cStringUsingEncoding:NSASCIIStringEncoding], "w"); - NSAssert(_logFile, @"Unable to create log file"); - - NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; - dateFormatter.dateFormat = @"yyyy-MM-dd HH:mm:ss"; - NSString *dateString = [dateFormatter stringFromDate:[NSDate date]]; - [self certificationLog:@"# Starting test `%@` at %@ for AppAuth for iOS and macOS", - testName, - dateString]; -} - -/*! @brief Logs string to the certification log. - */ -- (void)certificationLog:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2) { - NSAssert(_logFile, @"No active log"); - - // Gets log message as a string. - va_list argp; - va_start(argp, format); - NSString *log = [[NSString alloc] initWithFormat:format arguments:argp]; - va_end(argp); - - // Logs to file. - fprintf(_logFile, "%s\n", [log UTF8String]); -} - -/*! @brief Closes the certification log file. - */ -- (void)endCertificationTest { - // Adds a newline. - [self certificationLog:@""]; - fclose(_logFile); - _logFile = NULL; -} - -@end - diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDRegistrationRequestTests.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDRegistrationRequestTests.h deleted file mode 100644 index 3951d78e..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDRegistrationRequestTests.h +++ /dev/null @@ -1,35 +0,0 @@ -/*! @file OIDRegistrationRequestTests.h - @brief AppAuth iOS SDK - @copyright - Copyright 2016 The AppAuth for iOS Authors. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -@class OIDRegistrationRequest; - -NS_ASSUME_NONNULL_BEGIN - -/*! @brief Unit tests for @c OIDRegistrationRequest. - */ -@interface OIDRegistrationRequestTests : XCTestCase - -/*! @brief Creates a new @c OIDRegistrationRequest for testing. - */ -+ (OIDRegistrationRequest *)testInstance; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDRegistrationRequestTests.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDRegistrationRequestTests.m deleted file mode 100644 index 424f3cc3..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDRegistrationRequestTests.m +++ /dev/null @@ -1,188 +0,0 @@ -/*! @file OIDRegistrationRequestTests.m - @brief AppAuth iOS SDK - @copyright - Copyright 2016 The AppAuth for iOS Authors. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDRegistrationRequestTests.h" - -#import "OIDServiceConfigurationTests.h" -#import "Source/OIDClientMetadataParameters.h" -#import "Source/OIDRegistrationRequest.h" -#import "Source/OIDServiceConfiguration.h" - -/*! @brief Test key for the @c additionalParameters property. - */ -static NSString *const kTestAdditionalParameterKey = @"A"; - -/*! @brief Test value for the @c additionalParameters property. - */ -static NSString *const kTestAdditionalParameterValue = @"1"; - -/*! @brief Test value for the @c initialAccessToken property. - */ -static NSString *const kInitialAccessTokenTestValue = @"test"; - -/*! @brief Test value for the @c redirectURL property. - */ -static NSString *kRedirectURLTestValue = @"https://client.example.com/redirect"; - -/*! @brief Test value for the @c responseTypes property. - */ -static NSString *kResponseTypeTestValue = @"code"; - -/*! @brief Test value for the @c grantTypes property. - */ -static NSString *kGrantTypeTestValue = @"authorization_code"; - -/*! @brief Test value for the @c subjectType property. - */ -static NSString *kSubjectTypeTestValue = @"public"; - -/*! @brief Test value for the @c tokenEndpointAuthenticationMethod property. - */ -static NSString *kTokenEndpointAuthMethodTestValue = @"client_secret_basic"; - -@implementation OIDRegistrationRequestTests - -+ (OIDRegistrationRequest *)testInstance { - NSDictionary *additionalParameters = @{ - kTestAdditionalParameterKey : kTestAdditionalParameterValue - }; - - OIDServiceConfiguration *config = [OIDServiceConfigurationTests testInstance]; - OIDRegistrationRequest *request = - [[OIDRegistrationRequest alloc] initWithConfiguration:config - redirectURIs:@[ [NSURL URLWithString:kRedirectURLTestValue] ] - responseTypes:@[ kResponseTypeTestValue ] - grantTypes:@[ kGrantTypeTestValue ] - subjectType:kSubjectTypeTestValue - tokenEndpointAuthMethod:kTokenEndpointAuthMethodTestValue - initialAccessToken:kInitialAccessTokenTestValue - additionalParameters:additionalParameters]; - - return request; -} - -- (void)testApplicationIsNativeByDefault { - OIDRegistrationRequest *request = [[self class] testInstance]; - XCTAssertEqualObjects(request.applicationType, OIDApplicationTypeNative); -} - -/*! @brief Tests the @c NSCopying implementation by round-tripping an instance through the copying - process and checking to make sure the source and destination instances are equivalent. - */ -- (void)testCopying { - OIDRegistrationRequest *request = [[self class] testInstance]; - - XCTAssertNotNil(request.configuration); - XCTAssertEqualObjects(request.applicationType, OIDApplicationTypeNative); - XCTAssertEqualObjects(request.initialAccessToken, kInitialAccessTokenTestValue); - XCTAssertEqualObjects(request.redirectURIs, @[ [NSURL URLWithString:kRedirectURLTestValue] ]); - XCTAssertEqualObjects(request.responseTypes, @[ kResponseTypeTestValue ]); - XCTAssertEqualObjects(request.grantTypes, @[ kGrantTypeTestValue ]); - XCTAssertEqualObjects(request.subjectType, kSubjectTypeTestValue); - XCTAssertEqualObjects(request.tokenEndpointAuthenticationMethod, - kTokenEndpointAuthMethodTestValue); - XCTAssertNotNil(request.additionalParameters); - XCTAssertEqualObjects(request.additionalParameters[kTestAdditionalParameterKey], - kTestAdditionalParameterValue); - - OIDRegistrationRequest *requestCopy = [request copy]; - - // Not a full test of the configuration deserialization, but should be sufficient as a smoke test - // to make sure the configuration IS actually getting carried along in the copy implementation. - XCTAssertEqualObjects(requestCopy.configuration, request.configuration); - - XCTAssertEqualObjects(requestCopy.applicationType, request.applicationType); - XCTAssertEqualObjects(requestCopy.initialAccessToken, kInitialAccessTokenTestValue); - XCTAssertEqualObjects(requestCopy.redirectURIs, request.redirectURIs); - XCTAssertEqualObjects(requestCopy.responseTypes, request.responseTypes); - XCTAssertEqualObjects(requestCopy.grantTypes, request.grantTypes); - XCTAssertEqualObjects(requestCopy.subjectType, request.subjectType); - XCTAssertEqualObjects(requestCopy.tokenEndpointAuthenticationMethod, - request.tokenEndpointAuthenticationMethod); - XCTAssertNotNil(requestCopy.additionalParameters); - XCTAssertEqualObjects(requestCopy.additionalParameters[kTestAdditionalParameterKey], - kTestAdditionalParameterValue); -} - -/*! @brief Tests the @c NSSecureCoding by round-tripping an instance through the coding process and - checking to make sure the source and destination instances are equivalent. - */ -- (void)testSecureCoding { - OIDRegistrationRequest *request = [[self class] testInstance]; - - XCTAssertNotNil(request.configuration); - XCTAssertEqualObjects(request.applicationType, OIDApplicationTypeNative); - XCTAssertEqualObjects(request.initialAccessToken, kInitialAccessTokenTestValue); - XCTAssertEqualObjects(request.redirectURIs, @[ [NSURL URLWithString:kRedirectURLTestValue] ]); - XCTAssertEqualObjects(request.responseTypes, @[ kResponseTypeTestValue ]); - XCTAssertEqualObjects(request.grantTypes, @[ kGrantTypeTestValue ]); - XCTAssertEqualObjects(request.subjectType, kSubjectTypeTestValue); - XCTAssertEqualObjects(request.tokenEndpointAuthenticationMethod, - kTokenEndpointAuthMethodTestValue); - XCTAssertEqualObjects(request.additionalParameters[kTestAdditionalParameterKey], - kTestAdditionalParameterValue); - - NSData *data = [NSKeyedArchiver archivedDataWithRootObject:request]; - OIDRegistrationRequest *requestCopy = [NSKeyedUnarchiver unarchiveObjectWithData:data]; - - // Not a full test of the configuration deserialization, but should be sufficient as a smoke test - // to make sure the configuration IS actually getting serialized and deserialized in the - // NSSecureCoding implementation. We'll leave it up to the OIDServiceConfiguration tests to make - // sure the NSSecureCoding implementation of that class is correct. - XCTAssertNotNil(requestCopy.configuration); - - XCTAssertEqualObjects(requestCopy.applicationType, request.applicationType); - XCTAssertEqualObjects(requestCopy.initialAccessToken, kInitialAccessTokenTestValue); - XCTAssertEqualObjects(requestCopy.redirectURIs, request.redirectURIs); - XCTAssertEqualObjects(requestCopy.responseTypes, request.responseTypes); - XCTAssertEqualObjects(requestCopy.grantTypes, request.grantTypes); - XCTAssertEqualObjects(requestCopy.subjectType, request.subjectType); - XCTAssertEqualObjects(requestCopy.tokenEndpointAuthenticationMethod, - request.tokenEndpointAuthenticationMethod); - XCTAssertEqualObjects(requestCopy.additionalParameters[kTestAdditionalParameterKey], - kTestAdditionalParameterValue); -} - -/*! @brief Tests the @c URLRequest method - */ -- (void)testURLRequest { - OIDRegistrationRequest *request = [[self class] testInstance]; - NSURLRequest *httpRequest = [request URLRequest]; - NSError *error; - NSDictionary *parsedJSON = [NSJSONSerialization JSONObjectWithData:httpRequest.HTTPBody - options:kNilOptions - error:&error]; - - XCTAssertEqualObjects(httpRequest.HTTPMethod, @"POST"); - XCTAssertEqualObjects([httpRequest valueForHTTPHeaderField:@"Content-Type"], - @"application/json"); - XCTAssertEqualObjects([httpRequest valueForHTTPHeaderField:@"Authorization"], - @"Bearer test"); - XCTAssertEqualObjects(httpRequest.URL, request.configuration.registrationEndpoint); - XCTAssertEqualObjects(parsedJSON[OIDApplicationTypeParam], request.applicationType); - XCTAssertEqualObjects(parsedJSON[OIDRedirectURIsParam][0], - [request.redirectURIs[0] absoluteString]); - XCTAssertEqualObjects(parsedJSON[OIDResponseTypesParam], request.responseTypes); - XCTAssertEqualObjects(parsedJSON[OIDGrantTypesParam], request.grantTypes); - XCTAssertEqualObjects(parsedJSON[OIDSubjectTypeParam], request.subjectType); - XCTAssertEqualObjects(parsedJSON[OIDTokenEndpointAuthenticationMethodParam], - request.tokenEndpointAuthenticationMethod); - XCTAssertEqualObjects(parsedJSON[kTestAdditionalParameterKey], kTestAdditionalParameterValue); -} - -@end diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDRegistrationResponseTests.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDRegistrationResponseTests.h deleted file mode 100644 index e3368870..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDRegistrationResponseTests.h +++ /dev/null @@ -1,33 +0,0 @@ -/*! @file OIDRegistrationResponseTests.h - @brief AppAuth iOS SDK - @copyright - Copyright 2016 The AppAuth for iOS Authors. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -@class OIDRegistrationResponse; - -NS_ASSUME_NONNULL_BEGIN - -@interface OIDRegistrationResponseTests : XCTestCase - -/*! @brief Creates a new @c OIDRegistrationResponseTests for testing. - */ -+ (OIDRegistrationResponse *)testInstance; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDRegistrationResponseTests.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDRegistrationResponseTests.m deleted file mode 100644 index f679e1ad..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDRegistrationResponseTests.m +++ /dev/null @@ -1,181 +0,0 @@ -/*! @file OIDRegistrationResponseTests.m - @brief AppAuth iOS SDK - @copyright - Copyright 2016 The AppAuth for iOS Authors. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDRegistrationResponseTests.h" - -#import "OIDClientMetadataParameters.h" -#import "OIDRegistrationRequestTests.h" -#import "Source/OIDRegistrationRequest.h" -#import "Source/OIDRegistrationResponse.h" - -/*! @brief The test value for the @c clientID property. - */ -static NSString *const kClientIDTestValue = @"client1"; - -/*! @brief The test value for the @c clientSecretExpiresAt property. - */ -static long long const kClientSecretExpiresAtTestValue = 1463414761; - -/*! @brief The test value for the @c clientSecret property. - */ -static NSString *const kClientSecretTestValue = @"secret1"; - -/*! @brief The test value for the @c clientIDIssuedAt property. - */ -static long long const kClientIDIssuedAtTestValue = 1463411161; - -/*! @brief The test value for the @c clientRegistrationAccessToken property. - */ -static NSString *const kClientRegistrationAccessTokenTestValue = @"abcdefgh"; - -/*! @brief The test value for the @c registrationClientURI property. - */ -static NSString *const kRegistrationClientURITestValue = @"https://provider.example.com/client1"; - -/*! @brief The test value for the @c tokenEndpointAuthenticationMethod property. - */ -static NSString *const kTokenEndpointAuthMethodTestValue = @"client_secret_basic"; - -/*! @brief Test key for the @c additionalParameters property. - */ -static NSString *const kTestAdditionalParameterKey = @"example_parameter"; - -/*! @brief Test value for the @c additionalParameters property. - */ -static NSString *const kTestAdditionalParameterValue = @"example_value"; - -@implementation OIDRegistrationResponseTests -+ (OIDRegistrationResponse *)testInstance { - OIDRegistrationRequest *request = [OIDRegistrationRequestTests testInstance]; - OIDRegistrationResponse *response = [[OIDRegistrationResponse alloc] initWithRequest:request - parameters:@{ - OIDClientIDParam : kClientIDTestValue, - OIDClientIDIssuedAtParam : @(kClientIDIssuedAtTestValue), - OIDClientSecretParam : kClientSecretTestValue, - OIDClientSecretExpirestAtParam : @(kClientSecretExpiresAtTestValue), - OIDRegistrationAccessTokenParam : kClientRegistrationAccessTokenTestValue, - OIDRegistrationClientURIParam : [NSURL URLWithString:kRegistrationClientURITestValue], - OIDTokenEndpointAuthenticationMethodParam : kTokenEndpointAuthMethodTestValue, - kTestAdditionalParameterKey : kTestAdditionalParameterValue - }]; - return response; -} - -/*! @brief Tests the @c NSCopying implementation by round-tripping an instance through the copying - process and checking to make sure the source and destination instances are equivalent. - */ -- (void)testCopying { - OIDRegistrationResponse *response = [[self class] testInstance]; - XCTAssertNotNil(response.request, @""); - XCTAssertEqualObjects(response.clientID, kClientIDTestValue, @""); - XCTAssertEqualObjects(response.clientIDIssuedAt, - [NSDate dateWithTimeIntervalSince1970:kClientIDIssuedAtTestValue], @""); - XCTAssertEqualObjects(response.clientSecret, kClientSecretTestValue, @""); - XCTAssertEqualObjects(response.clientSecretExpiresAt, - [NSDate dateWithTimeIntervalSince1970:kClientSecretExpiresAtTestValue], @""); - XCTAssertEqualObjects(response.registrationAccessToken, kClientRegistrationAccessTokenTestValue, @""); - XCTAssertEqualObjects(response.registrationClientURI, - [NSURL URLWithString:kRegistrationClientURITestValue], @""); - XCTAssertEqualObjects(response.tokenEndpointAuthenticationMethod, - kTokenEndpointAuthMethodTestValue, @""); - XCTAssertEqualObjects(response.additionalParameters[kTestAdditionalParameterKey], - kTestAdditionalParameterValue, @""); - - OIDRegistrationResponse *responseCopy = [response copy]; - - XCTAssertNotNil(responseCopy.request, @""); - XCTAssertEqualObjects(responseCopy.clientID, response.clientID, @""); - XCTAssertEqualObjects(responseCopy.clientIDIssuedAt, response.clientIDIssuedAt, @""); - XCTAssertEqualObjects(responseCopy.clientSecret, response.clientSecret, @""); - XCTAssertEqualObjects(responseCopy.clientSecretExpiresAt, response.clientSecretExpiresAt, @""); - XCTAssertEqualObjects(responseCopy.registrationAccessToken, response.registrationAccessToken, @""); - XCTAssertEqualObjects(responseCopy.registrationClientURI, response.registrationClientURI, @""); - XCTAssertEqualObjects(responseCopy.additionalParameters[kTestAdditionalParameterKey], - kTestAdditionalParameterValue, @""); -} - -/*! @brief Tests the @c NSSecureCoding by round-tripping an instance through the coding process and - checking to make sure the source and destination instances are equivalent. - */ -- (void)testSecureCoding { - OIDRegistrationResponse *response = [[self class] testInstance]; - NSData *data = [NSKeyedArchiver archivedDataWithRootObject:response]; - OIDRegistrationResponse *responseCopy = [NSKeyedUnarchiver unarchiveObjectWithData:data]; - - // Not a full test of the request deserialization, but should be sufficient as a smoke test - // to make sure the request IS actually getting serialized and deserialized in the - // NSSecureCoding implementation. We'll leave it up to the OIDAuthorizationRequest tests to make - // sure the NSSecureCoding implementation of that class is correct. - XCTAssertNotNil(responseCopy.request, @""); - XCTAssertEqualObjects(responseCopy.request.applicationType, response.request.applicationType, @""); - - XCTAssertEqualObjects(responseCopy.clientID, response.clientID, @""); - XCTAssertEqualObjects(responseCopy.clientIDIssuedAt, response.clientIDIssuedAt, @""); - XCTAssertEqualObjects(responseCopy.clientSecret, response.clientSecret, @""); - XCTAssertEqualObjects(responseCopy.clientSecretExpiresAt, response.clientSecretExpiresAt, @""); - XCTAssertEqualObjects(responseCopy.registrationAccessToken, response.registrationAccessToken, @""); - XCTAssertEqualObjects(responseCopy.registrationClientURI, response.registrationClientURI, @""); - XCTAssertEqualObjects(responseCopy.tokenEndpointAuthenticationMethod, - response.tokenEndpointAuthenticationMethod, @""); - XCTAssertEqualObjects(responseCopy.additionalParameters[kTestAdditionalParameterKey], - kTestAdditionalParameterValue, @""); -} - -/*! @brief Make sure the registration response is verified to ensure the 'client_secret_expires_at' - parameter exists if a 'client_secret' is issued. - @see https://openid.net/specs/openid-connect-registration-1_0.html#RegistrationResponse - */ -- (void)testMissingClientSecretExpiresAtWithClientSecret { - OIDRegistrationRequest *request = [OIDRegistrationRequestTests testInstance]; - OIDRegistrationResponse *response = [[OIDRegistrationResponse alloc] initWithRequest:request - parameters:@{ - OIDClientIDParam : kClientIDTestValue, - OIDClientSecretParam : kClientSecretTestValue, - }]; - XCTAssertNil(response, @""); -} - -/*! @brief Make sure the registration response missing 'registration_access_token' is detected when - 'client_registration_uri' is specified.. - @see https://openid.net/specs/openid-connect-registration-1_0.html#RegistrationResponse - */ -- (void)testMissingRegistrationAccessTokenWithRegistrationClientURI { - OIDRegistrationRequest *request = [OIDRegistrationRequestTests testInstance]; - OIDRegistrationResponse *response = [[OIDRegistrationResponse alloc] initWithRequest:request - parameters:@{ - OIDClientIDParam : kClientIDTestValue, - OIDRegistrationClientURIParam : [NSURL URLWithString:kRegistrationClientURITestValue] - }]; - XCTAssertNil(response, @""); -} - -/*! @brief Make sure the registration response missing 'client_registration_uri' is detected when - 'registration_access_token' is specified.. - @see https://openid.net/specs/openid-connect-registration-1_0.html#RegistrationResponse - */ -- (void)testMissingRegistrationClientURIWithRegistrationAccessToken { - OIDRegistrationRequest *request = [OIDRegistrationRequestTests testInstance]; - OIDRegistrationResponse *response = [[OIDRegistrationResponse alloc] initWithRequest:request - parameters:@{ - OIDClientIDParam : kClientIDTestValue, - OIDRegistrationAccessTokenParam : kClientRegistrationAccessTokenTestValue - }]; - XCTAssertNil(response, @""); -} - -@end diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDResponseTypesTests.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDResponseTypesTests.m deleted file mode 100644 index b55863af..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDResponseTypesTests.m +++ /dev/null @@ -1,50 +0,0 @@ -/*! @file OIDResponseTypesTests.m - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -#import "Source/OIDResponseTypes.h" - -// Ignore warnings about "Use of GNU statement expression extension" which is raised by our use of -// the XCTAssert___ macros. -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wgnu" - -/*! @brief Unit tests for constants in @c OIDResponseTypes.m. - @remarks Arguably not worth tests for this file, but adding them for consistency, and so that - any future enhancements have a place to add tests if need be. - */ -@interface OIDResponseTypesTests : XCTestCase -@end -@implementation OIDResponseTypesTests - -- (void)testCode { - XCTAssertEqualObjects(OIDResponseTypeCode, @"code", @""); -} - -- (void)testToken { - XCTAssertEqualObjects(OIDResponseTypeToken, @"token", @""); -} - -- (void)testIDToken { - XCTAssertEqualObjects(OIDResponseTypeIDToken, @"id_token", @""); -} - -@end - -#pragma GCC diagnostic pop diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDScopesTests.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDScopesTests.m deleted file mode 100644 index f6ffb9a6..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDScopesTests.m +++ /dev/null @@ -1,54 +0,0 @@ -/*! @file OIDScopesTests.m - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -#import "Source/OIDScopes.h" - -// Ignore warnings about "Use of GNU statement expression extension" which is raised by our use of -// the XCTAssert___ macros. -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wgnu" - -/*! @brief Unit tests for constants in @c OIDScopes.m. - @remarks Arguably not worth tests for this file, but adding them for consistency, and so that - any future enhancements have a place to add tests if need be. - */ -@interface OIDScopesTests : XCTestCase -@end -@implementation OIDScopesTests - -- (void)testAddress { - XCTAssertEqualObjects(OIDScopeAddress, @"address"); -} - -- (void)testEmail { - XCTAssertEqualObjects(OIDScopeEmail, @"email"); -} - -- (void)testPhone { - XCTAssertEqualObjects(OIDScopePhone, @"phone"); -} - -- (void)testProfile { - XCTAssertEqualObjects(OIDScopeProfile, @"profile"); -} - -@end - -#pragma GCC diagnostic pop diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDServiceConfigurationTests.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDServiceConfigurationTests.h deleted file mode 100644 index 982db2b5..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDServiceConfigurationTests.h +++ /dev/null @@ -1,35 +0,0 @@ -/*! @file OIDServiceConfigurationTests.h - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -@class OIDServiceConfiguration; - -NS_ASSUME_NONNULL_BEGIN - -/*! @brief Unit tests for @c OIDServiceConfiguration. - */ -@interface OIDServiceConfigurationTests : XCTestCase - -/*! @brief Creates a new @c OIDServiceConfiguration for testing. - */ -+ (OIDServiceConfiguration *)testInstance; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDServiceConfigurationTests.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDServiceConfigurationTests.m deleted file mode 100644 index ff7e3093..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDServiceConfigurationTests.m +++ /dev/null @@ -1,384 +0,0 @@ -/*! @file OIDServiceConfigurationTests.m - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDServiceConfigurationTests.h" - -#import - -#import "OIDServiceDiscoveryTests.h" -#import "Source/OIDAuthorizationService.h" -#import "Source/OIDError.h" -#import "Source/OIDServiceConfiguration.h" -#import "Source/OIDServiceDiscovery.h" - -// Ignore warnings about "Use of GNU statement expression extension" which is raised by our use of -// the XCTAssert___ macros. -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wgnu" - -/*! @brief The callback signature for @c NSURLSession 's @c dataTaskWithURL:completionHandler: - method, which we swizzle in @c testFetcher to fake the network response with an OpenID - Connect Discovery document. - */ -typedef void(^DataTaskWithURLCompletionHandler)(NSData *_Nullable data, - NSURLResponse *_Nullable response, - NSError *_Nullable error); - -/*! @brief The function signature for a @c dataTaskWithURL:completionHandler: implementation. Used - in @c testFetcher for implementing a swizzled version of @c NSURLSession 's - @c dataTaskWithURL:completionHandler: - */ -typedef NSURLSessionDataTask *(^DataTaskWithURLCompletionImplementation) - (id _self, NSURL *url, DataTaskWithURLCompletionHandler completionHandler); - -/*! @brief A block to be called during teardown. - */ -typedef void(^TeardownTask)(void); - -/*! @brief Test value for the @c authorizationEndpoint property. - */ -static NSString *const kInitializerTestAuthEndpoint = @"https://www.example.com/auth"; - -/*! @brief Test value for the @c tokenEndpoint property. - */ -static NSString *const kInitializerTestTokenEndpoint = @"https://www.example.com/token"; - -/*! @brief Test value for the @c tokenEndpoint property. - */ -static NSString *const kInitializerTestRegistrationEndpoint = - @"https://www.example.com/registration"; - -/*! @brief Test URL for OpenID Connect Discovery document. Not actually retrieved. - */ -static NSString *const kInitializerTestDiscoveryEndpoint = @"https://www.example.com/discovery"; - -/*! @brief Test issuer for OpenID Connect discovery - */ -static NSString *const kIssuerTestIssuer = @"https://accounts.google.com/"; - -/*! @brief Test issuer without a slash for OpenID Connect discovery - */ -static NSString *const kIssuerTestIssuer2 = @"https://accounts.google.com"; - -/*! @brief Test complete valid discovery URL - */ -static NSString *const kIssuerTestExpectedFullDiscoveryURL = - @"https://accounts.google.com/.well-known/openid-configuration"; - - -@implementation OIDServiceConfigurationTests { - /*! @brief A list of tasks to perform during tearDown. - */ - NSMutableArray *_teardownTasks; -} - -+ (OIDServiceConfiguration *)testInstance { - NSURL *authEndpoint = [NSURL URLWithString:kInitializerTestAuthEndpoint]; - NSURL *tokenEndpoint = [NSURL URLWithString:kInitializerTestTokenEndpoint]; - NSURL *registrationEndpoint = [NSURL URLWithString:kInitializerTestRegistrationEndpoint]; - OIDServiceConfiguration *configuration = - [[OIDServiceConfiguration alloc] initWithAuthorizationEndpoint:authEndpoint - tokenEndpoint:tokenEndpoint - registrationEndpoint:registrationEndpoint]; - return configuration; -} - -- (void)setUp { - _teardownTasks = [NSMutableArray array]; -} - - -- (void)tearDown { - for (TeardownTask task in _teardownTasks) { - task(); - } - _teardownTasks = nil; -} - -/*! @brief Replaces the given method with a block for testing, undoing the change during tearDown. - @param method The method to replace. - @param block The new implementation of the method to be used. - */ -- (void)replaceMethod:(Method)method withBlock:(id)block { - IMP originalImpl = method_getImplementation(method); - IMP testImpl = imp_implementationWithBlock(block); - // swizzles the method - method_setImplementation(method, testImpl); - // unswizzles the method during teardown - [_teardownTasks addObject:^(){ - method_setImplementation(method, originalImpl); - }]; -} - -/*! @brief Replaces the given instance method with a block for testing, reversing the change during - tearDown. - @param class The class whose method will be replaced. - @param selector The selector of the class method that will be replaced. - @param block The new implementation of the method to be used. - */ -- (void)replaceInstanceMethodForClass:(Class)class selector:(SEL)selector withBlock:(id)block { - Method method = class_getInstanceMethod(class, selector); - [self replaceMethod:method withBlock:block]; -} - -/*! @brief Replaces the given class method with a block for testing, reversing the change during - tearDown. - @param class The class whose method will be replaced. - @param selector The selector of the class method that will be replaced. - @param block The new implementation of the method to be used. - */ -- (void)replaceClassMethodForClass:(Class)class selector:(SEL)selector withBlock:(id)block { - Method method = class_getClassMethod(class, selector); - [self replaceMethod:method withBlock:block]; -} - -/*! @brief Tests the designated initializer. - */ -- (void)testInitializer { - OIDServiceConfiguration *configuration = [[self class] testInstance]; - XCTAssertEqualObjects(configuration.authorizationEndpoint.absoluteString, - kInitializerTestAuthEndpoint, @""); - XCTAssertEqualObjects(configuration.tokenEndpoint.absoluteString, - kInitializerTestTokenEndpoint); - XCTAssertEqualObjects(configuration.registrationEndpoint.absoluteString, - kInitializerTestRegistrationEndpoint, @""); -} - -- (void)testIssuer { - [self discoveryWithIssuer:kIssuerTestIssuer]; -} -- (void)testIssuer2 { - [self discoveryWithIssuer:kIssuerTestIssuer2]; -} - -- (void)discoveryWithIssuer:(NSString *)issuer { - XCTestExpectation *expectation = - [self expectationWithDescription:@"Discovery URL should be correct."]; - - id successfulResponse = - ^(id _self, NSURL *discoveryURL, OIDDiscoveryCallback completion) { - NSURL *fullDiscoveryURL = [NSURL URLWithString:kIssuerTestExpectedFullDiscoveryURL]; - if ([discoveryURL isEqual:fullDiscoveryURL]) { - [expectation fulfill]; - return; - } - - XCTAssert(NO, - @"Not equal %@ != %@", - [fullDiscoveryURL absoluteString], - [discoveryURL absoluteString]); - }; - - [self replaceClassMethodForClass:[OIDAuthorizationService class] - selector:@selector(discoverServiceConfigurationForDiscoveryURL:completion:) - withBlock:successfulResponse]; - - NSURL *issuerURL = [NSURL URLWithString:issuer]; - [OIDAuthorizationService discoverServiceConfigurationForIssuer:issuerURL - completion:^(OIDServiceConfiguration *_Nullable configuration, NSError *_Nullable error) {}]; - - [self waitForExpectationsWithTimeout:2 handler:nil]; -} - -/*! @brief Tests the OpenID Connect Discovery Document fetching and initialization. - */ -- (void)testFetcher { - DataTaskWithURLCompletionImplementation successfulResponse = - ^NSURLSessionDataTask *( - id _self, NSURL *url, DataTaskWithURLCompletionHandler completionHandler) { - NSError *error; - NSDictionary *jsonObject = - [OIDServiceDiscoveryTests completeServiceDiscoveryDictionary]; - NSData *jsonData = [NSJSONSerialization dataWithJSONObject:jsonObject - options:NSJSONWritingPrettyPrinted - error:&error]; - NSHTTPURLResponse *jsonResponse = - [[NSHTTPURLResponse alloc] initWithURL:url - statusCode:200 - HTTPVersion:@"1.1" - headerFields:nil]; - completionHandler(jsonData, jsonResponse, nil); - return nil; - }; - - [self replaceInstanceMethodForClass:[NSURLSession class] - selector:@selector(dataTaskWithURL:completionHandler:) - withBlock:successfulResponse]; - - - NSURL *url = [NSURL URLWithString:kInitializerTestDiscoveryEndpoint]; - - NSDictionary *expectedDictionary = - [OIDServiceDiscoveryTests completeServiceDiscoveryDictionary]; - OIDServiceDiscovery *expectedValues = - [[OIDServiceDiscovery alloc] initWithDictionary:expectedDictionary error:NULL]; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Callback should be fired."]; - OIDServiceConfigurationCreated callback = - ^(OIDServiceConfiguration *_Nullable serviceConfiguration, - NSError *_Nullable error) { - [expectation fulfill]; - XCTAssertNil(error, @""); - XCTAssertNotNil(serviceConfiguration, @""); - XCTAssertEqualObjects(serviceConfiguration.tokenEndpoint, - expectedValues.tokenEndpoint, @""); - XCTAssertEqualObjects(serviceConfiguration.authorizationEndpoint, - expectedValues.authorizationEndpoint, @""); - }; - [OIDAuthorizationService discoverServiceConfigurationForDiscoveryURL:url - completion:callback]; - [self waitForExpectationsWithTimeout:2 handler:nil]; -} - -/*! @brief Tests the OpenID Connect Discovery Document fetching and initialization in the face of - a network error. - */ -- (void)testFetcherWithNetworkError { - DataTaskWithURLCompletionImplementation successfulResponse = - ^NSURLSessionDataTask *( - id _self, NSURL *url, DataTaskWithURLCompletionHandler completionHandler) { - NSError *error = [NSError errorWithDomain:NSURLErrorDomain code:500 userInfo:nil]; - completionHandler(nil, nil, error); - return nil; - }; - - [self replaceInstanceMethodForClass:[NSURLSession class] - selector:@selector(dataTaskWithURL:completionHandler:) - withBlock:successfulResponse]; - - NSURL *url = [NSURL URLWithString:kInitializerTestDiscoveryEndpoint]; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Callback should be fired."]; - OIDServiceConfigurationCreated callback = - ^(OIDServiceConfiguration *_Nullable serviceConfiguration, - NSError *_Nullable error) { - [expectation fulfill]; - XCTAssertNotNil(error, @""); - XCTAssertNil(serviceConfiguration, @""); - }; - [OIDAuthorizationService discoverServiceConfigurationForDiscoveryURL:url - completion:callback]; - [self waitForExpectationsWithTimeout:2 handler:nil]; -} - -/*! @brief Tests the OpenID Connect Discovery Document fetching and initialization in the face of - a non-2xx HTTP status code. Should return an error. - */ -- (void)testFetcherWithErrorCode { - DataTaskWithURLCompletionImplementation successfulResponse = - ^NSURLSessionDataTask *( - id _self, NSURL *url, DataTaskWithURLCompletionHandler completionHandler) { - NSError *error; - NSDictionary *jsonObject = [OIDServiceDiscoveryTests completeServiceDiscoveryDictionary]; - NSData *jsonData = [NSJSONSerialization dataWithJSONObject:jsonObject - options:NSJSONWritingPrettyPrinted - error:&error]; - NSHTTPURLResponse *jsonResponse = - [[NSHTTPURLResponse alloc] initWithURL:url - statusCode:500 - HTTPVersion:@"1.1" - headerFields:nil]; - completionHandler(jsonData, jsonResponse, nil); - return nil; - }; - - [self replaceInstanceMethodForClass:[NSURLSession class] - selector:@selector(dataTaskWithURL:completionHandler:) - withBlock:successfulResponse]; - - - NSURL *url = [NSURL URLWithString:kInitializerTestDiscoveryEndpoint]; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Callback should be fired."]; - OIDServiceConfigurationCreated callback = - ^(OIDServiceConfiguration *_Nullable serviceConfiguration, - NSError *_Nullable error) { - [expectation fulfill]; - XCTAssertNotNil(error, @""); - XCTAssertNil(serviceConfiguration, @""); - }; - [OIDAuthorizationService discoverServiceConfigurationForDiscoveryURL:url - completion:callback]; - [self waitForExpectationsWithTimeout:2 handler:nil]; -} - -/*! @brief Tests the OpenID Connect Discovery Document fetching and initialization in the face of - bad JSON input. - */ -- (void)testFetcherWithBadJSON { - DataTaskWithURLCompletionImplementation successfulResponse = - ^NSURLSessionDataTask *( - id _self, NSURL *url, DataTaskWithURLCompletionHandler completionHandler) { - NSData *jsonData = [@"JUNK" dataUsingEncoding:NSUTF8StringEncoding]; - NSHTTPURLResponse *jsonResponse = - [[NSHTTPURLResponse alloc] initWithURL:url - statusCode:200 - HTTPVersion:@"1.1" - headerFields:nil]; - completionHandler(jsonData, jsonResponse, nil); - return nil; - }; - - [self replaceInstanceMethodForClass:[NSURLSession class] - selector:@selector(dataTaskWithURL:completionHandler:) - withBlock:successfulResponse]; - - NSURL *url = [NSURL URLWithString:kInitializerTestDiscoveryEndpoint]; - - XCTestExpectation *expectation = [self expectationWithDescription:@"Callback should be fired."]; - OIDServiceConfigurationCreated callback = - ^(OIDServiceConfiguration *_Nullable serviceConfiguration, - NSError *_Nullable error) { - [expectation fulfill]; - XCTAssertNotNil(error, @""); - XCTAssertNil(serviceConfiguration, @""); - }; - [OIDAuthorizationService discoverServiceConfigurationForDiscoveryURL:url - completion:callback]; - [self waitForExpectationsWithTimeout:2 handler:nil]; -} - -/*! @brief Tests the @c NSSecureCoding by round-tripping an instance through the coding process and - checking to make sure the source and destination instances have equivalent dictionaries. - */ -- (void)testSecureCoding { - OIDServiceConfiguration *configuration = [[self class] testInstance]; - NSData *data = [NSKeyedArchiver archivedDataWithRootObject:configuration]; - OIDServiceConfiguration *unarchived = [NSKeyedUnarchiver unarchiveObjectWithData:data]; - - XCTAssertEqualObjects(configuration.authorizationEndpoint, unarchived.authorizationEndpoint, @""); - XCTAssertEqualObjects(configuration.tokenEndpoint, unarchived.tokenEndpoint, @""); - XCTAssertEqualObjects(configuration.registrationEndpoint, unarchived.registrationEndpoint, @""); -} - -/*! @brief Tests the @c NSCopying implementation by round-tripping an instance through the copying - process and checking to make sure the source and destination instances have equivalent - dictionaries. - */ -- (void)testCopying { - OIDServiceConfiguration *configuration = [[self class] testInstance]; - OIDServiceConfiguration *unarchived = [configuration copy]; - - XCTAssertEqualObjects(configuration.authorizationEndpoint, unarchived.authorizationEndpoint, @""); - XCTAssertEqualObjects(configuration.tokenEndpoint, unarchived.tokenEndpoint, @""); - XCTAssertEqualObjects(configuration.registrationEndpoint, unarchived.registrationEndpoint, @""); -} - -@end - -#pragma GCC diagnostic pop diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDServiceDiscoveryTests.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDServiceDiscoveryTests.h deleted file mode 100644 index d45c3142..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDServiceDiscoveryTests.h +++ /dev/null @@ -1,35 +0,0 @@ -/*! @file OIDServiceDiscoveryTests.h - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -/*! @brief Unit tests for @c OIDServiceDiscovery. - */ -@interface OIDServiceDiscoveryTests : XCTestCase - -/*! @brief Returns a dictionary containing the REQUIRED fields for an OpenID Connect 1.0 Service - Discovery document. Used as a convenience for testing. - */ -+ (NSDictionary *)minimumServiceDiscoveryDictionary; - -/*! @brief A fully populated dictionary containing ALL fields for an OpenID Connect 1.0 Service - Discovery document. User as a convenience for testing. - */ -+ (NSDictionary *)completeServiceDiscoveryDictionary; - -@end diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDServiceDiscoveryTests.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDServiceDiscoveryTests.m deleted file mode 100644 index 3610c1e7..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDServiceDiscoveryTests.m +++ /dev/null @@ -1,528 +0,0 @@ -/*! @file OIDServiceDiscoveryTests.m - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDServiceDiscoveryTests.h" - -#import "Source/OIDError.h" -#import "Source/OIDServiceDiscovery.h" - -// Ignore warnings about "Use of GNU statement expression extension" which is raised by our use of -// the XCTAssert___ macros. -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wgnu" - -/*! Testing URL used when testing URL conversions. */ -static NSString *const kTestURL = @"http://www.google.com/"; - -/*! A string for testing an invalid URL. */ -static NSString *const kTestURLInvalid = @"abc"; - -/*! Field keys associated with an OpenID Connect Discovery Document. */ -static NSString *const kIssuerKey = @"issuer"; -static NSString *const kAuthorizationEndpointKey = @"authorization_endpoint"; -static NSString *const kTokenEndpointKey = @"token_endpoint"; -static NSString *const kUserinfoEndpointKey = @"userinfo_endpoint"; -static NSString *const kJWKSURLKey = @"jwks_uri"; -static NSString *const kRegistrationEndpointKey = @"registration_endpoint"; -static NSString *const kScopesSupportedKey = @"scopes_supported"; -static NSString *const kResponseTypesSupportedKey = @"response_types_supported"; -static NSString *const kResponseModesSupportedKey = @"response_modes_supported"; -static NSString *const kGrantTypesSupportedKey = @"grant_types_supported"; -static NSString *const kACRValuesSupportedKey = @"acr_values_supported"; -static NSString *const kSubjectTypesSupportedKey = @"subject_types_supported"; -static NSString *const kIDTokenSigningAlgorithmValuesSupportedKey = - @"id_token_signing_alg_values_supported"; -static NSString *const kIDTokenEncryptionAlgorithmValuesSupportedKey = - @"id_token_encryption_alg_values_supported"; -static NSString *const kIDTokenEncryptionEncodingValuesSupportedKey = - @"id_token_encryption_enc_values_supported"; -static NSString *const kUserinfoSigningAlgorithmValuesSupportedKey = - @"userinfo_signing_alg_values_supported"; -static NSString *const kUserinfoEncryptionAlgorithmValuesSupportedKey = - @"userinfo_encryption_alg_values_supported"; -static NSString *const kUserinfoEncryptionEncodingValuesSupportedKey = - @"userinfo_encryption_enc_values_supported"; -static NSString *const kRequestObjectSigningAlgorithmValuesSupportedKey = - @"request_object_signing_alg_values_supported"; -static NSString *const kRequestObjectEncryptionAlgorithmValuesSupportedKey = - @"request_object_encryption_alg_values_supported"; -static NSString *const kRequestObjectEncryptionEncodingValuesSupported = - @"request_object_encryption_enc_values_supported"; -static NSString *const kTokenEndpointAuthMethodsSupportedKey = - @"token_endpoint_auth_methods_supported"; -static NSString *const kTokenEndpointAuthSigningAlgorithmValuesSupportedKey = - @"token_endpoint_auth_signing_alg_values_supported"; -static NSString *const kDisplayValuesSupportedKey = @"display_values_supported"; -static NSString *const kClaimTypesSupportedKey = @"claim_types_supported"; -static NSString *const kClaimsSupportedKey = @"claims_supported"; -static NSString *const kServiceDocumentationKey = @"service_documentation"; -static NSString *const kClaimsLocalesSupportedKey = @"claims_locales_supported"; -static NSString *const kUILocalesSupportedKey = @"ui_locales_supported"; -static NSString *const kClaimsParameterSupportedKey = @"claims_parameter_supported"; -static NSString *const kRequestParameterSupportedKey = @"request_parameter_supported"; -static NSString *const kRequestURIParameterSupportedKey = @"request_uri_parameter_supported"; -static NSString *const kRequireRequestURIRegistrationKey = @"require_request_uri_registration"; -static NSString *const kOPPolicyURIKey = @"op_policy_uri"; -static NSString *const kOPTosURIKey = @"op_tos_uri"; - -@implementation OIDServiceDiscoveryTests - -+ (NSDictionary *)minimumServiceDiscoveryDictionary { - return @{ - kIssuerKey : @"http://www.example.com/issuer", - kAuthorizationEndpointKey : @"http://www.example.com/authorization", - kTokenEndpointKey : @"http://www.example.com/token", - kJWKSURLKey : @"http://www.example.com/jwks", - kResponseTypesSupportedKey : @"Response Types Supported", - kSubjectTypesSupportedKey : @"Subject Types Supported", - kIDTokenSigningAlgorithmValuesSupportedKey : @"ID Token Signing Algorithm Values Supported", - }; -} - -+ (NSDictionary *)completeServiceDiscoveryDictionary { - return @{ - kIssuerKey : @"http://www.example.com/issuer", - kAuthorizationEndpointKey : @"http://www.example.com/authorization", - kTokenEndpointKey : @"http://www.example.com/token", - kUserinfoEndpointKey : @"User Info Endpoint", - kJWKSURLKey : @"http://www.example.com/jwks", - kRegistrationEndpointKey : @"Registration Endpoint", - kScopesSupportedKey : @"Scopes Supported", - kResponseTypesSupportedKey : @"Response Types Supported", - kResponseModesSupportedKey : @"Response Modes Supported", - kGrantTypesSupportedKey : @"Grant Types Supported", - kACRValuesSupportedKey : @"ACR Values Supported", - kSubjectTypesSupportedKey : @"Subject Types Supported", - kIDTokenSigningAlgorithmValuesSupportedKey : @"Token Signing Algorithm Values Supported", - kIDTokenEncryptionAlgorithmValuesSupportedKey : @"Token Encryption Algorithm Values Supported", - kIDTokenEncryptionEncodingValuesSupportedKey : @"token Encryption Encoding Values Supported", - kUserinfoSigningAlgorithmValuesSupportedKey : @"User Info Signing Algorithm Values Supported", - kUserinfoEncryptionAlgorithmValuesSupportedKey : - @"User Info Encryption Algorithm Values Supported", - kUserinfoEncryptionEncodingValuesSupportedKey : - @"User Info Encryption Encoding Values Supported", - kRequestObjectSigningAlgorithmValuesSupportedKey : - @"Request Object Signing Algorithm Values Supported", - kRequestObjectEncryptionAlgorithmValuesSupportedKey : - @"Reqest Object Encryption Algorithm Values Supported", - kRequestObjectEncryptionEncodingValuesSupported : - @"Request Object Encryption Encoding Values Supported", - kTokenEndpointAuthMethodsSupportedKey : @"Token Endpoint Auth Methods Supported", - kTokenEndpointAuthSigningAlgorithmValuesSupportedKey : - @"Token Endpoint Auth Signing Algorithm Values Supported", - kDisplayValuesSupportedKey : @"Display Values Supported", - kClaimTypesSupportedKey : @"Claim Types Supported", - kClaimsSupportedKey : @"Claims Supported", - kServiceDocumentationKey : @"Service Documentation", - kClaimsLocalesSupportedKey : @"Claims Locales Supported", - kUILocalesSupportedKey : @"UI Locales Supported", - kClaimsParameterSupportedKey : @YES, - kRequestParameterSupportedKey : @YES, - kRequestURIParameterSupportedKey : @NO, - kRequireRequestURIRegistrationKey : @YES, - kOPPolicyURIKey : @"OP Policy URI", - kOPTosURIKey : @"OP TOS URI", - }; -} - -+ (NSURL *)googleDiscoveryAuthorizationEndpoint { - return [NSURL URLWithString:@"https://accounts.google.com/o/oauth2/v2/auth"]; -} - -// from https://accounts.google.com/.well-known/openid-configuration -static NSString *const kDiscoveryDocument = - @"{\"issuer\":\"https://accounts.google.com\",\"authorization_endpoint\":\"https://account" - "s.google.com/o/oauth2/v2/auth\",\"token_endpoint\":\"https://www.googleapis.com/oauth2/v4/to" - "ken\",\"userinfo_endpoint\":\"https://www.googleapis.com/oauth2/v3/userinfo\",\"revocation_e" - "ndpoint\":\"https://accounts.google.com/o/oauth2/revoke\",\"jwks_uri\":\"https://www.googlea" - "pis.com/oauth2/v3/certs\",\"response_types_supported\":[\"code\",\"token\",\"id_token\",\"co" - "de token\",\"code id_token\",\"token id_token\",\"code token id_token\",\"none\"],\"subject_" - "types_supported\":[\"public\"],\"id_token_signing_alg_values_supported\":[\"RS256\"],\"scope" - "s_supported\":[\"openid\",\"email\",\"profile\"],\"token_endpoint_auth_methods_supported\":[" - "\"client_secret_post\",\"client_secret_basic\"],\"claims_supported\":[\"aud\",\"email\",\"em" - "ail_verified\",\"exp\",\"family_name\",\"given_name\",\"iat\",\"iss\",\"locale\",\"name\",\"" - "picture\",\"sub\"]}"; - -// from https://accounts.google.com/.well-known/openid-configuration with authorization_endpoint -// removed -static NSString *const kDiscoveryDocumentMissingField = - @"{\"issuer\":\"https://accounts.google.com\",\"token_endpoint\":\"https://www.googleapis." - "com/oauth2/v4/to" - "ken\",\"userinfo_endpoint\":\"https://www.googleapis.com/oauth2/v3/userinfo\",\"revocation_e" - "ndpoint\":\"https://accounts.google.com/o/oauth2/revoke\",\"jwks_uri\":\"https://www.googlea" - "pis.com/oauth2/v3/certs\",\"response_types_supported\":[\"code\",\"token\",\"id_token\",\"co" - "de token\",\"code id_token\",\"token id_token\",\"code token id_token\",\"none\"],\"subject_" - "types_supported\":[\"public\"],\"id_token_signing_alg_values_supported\":[\"RS256\"],\"scope" - "s_supported\":[\"openid\",\"email\",\"profile\"],\"token_endpoint_auth_methods_supported\":[" - "\"client_secret_post\",\"client_secret_basic\"],\"claims_supported\":[\"aud\",\"email\",\"em" - "ail_verified\",\"exp\",\"family_name\",\"given_name\",\"iat\",\"iss\",\"locale\",\"name\",\"" - "picture\",\"sub\"]}"; - - // from https://accounts.google.com/.well-known/openid-configuration with authorization_endpoint - // and token_endpoint set to JSON 'null' -static NSString *const kDiscoveryDocumentNullField = - @"{\"issuer\":\"https://accounts.google.com\",\"authorization_endpoint\":null," - "\"token_endpoint\":null" - ",\"userinfo_endpoint\":\"https://www.googleapis.com/oauth2/v3/userinfo\",\"revocation_e" - "ndpoint\":\"https://accounts.google.com/o/oauth2/revoke\",\"jwks_uri\":\"https://www.googlea" - "pis.com/oauth2/v3/certs\",\"response_types_supported\":[\"code\",\"token\",\"id_token\",\"co" - "de token\",\"code id_token\",\"token id_token\",\"code token id_token\",\"none\"],\"subject_" - "types_supported\":[\"public\"],\"id_token_signing_alg_values_supported\":[\"RS256\"],\"scope" - "s_supported\":[\"openid\",\"email\",\"profile\"],\"token_endpoint_auth_methods_supported\":[" - "\"client_secret_post\",\"client_secret_basic\"],\"claims_supported\":[\"aud\",\"email\",\"em" - "ail_verified\",\"exp\",\"family_name\",\"given_name\",\"iat\",\"iss\",\"locale\",\"name\",\"" - "picture\",\"sub\"]}"; - -/*! @brief Tests that URLs are handled properly when converted from the dictionary's string - representation. - */ -- (void)testURLs { - NSError *error; - NSMutableDictionary *serviceDiscoveryDictionary = - [[[self class] minimumServiceDiscoveryDictionary] mutableCopy]; - serviceDiscoveryDictionary[kOPPolicyURIKey] = kTestURL; - OIDServiceDiscovery *discovery = - [[OIDServiceDiscovery alloc] initWithDictionary:serviceDiscoveryDictionary - error:&error]; - XCTAssertNotNil(discovery, @"We supplied the minimum required fields when initializing the " - "service discovery instance, so we should have gotten a new " - "instance."); - XCTAssertNil(error, @"We supplied the minimum required fields when initializing the " - "service discovery instance, so we should not have gotten an error."); - - NSURL *testPolicyURL = [NSURL URLWithString:kTestURL]; - - XCTAssertEqualObjects(discovery.OPPolicyURI, testPolicyURL, @""); -} - -/*! @brief Tests that we get an error when the document is not valid JSON. - */ -- (void)testErrorWhenBadFormat { - NSError *error; - OIDServiceDiscovery *discovery = [[OIDServiceDiscovery alloc] initWithJSON:@"JUNK" error:&error]; - XCTAssertNil(discovery, @"When initializing a discovery document, it should not return an " - "instance if it is not valid JSON."); - XCTAssertNotNil(error, @"There should be an error indicating we received bad JSON."); - XCTAssertEqualObjects(error.domain, OIDGeneralErrorDomain, @""); - XCTAssertEqual(error.code, OIDErrorCodeJSONDeserializationError, @""); -} - -/*! @brief Tests that we get an error when the required fields aren't in the source dictionary. - */ -- (void)testErrorWhenMissingFields { - NSError *error; - OIDServiceDiscovery *discovery = - [[OIDServiceDiscovery alloc] initWithDictionary:@{ } error:&error]; - XCTAssertNil(discovery, @"When initializing a discovery document, it should not return an " - "instance if there are missing required fields."); - XCTAssertNotNil(error, @"There should be an error indicating we are missing required fields."); - XCTAssertEqualObjects(error.domain, OIDGeneralErrorDomain, @""); - XCTAssertEqual(error.code, OIDErrorCodeInvalidDiscoveryDocument, @""); -} - -/*! @brief Tests that we get an error when the required fields aren't in the source dictionary. - */ -- (void)testErrorWhenMissingFieldsJSON { - NSError *error; - OIDServiceDiscovery *discovery = - [[OIDServiceDiscovery alloc] initWithJSON:kDiscoveryDocumentMissingField error:&error]; - XCTAssertNil(discovery, @"When initializing a discovery document with JSON, it should not return" - " an instance if there are missing required fields."); - XCTAssertNotNil(error, @"There should be an error indicating we are missing required fields."); - XCTAssertEqualObjects(error.domain, OIDGeneralErrorDomain, @""); - XCTAssertEqual(error.code, OIDErrorCodeInvalidDiscoveryDocument, @""); -} - -/*! @brief Tests that we do not get an error, and we do get an instance of - @c OIDServiceDiscovery when the required fields are in the source dictionary. - */ -- (void)testNoErrorWhenNoMissingFields { - NSError *error; - NSDictionary *serviceDiscoveryDictionary = [[self class] minimumServiceDiscoveryDictionary]; - OIDServiceDiscovery *discovery = - [[OIDServiceDiscovery alloc] initWithDictionary:serviceDiscoveryDictionary - error:&error]; - XCTAssertNotNil(discovery, @"We supplied the minimum required fields when initializing the " - "service discovery instance, so we should have gotten a new " - "instance."); - XCTAssertNil(error, @"We supplied the minimum required fields when initializing the " - "service discovery instance, so we should not have gotten an error."); -} - -/*! @brief Tests that we get an error when the required fields are present but invalid. - */ -// TODO: this test is failing -- (void)pendingTestErrorWhenMalformedFields { - NSError *error; - // builds a discovery document with a munged field - NSMutableDictionary *serviceDiscoveryDictionary = - [[[self class] minimumServiceDiscoveryDictionary] mutableCopy]; - [serviceDiscoveryDictionary setObject:kTestURLInvalid forKey:kAuthorizationEndpointKey]; - [serviceDiscoveryDictionary setObject:kTestURLInvalid forKey:kTokenEndpointKey]; - - OIDServiceDiscovery *discovery = - [[OIDServiceDiscovery alloc] initWithDictionary:serviceDiscoveryDictionary error:&error]; - XCTAssertNil(discovery, - @"When initializing a discovery document, it should not return an instance if there" - " are missing required fields."); - XCTAssertNotNil(error, @"There should be an error indicating we are missing required fields."); - XCTAssertEqualObjects(error.domain, OIDGeneralErrorDomain, @""); - XCTAssertEqual(error.code, OIDErrorCodeInvalidDiscoveryDocument, @""); -} - -/*! @brief Tests that we get an error when null is passed in through JSON. - */ -// TODO: this test is failing -- (void)pendingTestErrorWhenJSONNullField { - NSError *error; - OIDServiceDiscovery *discovery = - [[OIDServiceDiscovery alloc] initWithJSON:kDiscoveryDocumentNullField error:&error]; - XCTAssertNil(discovery, @"When initializing a discovery document, it should not return an " - "instance if there are missing required fields."); - XCTAssertNotNil(error, @"There should be an error indicating we are missing required fields."); - XCTAssertEqualObjects(error.domain, OIDGeneralErrorDomain, @""); - XCTAssertEqual(error.code, OIDErrorCodeInvalidDiscoveryDocument, @""); -} - -/*! @brief Tests that the JSON String version results in a valid object. - */ -- (void)testJSONStringDecoding { - NSError *error; - OIDServiceDiscovery *discovery = - [[OIDServiceDiscovery alloc] initWithJSON:kDiscoveryDocument error:&error]; - XCTAssertNotNil(discovery, @"When initializing a discovery document with JSON it should return a" - "valid object"); - XCTAssertNil(error, @"There should not be any errors."); - XCTAssertEqualObjects(discovery.authorizationEndpoint, - [[self class] googleDiscoveryAuthorizationEndpoint], @""); -} - -/*! @brief Tests that the JSON NSData version results in a valid object. - */ -- (void)testJSONDataDecoding { - NSError *error; - NSData *jsonData = [kDiscoveryDocument dataUsingEncoding:NSUTF8StringEncoding]; - OIDServiceDiscovery *discovery = - [[OIDServiceDiscovery alloc] initWithJSONData:jsonData error:&error]; - XCTAssertNotNil(discovery, @"When initializing a discovery document with JSON it should return a" - "valid object"); - XCTAssertNil(error, @"There should not be any errors."); - XCTAssertEqualObjects(discovery.authorizationEndpoint, - [[self class] googleDiscoveryAuthorizationEndpoint], @""); -} - -/*! @brief Tests that initialising with the dictionary initialiser and the JSON initialiser result - in equal objects. - */ -// TODO: this test is failing -- (void)pendingTestJSONEqualsDictionary { - NSError *error; - OIDServiceDiscovery *discovery = - [[OIDServiceDiscovery alloc] initWithDictionary:[[self class] minimumServiceDiscoveryDictionary] - error:&error]; - XCTAssertNotNil(discovery, @"Discovery document should initialize."); - XCTAssertNil(error, @"There should not be any errors."); - - NSData *jsonData = [NSJSONSerialization dataWithJSONObject:discovery.discoveryDictionary - options:0 - error:&error]; - XCTAssertNotNil(jsonData, @"Serialization error"); - XCTAssertNil(error, @"Serialization error"); - - OIDServiceDiscovery *discovery2 = - [[OIDServiceDiscovery alloc] initWithJSONData:jsonData error:&error]; - XCTAssertNotNil(discovery2, @"Discovery document should initialize."); - XCTAssertNil(error, @"There should not be any errors."); - - XCTAssertEqualObjects(discovery.discoveryDictionary, discovery2.discoveryDictionary, @""); - XCTAssertEqualObjects(discovery, discovery2, @""); -} - - -/*! @brief Tests that requestURIParameterSupported returns YES (the default) when not specified in - the source dictionary. - */ -- (void)testRequestURIParameterSupportedDefaultToYes { - NSError *error; - NSDictionary *serviceDiscoveryDictionary = [[self class] minimumServiceDiscoveryDictionary]; - OIDServiceDiscovery *discovery = - [[OIDServiceDiscovery alloc] initWithDictionary:serviceDiscoveryDictionary - error:&error]; - XCTAssert(discovery.requestURIParameterSupported, - @"When not specified, |requestURIParameterSupported| should return YES."); -} - -/*! @brief Tests the NSSecureCoding by round-tripping an instance through the coding process and - checking to make sure the source and destination instances have equivalent dictionaries. - */ -- (void)testSecureCoding { - NSError *error; - NSDictionary *serviceDiscoveryDictionary = [[self class] completeServiceDiscoveryDictionary]; - OIDServiceDiscovery *discovery = - [[OIDServiceDiscovery alloc] initWithDictionary:serviceDiscoveryDictionary - error:&error]; - NSData *data = [NSKeyedArchiver archivedDataWithRootObject:discovery]; - OIDServiceDiscovery *unarchived = [NSKeyedUnarchiver unarchiveObjectWithData:data]; - - XCTAssertEqualObjects(discovery.discoveryDictionary, unarchived.discoveryDictionary, @""); -} - -/*! @brief Tests the NSCopying implementation by round-tripping an instance through the copying - process and checking to make sure the source and destination instances have equivalent - dictionaries. - */ -- (void)testCopying { - NSError *error; - NSDictionary *serviceDiscoveryDictionary = [[self class] completeServiceDiscoveryDictionary]; - OIDServiceDiscovery *discovery = - [[OIDServiceDiscovery alloc] initWithDictionary:serviceDiscoveryDictionary - error:&error]; - - OIDServiceDiscovery *unarchived = [discovery copy]; - - XCTAssertEqualObjects(discovery.discoveryDictionary, unarchived.discoveryDictionary, @""); -} - -#pragma mark - Field Mappings - -/*! @define TestFieldBackedBy - @brief Auto-generates unit test methods for checking that a property in - @c OIDServiceDiscovery is, in fact, using the key specified by the second - parameter as it's source of data. - */ -#define TestFieldBackedBy(_field_, _backed_by_, _test_value_) \ - \ -- (void)testField_##_field_ { \ - NSError *error; \ - NSMutableDictionary *json = [[[self class] minimumServiceDiscoveryDictionary] mutableCopy]; \ - [json addEntriesFromDictionary:@{ \ - _backed_by_ : _test_value_ \ - }]; \ - OIDServiceDiscovery *discovery = \ - [[OIDServiceDiscovery alloc] initWithDictionary:json error:&error]; \ - XCTAssertNotNil(discovery, @"We supplied the minimum required fields when initializing the " \ - "service discovery instance, so we should have gotten a new " \ - "instance."); \ - XCTAssertNil(error, @"We supplied the minimum required fields when initializing the " \ - "service discovery instance, so we should not have gotten an error."); \ - XCTAssertEqualObjects(discovery._field_, _test_value_); \ -} - -/*! @define TestBooleanFieldBackedBy - @brief Same as @c TestFieldBackedBy, but tweaked to allow for BOOL values. - */ -#define TestBooleanFieldBackedBy(_field_, _backed_by_, _test_value_) \ - \ -- (void)testField_##_field_ { \ - NSError *error; \ - NSMutableDictionary *json = [[[self class] minimumServiceDiscoveryDictionary] mutableCopy]; \ - [json addEntriesFromDictionary:@{ \ - _backed_by_ : @(_test_value_) \ - }]; \ - OIDServiceDiscovery *discovery = \ - [[OIDServiceDiscovery alloc] initWithDictionary:json error:&error]; \ - XCTAssertNotNil(discovery, @"We supplied the minimum required fields when initializing the " \ - "service discovery instance, so we should have gotten a new " \ - "instance."); \ - XCTAssertNil(error, @"We supplied the minimum required fields when initializing the " \ - "service discovery instance, so we should not have gotten an error."); \ - XCTAssertEqual(discovery._field_, _test_value_); \ -} - -/*! @define TestURLFieldBackedBy - @brief Same as @c TestFieldBackedBy, but tweaked to allow for URL values. - */ -#define TestURLFieldBackedBy(_field_, _backed_by_, _test_value_) \ - \ -- (void)testField_##_field_ { \ - NSError *error; \ - NSMutableDictionary *json = [[[self class] minimumServiceDiscoveryDictionary] mutableCopy]; \ - [json addEntriesFromDictionary:@{ \ - _backed_by_ : _test_value_ \ - }]; \ - OIDServiceDiscovery *discovery = \ - [[OIDServiceDiscovery alloc] initWithDictionary:json error:&error]; \ - XCTAssertNotNil(discovery, @"We supplied the minimum required fields when initializing the " \ - "service discovery instance, so we should have gotten a new " \ - "instance."); \ - XCTAssertNil(error, @"We supplied the minimum required fields when initializing the " \ - "service discovery instance, so we should not have gotten an error."); \ - XCTAssertEqualObjects(discovery._field_, [NSURL URLWithString:_test_value_]); \ -} - -TestURLFieldBackedBy(issuer, kIssuerKey, kTestURL) -TestURLFieldBackedBy(authorizationEndpoint, kAuthorizationEndpointKey, kTestURL) -TestURLFieldBackedBy(tokenEndpoint, kTokenEndpointKey, kTestURL) -TestURLFieldBackedBy(userinfoEndpoint, kUserinfoEndpointKey, kTestURL) -TestURLFieldBackedBy(jwksURL, kJWKSURLKey, kTestURL) -TestURLFieldBackedBy(registrationEndpoint, kRegistrationEndpointKey, kTestURL) -TestFieldBackedBy(scopesSupported, kScopesSupportedKey, @"Scopes Supported") -TestFieldBackedBy(responseTypesSupported, kResponseTypesSupportedKey, @"Response Types Supported") -TestFieldBackedBy(responseModesSupported, kResponseModesSupportedKey, @"Response Modes Supported") -TestFieldBackedBy(grantTypesSupported, kGrantTypesSupportedKey, @"Grant Types Supported") -TestFieldBackedBy(acrValuesSupported, kACRValuesSupportedKey, @"ACR Values Supported") -TestFieldBackedBy(subjectTypesSupported, kSubjectTypesSupportedKey, @"Subject Types Supported") -TestFieldBackedBy(IDTokenSigningAlgorithmValuesSupported, - kIDTokenSigningAlgorithmValuesSupportedKey, - @"Token Signing Algorithm Values Supported") -TestFieldBackedBy(IDTokenEncryptionAlgorithmValuesSupported, - kIDTokenEncryptionAlgorithmValuesSupportedKey, - @"Token Encryption Algorithm Values Supported") -TestFieldBackedBy(IDTokenEncryptionEncodingValuesSupported, - kIDTokenEncryptionEncodingValuesSupportedKey, - @"token Encryption Encoding Values Supported") -TestFieldBackedBy(userinfoSigningAlgorithmValuesSupported, - kUserinfoSigningAlgorithmValuesSupportedKey, - @"User Info Signing Algorithm Values Supported") -TestFieldBackedBy(userinfoEncryptionAlgorithmValuesSupported, - kUserinfoEncryptionAlgorithmValuesSupportedKey, - @"User Info Encryption Algorithm Values Supported") -TestFieldBackedBy(userinfoEncryptionEncodingValuesSupported, - kUserinfoEncryptionEncodingValuesSupportedKey, - @"User Info Encryption Encoding Values Supported") -TestFieldBackedBy(requestObjectSigningAlgorithmValuesSupported, - kRequestObjectSigningAlgorithmValuesSupportedKey, - @"Request Object Signing Algorithm Values Supported") -TestFieldBackedBy(requestObjectEncryptionAlgorithmValuesSupported, - kRequestObjectEncryptionAlgorithmValuesSupportedKey, - @"Reqest Object Encryption Algorithm Values Supported") -TestFieldBackedBy(requestObjectEncryptionEncodingValuesSupported, - kRequestObjectEncryptionEncodingValuesSupported, - @"Request Object Encryption Encoding Values Supported") -TestFieldBackedBy(tokenEndpointAuthMethodsSupported, - kTokenEndpointAuthMethodsSupportedKey, - @"Token Endpoint Auth Methods Supported") -TestFieldBackedBy(tokenEndpointAuthSigningAlgorithmValuesSupported, - kTokenEndpointAuthSigningAlgorithmValuesSupportedKey, - @"Token Endpoint Auth Signing Algorithm Values Supported") -TestFieldBackedBy(displayValuesSupported, kDisplayValuesSupportedKey, @"Display Values Supported") -TestFieldBackedBy(claimTypesSupported, kClaimTypesSupportedKey, @"Claim Types Supported") -TestFieldBackedBy(claimsSupported, kClaimsSupportedKey, @"Claims Supported") -TestURLFieldBackedBy(serviceDocumentation, kServiceDocumentationKey, kTestURL) -TestFieldBackedBy(claimsLocalesSupported, kClaimsLocalesSupportedKey, @"Claims Locales Supported") -TestFieldBackedBy(UILocalesSupported, kUILocalesSupportedKey, @"UI Locales Supported") -TestBooleanFieldBackedBy(claimsParameterSupported, kClaimsParameterSupportedKey, YES) -TestBooleanFieldBackedBy(requestParameterSupported, kRequestParameterSupportedKey, YES) -TestBooleanFieldBackedBy(requestURIParameterSupported, kRequestURIParameterSupportedKey, NO) -TestBooleanFieldBackedBy(requireRequestURIRegistration, kRequireRequestURIRegistrationKey, YES) -TestURLFieldBackedBy(OPPolicyURI, kOPPolicyURIKey, kTestURL) -TestURLFieldBackedBy(OPTosURI, kOPTosURIKey, kTestURL) - -@end - -#pragma GCC diagnostic pop diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDSwiftTests.swift b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDSwiftTests.swift deleted file mode 100644 index bd353692..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDSwiftTests.swift +++ /dev/null @@ -1,35 +0,0 @@ -/*! @file SwiftTests.swift - @brief AppAuth iOS SDK - @copyright - Copyright 2017 The AppAuth for iOS Authors. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -import Foundation -import XCTest - -/*! @brief Unit tests to verify Swift compatability. - */ -class OIDSwiftTests: XCTestCase { - - /*! @brief Tests creation of a basic AppAuth object. - */ - func testSwift() { - let authorizationEndpoint = URL(string: "https://example.com/authorization")! - let tokenEndpoint = URL(string: "https://example.com/token")! - let service = OIDServiceConfiguration(authorizationEndpoint: authorizationEndpoint, - tokenEndpoint: tokenEndpoint) - XCTAssertNotNil(service, "OIDServiceConfiguration not nil") - } -} diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDTokenRequestTests.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDTokenRequestTests.h deleted file mode 100644 index 5b58522d..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDTokenRequestTests.h +++ /dev/null @@ -1,43 +0,0 @@ -/*! @file OIDTokenRequestTests.h - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -@class OIDTokenRequest; - -NS_ASSUME_NONNULL_BEGIN - -/*! @brief Unit tests for @c OIDTokenRequest. - */ -@interface OIDTokenRequestTests : XCTestCase - -/*! @brief Creates a new @c OIDTokenRequest for testing. - */ -+ (OIDTokenRequest *)testInstance; - -/*! @brief Creates a new @c OIDTokenRequest for testing the code exchange. - */ -+ (OIDTokenRequest *)testInstanceCodeExchange; - -/*! @brief Creates a new @c OIDTokenRequest for testing the token refresh. - */ -+ (OIDTokenRequest *)testInstanceRefresh; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDTokenRequestTests.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDTokenRequestTests.m deleted file mode 100644 index 3913b832..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDTokenRequestTests.m +++ /dev/null @@ -1,260 +0,0 @@ -/*! @file OIDTokenRequestTests.m - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDTokenRequestTests.h" - -#import "OIDAuthorizationResponseTests.h" -#import "OIDServiceConfigurationTests.h" -#import "Source/OIDAuthorizationRequest.h" -#import "Source/OIDAuthorizationResponse.h" -#import "Source/OIDScopeUtilities.h" -#import "Source/OIDServiceConfiguration.h" -#import "Source/OIDTokenRequest.h" - -// Ignore warnings about "Use of GNU statement expression extension" which is raised by our use of -// the XCTAssert___ macros. -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wgnu" - -/*! @brief Test value for the @c refreshToken property. - */ -static NSString *const kRefreshTokenTestValue = @"refresh_token"; - -/*! @brief Test key for the @c additionalParameters property. - */ -static NSString *const kTestAdditionalParameterKey = @"A"; - -/*! @brief Test value for the @c additionalParameters property. - */ -static NSString *const kTestAdditionalParameterValue = @"1"; - -@implementation OIDTokenRequestTests - -+ (OIDTokenRequest *)testInstance { - OIDAuthorizationResponse *authResponse = [OIDAuthorizationResponseTests testInstance]; - NSArray *scopesArray = - [OIDScopeUtilities scopesArrayWithString:authResponse.request.scope]; - NSDictionary *additionalParameters = - @{ kTestAdditionalParameterKey : kTestAdditionalParameterValue }; - OIDTokenRequest *request = - [[OIDTokenRequest alloc] initWithConfiguration:authResponse.request.configuration - grantType:OIDGrantTypeAuthorizationCode - authorizationCode:authResponse.authorizationCode - redirectURL:authResponse.request.redirectURL - clientID:authResponse.request.clientID - clientSecret:authResponse.request.clientSecret - scopes:scopesArray - refreshToken:kRefreshTokenTestValue - codeVerifier:authResponse.request.codeVerifier - additionalParameters:additionalParameters]; - return request; -} - -+ (OIDTokenRequest *)testInstanceCodeExchange { - OIDAuthorizationResponse *authResponse = [OIDAuthorizationResponseTests testInstanceCodeFlow]; - NSArray *scopesArray = - [OIDScopeUtilities scopesArrayWithString:authResponse.request.scope]; - NSDictionary *additionalParameters = - @{ kTestAdditionalParameterKey : kTestAdditionalParameterValue }; - OIDTokenRequest *request = - [[OIDTokenRequest alloc] initWithConfiguration:authResponse.request.configuration - grantType:OIDGrantTypeAuthorizationCode - authorizationCode:authResponse.authorizationCode - redirectURL:authResponse.request.redirectURL - clientID:authResponse.request.clientID - clientSecret:authResponse.request.clientSecret - scopes:scopesArray - refreshToken:kRefreshTokenTestValue - codeVerifier:authResponse.request.codeVerifier - additionalParameters:additionalParameters]; - return request; -} - -+ (OIDTokenRequest *)testInstanceCodeExchangeClientAuth { - OIDAuthorizationResponse *authResponse = [OIDAuthorizationResponseTests testInstanceCodeFlowClientAuth]; - NSArray *scopesArray = - [OIDScopeUtilities scopesArrayWithString:authResponse.request.scope]; - NSDictionary *additionalParameters = - @{ kTestAdditionalParameterKey : kTestAdditionalParameterValue }; - OIDTokenRequest *request = - [[OIDTokenRequest alloc] initWithConfiguration:authResponse.request.configuration - grantType:OIDGrantTypeAuthorizationCode - authorizationCode:authResponse.authorizationCode - redirectURL:authResponse.request.redirectURL - clientID:authResponse.request.clientID - clientSecret:authResponse.request.clientSecret - scopes:scopesArray - refreshToken:kRefreshTokenTestValue - codeVerifier:authResponse.request.codeVerifier - additionalParameters:additionalParameters]; - return request; -} - -+ (OIDTokenRequest *)testInstanceRefresh { - OIDAuthorizationResponse *authResponse = [OIDAuthorizationResponseTests testInstance]; - NSArray *scopesArray = - [OIDScopeUtilities scopesArrayWithString:authResponse.request.scope]; - NSDictionary *additionalParameters = - @{ kTestAdditionalParameterKey : kTestAdditionalParameterValue }; - OIDTokenRequest *request = - [[OIDTokenRequest alloc] initWithConfiguration:authResponse.request.configuration - grantType:OIDGrantTypeAuthorizationCode - authorizationCode:authResponse.authorizationCode - redirectURL:nil - clientID:authResponse.request.clientID - clientSecret:authResponse.request.clientSecret - scopes:scopesArray - refreshToken:kRefreshTokenTestValue - codeVerifier:authResponse.request.codeVerifier - additionalParameters:additionalParameters]; - return request; -} - -/*! @brief Tests the @c NSCopying implementation by round-tripping an instance through the copying - process and checking to make sure the source and destination instances are equivalent. - */ -- (void)testCopying { - OIDAuthorizationResponse *authResponse = [OIDAuthorizationResponseTests testInstance]; - OIDTokenRequest *request = [[self class] testInstance]; - - XCTAssertEqualObjects(request.configuration.authorizationEndpoint, - authResponse.request.configuration.authorizationEndpoint, - @"Request and response authorization endpoints should be equal."); - XCTAssertEqualObjects(request.grantType, OIDGrantTypeAuthorizationCode, - @"Request grant type should be OIDGrantTypeAuthorizationCode."); - XCTAssertEqualObjects(request.authorizationCode, authResponse.authorizationCode, - @"Request and response authorization codes should be equal."); - XCTAssertEqualObjects(request.redirectURL, authResponse.request.redirectURL, - @"Request and response redirectURLs should be equal."); - XCTAssertEqualObjects(request.clientID, authResponse.request.clientID, - @"Request and response clientIDs should be equal."); - XCTAssertEqualObjects(request.clientSecret, authResponse.request.clientSecret, - @"Request and response clientSecrets should be equal."); - XCTAssertEqualObjects(request.scope, authResponse.request.scope, - @"Request and response scope values should be equal."); - XCTAssertEqualObjects(request.refreshToken, kRefreshTokenTestValue, - @"Request refreshToken should be equal to kRefreshTokenTestValue."); - XCTAssertEqualObjects(request.codeVerifier, authResponse.request.codeVerifier, - @"Request and response codeVerifiers should be equal."); - XCTAssertNotNil(request.additionalParameters, - @"Request's additionalParameters field should not be nil."); - XCTAssertEqualObjects(request.additionalParameters[kTestAdditionalParameterKey], - kTestAdditionalParameterValue, - @"The request's kTestAdditionalParameterKey additional parameter should " - "be equal to kTestAdditionalParameterValue."); - - OIDTokenRequest *requestCopy = [request copy]; - - // Not a full test of the configuration deserialization, but should be sufficient as a smoke test - // to make sure the configuration IS actually getting carried along in the copy implementation. - XCTAssertEqualObjects(requestCopy.configuration.authorizationEndpoint, - request.configuration.authorizationEndpoint, @""); - - XCTAssertEqualObjects(requestCopy.grantType, request.grantType, @""); - XCTAssertEqualObjects(requestCopy.authorizationCode, request.authorizationCode, @""); - XCTAssertEqualObjects(requestCopy.redirectURL, request.redirectURL, @""); - XCTAssertEqualObjects(requestCopy.clientID, request.clientID, @""); - XCTAssertEqualObjects(requestCopy.clientSecret, request.clientSecret, @""); - XCTAssertEqualObjects(requestCopy.scope, authResponse.request.scope, @""); - XCTAssertEqualObjects(requestCopy.refreshToken, kRefreshTokenTestValue, @""); - XCTAssertEqualObjects(requestCopy.codeVerifier, authResponse.request.codeVerifier, @""); - XCTAssertNotNil(requestCopy.additionalParameters, @""); - XCTAssertEqualObjects(requestCopy.additionalParameters[kTestAdditionalParameterKey], - kTestAdditionalParameterValue, @""); -} - -/*! @brief Tests the @c NSSecureCoding by round-tripping an instance through the coding process and - checking to make sure the source and destination instances are equivalent. - */ -- (void)testSecureCoding { - OIDAuthorizationResponse *authResponse = [OIDAuthorizationResponseTests testInstance]; - OIDTokenRequest *request = [[self class] testInstance]; - - XCTAssertEqualObjects(request.configuration.authorizationEndpoint, - authResponse.request.configuration.authorizationEndpoint, @""); - XCTAssertEqualObjects(request.grantType, OIDGrantTypeAuthorizationCode, @""); - XCTAssertEqualObjects(request.authorizationCode, authResponse.authorizationCode, @""); - XCTAssertEqualObjects(request.redirectURL, authResponse.request.redirectURL, @""); - XCTAssertEqualObjects(request.clientID, authResponse.request.clientID, @""); - XCTAssertEqualObjects(request.clientSecret, authResponse.request.clientSecret, @""); - XCTAssertEqualObjects(request.scope, authResponse.request.scope, @""); - XCTAssertEqualObjects(request.refreshToken, kRefreshTokenTestValue, @""); - XCTAssertEqualObjects(request.codeVerifier, authResponse.request.codeVerifier, @""); - XCTAssertNotNil(request.additionalParameters, @""); - XCTAssertEqualObjects(request.additionalParameters[kTestAdditionalParameterKey], - kTestAdditionalParameterValue, @""); - - NSData *data = [NSKeyedArchiver archivedDataWithRootObject:request]; - OIDTokenRequest *requestCopy = [NSKeyedUnarchiver unarchiveObjectWithData:data]; - - // Not a full test of the configuration deserialization, but should be sufficient as a smoke test - // to make sure the configuration IS actually getting serialized and deserialized in the - // NSSecureCoding implementation. We'll leave it up to the OIDServiceConfiguration tests to make - // sure the NSSecureCoding implementation of that class is correct. - XCTAssertEqualObjects(requestCopy.configuration.authorizationEndpoint, - request.configuration.authorizationEndpoint, @""); - XCTAssertEqualObjects(requestCopy.grantType, request.grantType, @""); - XCTAssertEqualObjects(requestCopy.authorizationCode, request.authorizationCode, @""); - XCTAssertEqualObjects(requestCopy.redirectURL, request.redirectURL, @""); - XCTAssertEqualObjects(requestCopy.clientID, request.clientID, @""); - XCTAssertEqualObjects(requestCopy.clientSecret, request.clientSecret, @""); - XCTAssertEqualObjects(requestCopy.scope, authResponse.request.scope, @""); - XCTAssertEqualObjects(requestCopy.refreshToken, kRefreshTokenTestValue, @""); - XCTAssertEqualObjects(requestCopy.codeVerifier, authResponse.request.codeVerifier, @""); - XCTAssertNotNil(requestCopy.additionalParameters, @""); - XCTAssertEqualObjects(requestCopy.additionalParameters[kTestAdditionalParameterKey], - kTestAdditionalParameterValue, @""); -} - -- (void)testURLRequestNoClientAuth { - OIDTokenRequest *request = [[self class] testInstanceCodeExchange]; - NSURLRequest *urlRequest = [request URLRequest]; - - id authorization = [urlRequest.allHTTPHeaderFields objectForKey:@"Authorization"]; - XCTAssertNil(authorization); -} - -- (void)testURLRequestBasicClientAuth { - OIDTokenRequest *request = [[self class] testInstanceCodeExchangeClientAuth]; - NSURLRequest* urlRequest = [request URLRequest]; - - id authorization = [urlRequest.allHTTPHeaderFields objectForKey:@"Authorization"]; - XCTAssertNotNil(authorization); -} - -- (void)testAuthorizationCodeNullRedirectURL { - OIDAuthorizationResponse *authResponse = [OIDAuthorizationResponseTests testInstance]; - NSArray *scopesArray = - [OIDScopeUtilities scopesArrayWithString:authResponse.request.scope]; - NSDictionary *additionalParameters = - @{ kTestAdditionalParameterKey : kTestAdditionalParameterValue }; - XCTAssertThrows([[OIDTokenRequest alloc] initWithConfiguration:authResponse.request.configuration - grantType:OIDGrantTypeAuthorizationCode - authorizationCode:authResponse.authorizationCode - redirectURL:nil - clientID:authResponse.request.clientID - clientSecret:authResponse.request.clientSecret - scopes:scopesArray - refreshToken:kRefreshTokenTestValue - codeVerifier:authResponse.request.codeVerifier - additionalParameters:additionalParameters], @""); -} - -@end - -#pragma GCC diagnostic pop diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDTokenResponseTests.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDTokenResponseTests.h deleted file mode 100644 index a7d82932..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDTokenResponseTests.h +++ /dev/null @@ -1,45 +0,0 @@ -/*! @file OIDTokenResponseTests.h - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -@class OIDTokenResponse; - -NS_ASSUME_NONNULL_BEGIN - -/*! @brief Unit tests for @c OIDAuthorizationResponse. - */ -@interface OIDTokenResponseTests : XCTestCase - -/*! @brief Creates a new @c OIDTokenResponse for testing. - */ -+ (OIDTokenResponse *)testInstance; - -/*! @brief Creates a new @c OIDTokenRequest for testing the code exchange. - @see https://tools.ietf.org/html/rfc6749#section-4.1.4 - */ -+ (OIDTokenResponse *)testInstanceCodeExchange; - -/*! @brief Creates a new @c OIDTokenRequest for testing the token refresh. - @see https://tools.ietf.org/html/rfc6749#section-5.1 - */ -+ (OIDTokenResponse *)testInstanceRefresh; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDTokenResponseTests.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDTokenResponseTests.m deleted file mode 100644 index 1b4051f5..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDTokenResponseTests.m +++ /dev/null @@ -1,194 +0,0 @@ -/*! @file OIDTokenResponseTests.m - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ -#import "OIDTokenResponseTests.h" - -#import "OIDAuthorizationResponseTests.h" -#import "OIDTokenRequestTests.h" -#import "Source/OIDTokenRequest.h" -#import "Source/OIDTokenResponse.h" - -// Ignore warnings about "Use of GNU statement expression extension" which is raised by our use of -// the XCTAssert___ macros. -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wgnu" - -/*! @brief The key for the @c accessToken property in the incoming parameters and for - @c NSSecureCoding. - */ -static NSString *const kAccessTokenKey = @"access_token"; - -/*! @brief The test value for the @c accessToken property. - */ -static NSString *const kAccessTokenTestValue = @"2YotnFZFEjr1zCsicMWpAA"; - -/*! @brief The key for the @c accessTokenExpirationDate property in the incoming parameters and for - @c NSSecureCoding. - */ -static NSString *const kExpiresInKey = @"expires_in"; - -/*! @brief The test value for the @c accessTokenExpirationDate property. - */ -static long long const kExpiresInTestValue = 60; - -/*! @brief The key for the @c tokenType property in the incoming parameters and for - @c NSSecureCoding. - */ -static NSString *const kTokenTypeKey = @"token_type"; - -/*! @brief The test value for the @c tokenType property. - */ -static NSString *const kTokenTypeTestValue = @"example"; - -/*! @brief The key for the @c idToken property in the incoming parameters and for @c NSSecureCoding. - */ -static NSString *const kIDTokenKey = @"id_token"; - -/*! @brief The test value for the @c idToken property. - */ -static NSString *const kIDTokenTestValue = @"id_token"; - -/*! @brief The key for the @c refreshToken property in the incoming parameters and for - @c NSSecureCoding. - */ -static NSString *const kRefreshTokenKey = @"refresh_token"; - -/*! @brief The test value for the @c refreshToken property. - */ -static NSString *const kRefreshTokenTestValue = @"tGzv3JOkF0XG5Qx2TlKWIA"; - -/*! @brief The key for the @c scopes property in the incoming parameters and for - @c NSSecureCoding. - */ -static NSString *const kScopesKey = @"scope"; - -/*! @brief The test value for the @c scopes property. - */ -static NSString *const kScopesTestValue = @"openid profile"; - -/*! @brief Test key for the @c additionalParameters property. - */ -static NSString *const kTestAdditionalParameterKey = @"example_parameter"; - -/*! @brief Test value for the @c additionalParameters property. - */ -static NSString *const kTestAdditionalParameterValue = @"example_value"; - -@implementation OIDTokenResponseTests - -+ (OIDTokenResponse *)testInstance { - OIDTokenRequest *request = [OIDTokenRequestTests testInstance]; - OIDTokenResponse *response = - [[OIDTokenResponse alloc] initWithRequest:request - parameters:@{ - kAccessTokenKey : kAccessTokenTestValue, - kExpiresInKey : @(kExpiresInTestValue), - kTokenTypeKey : kTokenTypeTestValue, - kIDTokenKey : kIDTokenTestValue, - kRefreshTokenKey : kRefreshTokenTestValue, - kScopesKey : kScopesTestValue, - kTestAdditionalParameterKey : kTestAdditionalParameterValue - }]; - return response; -} - -+ (OIDTokenResponse *)testInstanceCodeExchange { - OIDTokenRequest *request = [OIDTokenRequestTests testInstance]; - OIDTokenResponse *response = - [[OIDTokenResponse alloc] initWithRequest:request - parameters:@{ - kAccessTokenKey : kAccessTokenTestValue, - kExpiresInKey : @(kExpiresInTestValue), - kIDTokenKey : kIDTokenTestValue, - kTokenTypeKey : kTokenTypeTestValue, - kRefreshTokenKey : kRefreshTokenTestValue, - }]; - return response; -} - -+ (OIDTokenResponse *)testInstanceRefresh { - OIDTokenRequest *request = [OIDTokenRequestTests testInstance]; - OIDTokenResponse *response = - [[OIDTokenResponse alloc] initWithRequest:request - parameters:@{ - kAccessTokenKey : kAccessTokenTestValue, - kIDTokenKey : kIDTokenTestValue, - kExpiresInKey : @(kExpiresInTestValue), - kTokenTypeKey : kTokenTypeTestValue, - }]; - return response; -} - -/*! @brief Tests the @c NSCopying implementation by round-tripping an instance through the copying - process and checking to make sure the source and destination instances are equivalent. - */ -- (void)testCopying { - OIDTokenResponse *response = [[self class] testInstance]; - XCTAssertNotNil(response.request, @""); - XCTAssertEqualObjects(response.accessToken, kAccessTokenTestValue, @""); - XCTAssertEqualObjects(response.tokenType, kTokenTypeTestValue, @""); - XCTAssertEqualObjects(response.idToken, kIDTokenTestValue, @""); - XCTAssertEqualObjects(response.refreshToken, kRefreshTokenTestValue, @""); - XCTAssertEqualObjects(response.scope, kScopesTestValue, @""); - XCTAssertEqualObjects(response.additionalParameters[kTestAdditionalParameterKey], - kTestAdditionalParameterValue, @""); - - // Should be ~ kTestExpirationSeconds seconds. Avoiding swizzling NSDate here for certainty - // to keep dependencies down, and simply making an assumption that this check will be executed - // relatively quickly after the initialization above (less than 5 seconds.) - NSTimeInterval expiration = [response.accessTokenExpirationDate timeIntervalSinceNow]; - XCTAssert(expiration > kExpiresInTestValue - 5 && expiration <= kExpiresInTestValue, @""); - - OIDTokenResponse *responseCopy = [response copy]; - - XCTAssertNotNil(responseCopy.request, @""); - XCTAssertEqualObjects(responseCopy.accessToken, kAccessTokenTestValue, @""); - XCTAssertEqualObjects(responseCopy.tokenType, kTokenTypeTestValue, @""); - XCTAssertEqualObjects(responseCopy.idToken, kIDTokenTestValue, @""); - XCTAssertEqualObjects(responseCopy.refreshToken, kRefreshTokenTestValue, @""); - XCTAssertEqualObjects(responseCopy.scope, kScopesTestValue, @""); - XCTAssertEqualObjects(responseCopy.additionalParameters[kTestAdditionalParameterKey], - kTestAdditionalParameterValue, @""); -} - -/*! @brief Tests the @c NSSecureCoding by round-tripping an instance through the coding process and - checking to make sure the source and destination instances are equivalent. - */ -- (void)testSecureCoding { - OIDTokenResponse *response = [[self class] testInstance]; - NSData *data = [NSKeyedArchiver archivedDataWithRootObject:response]; - OIDTokenResponse *responseCopy = [NSKeyedUnarchiver unarchiveObjectWithData:data]; - - // Not a full test of the request deserialization, but should be sufficient as a smoke test - // to make sure the request IS actually getting serialized and deserialized in the - // NSSecureCoding implementation. We'll leave it up to the OIDAuthorizationRequest tests to make - // sure the NSSecureCoding implementation of that class is correct. - XCTAssertNotNil(responseCopy.request, @""); - XCTAssertEqualObjects(responseCopy.request.clientID, response.request.clientID, @""); - - XCTAssertEqualObjects(responseCopy.accessToken, kAccessTokenTestValue, @""); - XCTAssertEqualObjects(responseCopy.tokenType, kTokenTypeTestValue, @""); - XCTAssertEqualObjects(responseCopy.idToken, kIDTokenTestValue, @""); - XCTAssertEqualObjects(responseCopy.refreshToken, kRefreshTokenTestValue, @""); - XCTAssertEqualObjects(responseCopy.scope, kScopesTestValue, @""); - XCTAssertEqualObjects(responseCopy.additionalParameters[kTestAdditionalParameterKey], - kTestAdditionalParameterValue, @""); -} - -@end - -#pragma GCC diagnostic pop diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDTokenUtilitiesTests.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDTokenUtilitiesTests.m deleted file mode 100644 index e4da624d..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDTokenUtilitiesTests.m +++ /dev/null @@ -1,53 +0,0 @@ -/*! @file OIDTokenUtilities.m - @brief AppAuth iOS SDK - @copyright - Copyright 2018 The AppAuth for iOS Authors. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -#import "Source/OIDTokenUtilities.h" - - -@interface OIDTokenUtilitiesTests : XCTestCase -@end -@implementation OIDTokenUtilitiesTests - -- (void)testRedact { - XCTAssertEqualObjects([OIDTokenUtilities redact:@"0123456789"], @"012345...[redacted]", @""); -} - -- (void)testRedactWithNilParamater { - XCTAssertEqualObjects([OIDTokenUtilities redact:nil], nil, @""); -} - -- (void)testRedactWithEmptyString { - XCTAssertEqualObjects([OIDTokenUtilities redact:@""], @"", @""); -} - -- (void)testRedactWithShortInput { - XCTAssertEqualObjects([OIDTokenUtilities redact:@"01234"], @"[redacted]", @""); -} - -- (void)testFormUrlEncode { - XCTAssertEqualObjects([OIDTokenUtilities formUrlEncode:@"t _9V-F*I+Z1Lk.u7:2/8L+w="], - @"t+_9V-F*I%2BZ1Lk.u7%3A2%2F8L%2Bw%3D", @""); -} - -- (void)testFormUrlEncodeEmptyString { - XCTAssertEqualObjects([OIDTokenUtilities formUrlEncode:@""], @"", @""); -} - -@end diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDURLQueryComponentTests.h b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDURLQueryComponentTests.h deleted file mode 100644 index 2498ebfa..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDURLQueryComponentTests.h +++ /dev/null @@ -1,46 +0,0 @@ -/*! @file OIDURLQueryComponentTests.h - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import - -@interface OIDURLQueryComponentTests : XCTestCase - -/*! @brief Test adding a single string parameter to a query. - @remarks The query should have a single string value for the specified key. - */ -- (void)testAddingParameter; - -/*! @brief Test adding two string parameters with the same key to a query. - @remarks The query should have an array with both values for the specified key. - */ -- (void)testAddingTwoParameters; - -/*! @brief Test adding three string parameters with the same key to a dictionary. - @remarks The dictionary should have an array with all three values for the specified key. - */ -- (void)testAddingThreeParameters; - -/*! @brief Test building a simple query string with two parameters, both strings. - */ -- (void)testBuildingParameterStringWithSimpleParameters; - -/*! @brief Test parsing a simple query string with two string parameters. - */ -- (void)testParsingQueryString; - -@end diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDURLQueryComponentTests.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDURLQueryComponentTests.m deleted file mode 100644 index e8f08c04..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDURLQueryComponentTests.m +++ /dev/null @@ -1,259 +0,0 @@ -/*! @file OIDURLQueryComponentTests.m - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDURLQueryComponentTests.h" - -#import "Source/OIDURLQueryComponent.h" - -// Ignore warnings about "Use of GNU statement expression extension" which is raised by our use of -// the XCTAssert___ macros. -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wgnu" - -/*! @brief A testing parameter name. - */ -static NSString *const kTestParameterName = @"ParameterName"; - -/*! @brief A different testing parameter name. - */ -static NSString *const kTestParameterName2 = @"ParameterName2"; - -/*! @brief A testing parameter value. - */ -static NSString *const kTestParameterValue = @"ParameterValue"; - -/*! @brief A different testing parameter value. - */ -static NSString *const kTestParameterValue2 = @"Param+eter Va=l&u#e2"; -static NSString *const kTestParameterValue2Encoded = @"Para+meter%20Va%3Dl%26u%23e2"; - -/*! @brief The result of generating a parameter string from: - @@{ kTestParameterName : kTestParameterValue, kTestParameterName2 : kTestParameterValue2 } - */ -static NSString *const kTestSimpleParameterStringEncoded = - @"ParameterName=ParameterValue&ParameterName2=Param%2Beter%20Va%3Dl%26u%23e2"; - -/*! @brief Same as @c kTestSimpleParameterStringEncoded but with the parameter order reversed. - */ -static NSString *const kTestSimpleParameterStringEncodedRev = - @"ParameterName2=Param%2Beter%20Va%3Dl%26u%23e2&ParameterName=ParameterValue"; - -/*! @brief Encoding test string representing the unencoded example from RFC6749 Appendix B. - @see https://tools.ietf.org/html/rfc6749#appendix-B - */ -static NSString *const kEncodingTestUnencoded = - @" %&+£€"; - -/*! @brief Encoding test string representing the encoded example from RFC6749 Appendix B, but with - the U+0020 (SPACE) character also percentage encoded. - @see https://tools.ietf.org/html/rfc6749#appendix-B - */ -static NSString *const kEncodingTestEncoded = - @"%20%25%26%2B%C2%A3%E2%82%AC"; - - -/*! @brief A URL string to use for testing. - */ -static NSString *const kTestURLRoot = @"https://www.example.com/"; - -@implementation OIDURLQueryComponentTests - -- (void)testAddingParameter { - OIDURLQueryComponent *query = [[OIDURLQueryComponent alloc] init]; - [query addParameter:kTestParameterName value:kTestParameterValue]; - XCTAssertEqualObjects([query valuesForParameter:kTestParameterName].firstObject, - kTestParameterValue, @""); -} - -/*! @brief Test that URI query items are decoded correctly, using application/x-www-form-urlencoded - encoding. - @see https://tools.ietf.org/html/rfc6749#section-4.1.2 - @see https://tools.ietf.org/html/rfc6749#appendix-B - */ -- (void)test_formurlencoded_decoding { - // Authorization response URL template - NSString *responseURLtemplate = @"com.example.apps.1234-tepulg5joaks7:/?state=z634l182&code=4/WQA" - "stm4iiN_0Qi-n4mEo-jL-85CvQ&scope=%@&authuser=0&session_state=ab78c20&prompt=consent#"; - - NSString *expectedDecodedScope = - @"https://www.example.com/auth/plus.me https://www.example.com/auth/userinfo.profile"; - - // Tests an encoded scope with a '+'-encoded space - { - NSString* encodedScope = - @"https://www.example.com/auth/plus.me+https://www.example.com/auth/userinfo.profile"; - NSString *authorizationResponse = [NSString stringWithFormat:responseURLtemplate,encodedScope]; - OIDURLQueryComponent *query = - [[OIDURLQueryComponent alloc] initWithURL:[NSURL URLWithString:authorizationResponse]]; - NSString* value = [query valuesForParameter:@"scope"][0]; - XCTAssertEqualObjects(value, - expectedDecodedScope, - @"Failed to decode scope with '+' delimiter"); - } - // Tests an encoded scope with a '%20'-encoded space - { - NSString* encodedScope = - @"https://www.example.com/auth/plus.me%20https://www.example.com/auth/userinfo.profile"; - NSString *authorizationResponse = [NSString stringWithFormat:responseURLtemplate,encodedScope]; - OIDURLQueryComponent *query = - [[OIDURLQueryComponent alloc] initWithURL:[NSURL URLWithString:authorizationResponse]]; - NSString* value = [query valuesForParameter:@"scope"][0]; - XCTAssertEqualObjects(value, - expectedDecodedScope, - @"Failed to decode scope with '%%20' delimiter"); - } - // Tests that the example string from RFC6749 Appendix B is decoded correctly - { - NSString* encodedScope = @"+%25%26%2B%C2%A3%E2%82%AC"; - NSString *authorizationResponse = [NSString stringWithFormat:responseURLtemplate,encodedScope]; - OIDURLQueryComponent *query = - [[OIDURLQueryComponent alloc] initWithURL:[NSURL URLWithString:authorizationResponse]]; - NSString* value = [query valuesForParameter:@"scope"][0]; - XCTAssertEqualObjects(value, - @" %&+£€", - @"Failed to decode RFC6749 Appendix B sample string correctly."); - } -} - -/*! @brief Test that URI query items are encoded correctly, using application/x-www-form-urlencoded - encoding. Note that AppAuth always encodes "+" as "%20" (as permitted) to reduce - ambiguity. - @see https://tools.ietf.org/html/rfc6749#section-4.1.3 - @see https://tools.ietf.org/html/rfc6749#appendix-B - */ -- (void)test_formurlencoded_encoding { - NSURL *baseURL = [NSURL URLWithString:kTestURLRoot]; - // Tests that space is encoded as %20 - { - OIDURLQueryComponent *query = [[OIDURLQueryComponent alloc] initWithURL:baseURL]; - [query addParameter:@"scope" value:@"openid profile"]; - NSString *encodedParams = [query URLEncodedParameters]; - NSString *expected = @"scope=openid%20profile"; - XCTAssertEqualObjects(encodedParams, - expected, - @"Failed to encode space as %%20."); - } - // Tests that the example string from RFC6749 Appendix B is encoded correctly (but with space - // encoded as %20, not +, as allowed by application/x-www-form-urlencoded. - { - OIDURLQueryComponent *query = [[OIDURLQueryComponent alloc] initWithURL:baseURL]; - [query addParameter:@"scope" value:@" %&+£€"]; - // Tests the URLEncodedParameters method - NSString *encodedParams = [query URLEncodedParameters]; - NSString *expected = @"scope=%20%25%26%2B%C2%A3%E2%82%AC"; - XCTAssertEqualObjects(encodedParams, - expected, - @"Failed to encode RFC6749 Appendix B sample string correctly."); - } -} - -- (void)testAddingTwoParameters { - OIDURLQueryComponent *query = [[OIDURLQueryComponent alloc] init]; - [query addParameter:kTestParameterName value:kTestParameterValue]; - XCTAssertEqualObjects([query valuesForParameter:kTestParameterName].firstObject, - kTestParameterValue, @""); - - [query addParameter:kTestParameterName value:kTestParameterValue2]; - NSArray *values = [query valuesForParameter:kTestParameterName]; - XCTAssertNotNil(values, @""); - XCTAssertEqual(values.count, 2, @""); - XCTAssertEqualObjects(values.firstObject, kTestParameterValue, @""); - XCTAssertEqualObjects(values[1], kTestParameterValue2, @""); -} - -/* @brief Tests the application/x-www-form-urlencoded encoding. - @see https://tools.ietf.org/html/rfc6749#appendix-B - */ -- (void)testURLEncodedParameters { - NSURL *baseURL = [NSURL URLWithString:kTestURLRoot]; - OIDURLQueryComponent *query = [[OIDURLQueryComponent alloc] initWithURL:baseURL]; - [query addParameter:kTestParameterName value:kEncodingTestUnencoded]; - - // Tests the URLEncodedParameters method - NSString *encodedParams = [query URLEncodedParameters]; - NSString *expected = [NSString stringWithFormat:@"%@=%@", kTestParameterName, kEncodingTestEncoded]; - XCTAssertEqualObjects(encodedParams, expected, @""); - - // Tests that params are correctly encoded when using URLByReplacingQueryInURL - NSURL *url = [query URLByReplacingQueryInURL:baseURL]; - NSString* expectedURL = [NSString stringWithFormat:@"%@?%@", kTestURLRoot, expected]; - XCTAssertEqualObjects([url absoluteString], expectedURL, @""); -} - -- (void)testAddingThreeParameters { - OIDURLQueryComponent *query = [[OIDURLQueryComponent alloc] init]; - [query addParameter:kTestParameterName value:kTestParameterValue]; - XCTAssertEqualObjects([query valuesForParameter:kTestParameterName].firstObject, - kTestParameterValue, @""); - - [query addParameter:kTestParameterName value:kTestParameterValue2]; - [query addParameter:kTestParameterName value:kTestParameterValue]; - NSArray *values = [query valuesForParameter:kTestParameterName]; - XCTAssertNotNil(values, @""); - XCTAssertEqual(values.count, 3, @""); - XCTAssertEqualObjects(values.firstObject, kTestParameterValue, @""); - XCTAssertEqualObjects(values[1], kTestParameterValue2, @""); - XCTAssertEqualObjects(values[2], kTestParameterValue, @""); - - NSDictionary *> *parametersAsDictionary = @{ - kTestParameterName : @[ kTestParameterValue, kTestParameterValue2, kTestParameterValue ] - }; - - XCTAssertEqualObjects(query.dictionaryValue, parametersAsDictionary, @""); -} - -- (void)testBuildingParameterStringWithSimpleParameters { - NSDictionary *parameters = - @{ - kTestParameterName : kTestParameterValue, - kTestParameterName2 : kTestParameterValue2, - }; - NSURL *rootURL = [NSURL URLWithString:kTestURLRoot]; - - OIDURLQueryComponent *query = [[OIDURLQueryComponent alloc] init]; - [query addParameters:parameters]; - NSURL *rootURLWithParameters = [query URLByReplacingQueryInURL:rootURL]; - - XCTAssert([rootURLWithParameters.query isEqualToString:kTestSimpleParameterStringEncoded] - || [rootURLWithParameters.query isEqualToString:kTestSimpleParameterStringEncodedRev], - @""); - - OIDURLQueryComponent *parsedParameters = - [[OIDURLQueryComponent alloc] initWithURL:rootURLWithParameters]; - - XCTAssertEqualObjects(parsedParameters.dictionaryValue, parameters, @""); -} - -- (void)testParsingQueryString { - NSString *URLString = - [NSString stringWithFormat:@"%@?%@", kTestURLRoot, kTestSimpleParameterStringEncoded]; - NSURL *URLToParse = [NSURL URLWithString:URLString]; - OIDURLQueryComponent *query = [[OIDURLQueryComponent alloc] initWithURL:URLToParse]; - - NSDictionary *> *parameters = - @{ - kTestParameterName : kTestParameterValue, - kTestParameterName2 : kTestParameterValue2 - }; - - XCTAssertEqualObjects(query.dictionaryValue, parameters, @""); -} - -@end - -#pragma GCC diagnostic pop diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDURLQueryComponentTestsIOS7.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDURLQueryComponentTestsIOS7.m deleted file mode 100644 index 707ba5fb..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDURLQueryComponentTestsIOS7.m +++ /dev/null @@ -1,45 +0,0 @@ -/*! @file OIDURLQueryComponentTestsIOS7.m - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "OIDURLQueryComponentTests.h" - -#import "Source/OIDURLQueryComponent.h" - -// Ignore warnings about "Use of GNU statement expression extension" which is raised by our use of -// the XCTAssert___ macros. -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wgnu" - -@interface OIDURLQueryComponentTestsIOS7 : OIDURLQueryComponentTests -@end - -@implementation OIDURLQueryComponentTestsIOS7 - -- (void)setUp { - [super setUp]; - gOIDURLQueryComponentForceIOS7Handling = YES; -} - -- (void)tearDown { - gOIDURLQueryComponentForceIOS7Handling = NO; - [super tearDown]; -} - -@end - -#pragma GCC diagnostic pop diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDURLSessionProviderTests.m b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDURLSessionProviderTests.m deleted file mode 100644 index 4bd02f36..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/UnitTests/OIDURLSessionProviderTests.m +++ /dev/null @@ -1,43 +0,0 @@ -/*! @file OIDURLSessionProviderTests.m - @brief AppAuth iOS SDK - @copyright - Copyright 2015 Google Inc. All Rights Reserved. - @copydetails - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import -#import "OIDURLSessionProvider.h" - -@interface OIDURLSessionProviderTests : XCTestCase - -@end - -/*! @brief Unit tests for @c OIDURLSessionProvider. - */ -@implementation OIDURLSessionProviderTests - -- (void)tearDown { - // Setting the session back to default sharedSession for future test cases - [OIDURLSessionProvider setSession:[NSURLSession sharedSession]]; -} - -- (void)testCustomSession { - NSURLSessionConfiguration *config = [NSURLSessionConfiguration ephemeralSessionConfiguration]; - NSURLSession *customSession = [NSURLSession sessionWithConfiguration:config]; - [OIDURLSessionProvider setSession:customSession]; - NSURLSession *session = [OIDURLSessionProvider session]; - XCTAssertEqualObjects(session, customSession); -} - -@end diff --git a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/appauth_lockup.svg b/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/appauth_lockup.svg deleted file mode 100644 index 5cbcc136..00000000 --- a/Example/iOSCarthageExample/ios/Carthage/Checkouts/AppAuth-iOS/appauth_lockup.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/Example/iOSCarthageExample/ios/RNAppAuthCarthageExample.xcodeproj/project.pbxproj b/Example/iOSCarthageExample/ios/RNAppAuthCarthageExample.xcodeproj/project.pbxproj deleted file mode 100644 index eeddffd4..00000000 --- a/Example/iOSCarthageExample/ios/RNAppAuthCarthageExample.xcodeproj/project.pbxproj +++ /dev/null @@ -1,1169 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; }; - 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; }; - 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; }; - 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; }; - 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; }; - 025B1FE1216F576700A74269 /* AppAuth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 025B1FE0216F576700A74269 /* AppAuth.framework */; }; - 025B1FE3216F577A00A74269 /* AppAuth.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 025B1FE0216F576700A74269 /* AppAuth.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 11D1A2F320CAFA9E000508D9 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; }; - 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; }; - 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; }; - 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; }; - 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; - 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; - 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; - 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; - 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; - 5963BB9C7F724866A27D915C /* libRNAppAuth.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ABA03C31F0044CCAA1B75586 /* libRNAppAuth.a */; }; - 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; - ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 134814201AA4EA6300B7C361; - remoteInfo = RCTActionSheet; - }; - 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 134814201AA4EA6300B7C361; - remoteInfo = RCTGeolocation; - }; - 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 58B5115D1A9E6B3D00147676; - remoteInfo = RCTImage; - }; - 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 58B511DB1A9E6C8500147676; - remoteInfo = RCTNetwork; - }; - 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 832C81801AAF6DEF007FA2F7; - remoteInfo = RCTVibration; - }; - 025B1FDE216F572000A74269 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 674E7C14052D40178B19C279 /* RNAppAuth.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 134814201AA4EA6300B7C361; - remoteInfo = RNAppAuth; - }; - 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 134814201AA4EA6300B7C361; - remoteInfo = RCTSettings; - }; - 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 3C86DF461ADF2C930047B81A; - remoteInfo = RCTWebSocket; - }; - 146834031AC3E56700842450 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192; - remoteInfo = React; - }; - 2D16E6711FA4F8DC00B85C8A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = ADD01A681E09402E00F6D226; - remoteInfo = "RCTBlob-tvOS"; - }; - 2D16E6831FA4F8DC00B85C8A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 3DBE0D001F3B181A0099AA32; - remoteInfo = fishhook; - }; - 2D16E6851FA4F8DC00B85C8A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 3DBE0D0D1F3B181C0099AA32; - remoteInfo = "fishhook-tvOS"; - }; - 2DF0FFDE2056DD460020B375 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EBF21BDC1FC498900052F4D5; - remoteInfo = jsinspector; - }; - 2DF0FFE02056DD460020B375 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EBF21BFA1FC4989A0052F4D5; - remoteInfo = "jsinspector-tvOS"; - }; - 2DF0FFE22056DD460020B375 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 139D7ECE1E25DB7D00323FB7; - remoteInfo = "third-party"; - }; - 2DF0FFE42056DD460020B375 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 3D383D3C1EBD27B6005632C8; - remoteInfo = "third-party-tvOS"; - }; - 2DF0FFE62056DD460020B375 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 139D7E881E25C6D100323FB7; - remoteInfo = "double-conversion"; - }; - 2DF0FFE82056DD460020B375 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 3D383D621EBD27B9005632C8; - remoteInfo = "double-conversion-tvOS"; - }; - 2DF0FFEA2056DD460020B375 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 9936F3131F5F2E4B0010BF04; - remoteInfo = privatedata; - }; - 2DF0FFEC2056DD460020B375 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 9936F32F1F5F2E5B0010BF04; - remoteInfo = "privatedata-tvOS"; - }; - 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 2D2A283A1D9B042B00D4039D; - remoteInfo = "RCTImage-tvOS"; - }; - 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 2D2A28471D9B043800D4039D; - remoteInfo = "RCTLinking-tvOS"; - }; - 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 2D2A28541D9B044C00D4039D; - remoteInfo = "RCTNetwork-tvOS"; - }; - 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 2D2A28611D9B046600D4039D; - remoteInfo = "RCTSettings-tvOS"; - }; - 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 2D2A287B1D9B048500D4039D; - remoteInfo = "RCTText-tvOS"; - }; - 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 2D2A28881D9B049200D4039D; - remoteInfo = "RCTWebSocket-tvOS"; - }; - 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 2D2A28131D9B038B00D4039D; - remoteInfo = "React-tvOS"; - }; - 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 3D3C059A1DE3340900C268FA; - remoteInfo = yoga; - }; - 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 3D3C06751DE3340C00C268FA; - remoteInfo = "yoga-tvOS"; - }; - 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 3D3CD9251DE5FBEC00167DC4; - remoteInfo = cxxreact; - }; - 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 3D3CD9321DE5FBEE00167DC4; - remoteInfo = "cxxreact-tvOS"; - }; - 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 3D3CD90B1DE5FBD600167DC4; - remoteInfo = jschelpers; - }; - 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 3D3CD9181DE5FBD800167DC4; - remoteInfo = "jschelpers-tvOS"; - }; - 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 134814201AA4EA6300B7C361; - remoteInfo = RCTAnimation; - }; - 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 2D2A28201D9B03D100D4039D; - remoteInfo = "RCTAnimation-tvOS"; - }; - 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 134814201AA4EA6300B7C361; - remoteInfo = RCTLinking; - }; - 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 58B5119B1A9E6C1200147676; - remoteInfo = RCTText; - }; - ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 358F4ED71D1E81A9004DF814; - remoteInfo = RCTBlob; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 025B1FE2216F577000A74269 /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - 025B1FE3216F577A00A74269 /* AppAuth.framework in CopyFiles */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; - 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; }; - 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = ""; }; - 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = ""; }; - 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; }; - 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = ""; }; - 025B1FE0216F576700A74269 /* AppAuth.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppAuth.framework; path = Carthage/Build/iOS/AppAuth.framework; sourceTree = ""; }; - 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; }; - 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; }; - 13B07F961A680F5B00A75B9A /* RNAppAuthCarthageExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RNAppAuthCarthageExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = RNAppAuthCarthageExample/AppDelegate.h; sourceTree = ""; }; - 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = RNAppAuthCarthageExample/AppDelegate.m; sourceTree = ""; }; - 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; - 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = RNAppAuthCarthageExample/Images.xcassets; sourceTree = ""; }; - 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = RNAppAuthCarthageExample/Info.plist; sourceTree = ""; }; - 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = RNAppAuthCarthageExample/main.m; sourceTree = ""; }; - 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; }; - 2D16E6891FA4F8E400B85C8A /* libReact.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libReact.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = ""; }; - 674E7C14052D40178B19C279 /* RNAppAuth.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNAppAuth.xcodeproj; path = "../node_modules/react-native-app-auth/ios/RNAppAuth.xcodeproj"; sourceTree = ""; }; - 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; }; - 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; - ABA03C31F0044CCAA1B75586 /* libRNAppAuth.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNAppAuth.a; sourceTree = ""; }; - ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 025B1FE1216F576700A74269 /* AppAuth.framework in Frameworks */, - ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */, - 11D1A2F320CAFA9E000508D9 /* libRCTAnimation.a in Frameworks */, - 146834051AC3E58100842450 /* libReact.a in Frameworks */, - 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, - 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */, - 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */, - 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */, - 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */, - 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */, - 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */, - 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */, - 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */, - 5963BB9C7F724866A27D915C /* libRNAppAuth.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 00C302A81ABCB8CE00DB3ED1 /* Products */ = { - isa = PBXGroup; - children = ( - 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */, - ); - name = Products; - sourceTree = ""; - }; - 00C302B61ABCB90400DB3ED1 /* Products */ = { - isa = PBXGroup; - children = ( - 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */, - ); - name = Products; - sourceTree = ""; - }; - 00C302BC1ABCB91800DB3ED1 /* Products */ = { - isa = PBXGroup; - children = ( - 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */, - 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */, - ); - name = Products; - sourceTree = ""; - }; - 00C302D41ABCB9D200DB3ED1 /* Products */ = { - isa = PBXGroup; - children = ( - 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */, - 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */, - ); - name = Products; - sourceTree = ""; - }; - 00C302E01ABCB9EE00DB3ED1 /* Products */ = { - isa = PBXGroup; - children = ( - 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */, - ); - name = Products; - sourceTree = ""; - }; - 025B1FB5216F571E00A74269 /* Recovered References */ = { - isa = PBXGroup; - children = ( - ABA03C31F0044CCAA1B75586 /* libRNAppAuth.a */, - ); - name = "Recovered References"; - sourceTree = ""; - }; - 025B1FDB216F572000A74269 /* Products */ = { - isa = PBXGroup; - children = ( - 025B1FDF216F572000A74269 /* libRNAppAuth.a */, - ); - name = Products; - sourceTree = ""; - }; - 139105B71AF99BAD00B5F7CC /* Products */ = { - isa = PBXGroup; - children = ( - 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */, - 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */, - ); - name = Products; - sourceTree = ""; - }; - 139FDEE71B06529A00C62182 /* Products */ = { - isa = PBXGroup; - children = ( - 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */, - 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */, - 2D16E6841FA4F8DC00B85C8A /* libfishhook.a */, - 2D16E6861FA4F8DC00B85C8A /* libfishhook-tvOS.a */, - ); - name = Products; - sourceTree = ""; - }; - 13B07FAE1A68108700A75B9A /* RNAppAuthCarthageExample */ = { - isa = PBXGroup; - children = ( - 008F07F21AC5B25A0029DE68 /* main.jsbundle */, - 13B07FAF1A68108700A75B9A /* AppDelegate.h */, - 13B07FB01A68108700A75B9A /* AppDelegate.m */, - 13B07FB51A68108700A75B9A /* Images.xcassets */, - 13B07FB61A68108700A75B9A /* Info.plist */, - 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, - 13B07FB71A68108700A75B9A /* main.m */, - ); - name = RNAppAuthCarthageExample; - sourceTree = ""; - }; - 146834001AC3E56700842450 /* Products */ = { - isa = PBXGroup; - children = ( - 146834041AC3E56700842450 /* libReact.a */, - 3DAD3EA31DF850E9000B6D8A /* libReact.a */, - 3DAD3EA51DF850E9000B6D8A /* libyoga.a */, - 3DAD3EA71DF850E9000B6D8A /* libyoga.a */, - 3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */, - 3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */, - 3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */, - 3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */, - 2DF0FFDF2056DD460020B375 /* libjsinspector.a */, - 2DF0FFE12056DD460020B375 /* libjsinspector-tvOS.a */, - 2DF0FFE32056DD460020B375 /* libthird-party.a */, - 2DF0FFE52056DD460020B375 /* libthird-party.a */, - 2DF0FFE72056DD460020B375 /* libdouble-conversion.a */, - 2DF0FFE92056DD460020B375 /* libdouble-conversion.a */, - 2DF0FFEB2056DD460020B375 /* libprivatedata.a */, - 2DF0FFED2056DD460020B375 /* libprivatedata-tvOS.a */, - ); - name = Products; - sourceTree = ""; - }; - 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { - isa = PBXGroup; - children = ( - 025B1FE0216F576700A74269 /* AppAuth.framework */, - 2D16E6891FA4F8E400B85C8A /* libReact.a */, - ); - name = Frameworks; - sourceTree = ""; - }; - 5E91572E1DD0AC6500FF2AA8 /* Products */ = { - isa = PBXGroup; - children = ( - 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */, - 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */, - ); - name = Products; - sourceTree = ""; - }; - 78C398B11ACF4ADC00677621 /* Products */ = { - isa = PBXGroup; - children = ( - 78C398B91ACF4ADC00677621 /* libRCTLinking.a */, - 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */, - ); - name = Products; - sourceTree = ""; - }; - 832341AE1AAA6A7D00B99B32 /* Libraries */ = { - isa = PBXGroup; - children = ( - 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */, - 146833FF1AC3E56700842450 /* React.xcodeproj */, - 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */, - ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */, - 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */, - 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */, - 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */, - 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */, - 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */, - 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */, - 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */, - 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */, - 674E7C14052D40178B19C279 /* RNAppAuth.xcodeproj */, - ); - name = Libraries; - sourceTree = ""; - }; - 832341B11AAA6A8300B99B32 /* Products */ = { - isa = PBXGroup; - children = ( - 832341B51AAA6A8300B99B32 /* libRCTText.a */, - 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */, - ); - name = Products; - sourceTree = ""; - }; - 83CBB9F61A601CBA00E9B192 = { - isa = PBXGroup; - children = ( - 13B07FAE1A68108700A75B9A /* RNAppAuthCarthageExample */, - 832341AE1AAA6A7D00B99B32 /* Libraries */, - 83CBBA001A601CBA00E9B192 /* Products */, - 2D16E6871FA4F8E400B85C8A /* Frameworks */, - 025B1FB5216F571E00A74269 /* Recovered References */, - ); - indentWidth = 2; - sourceTree = ""; - tabWidth = 2; - usesTabs = 0; - }; - 83CBBA001A601CBA00E9B192 /* Products */ = { - isa = PBXGroup; - children = ( - 13B07F961A680F5B00A75B9A /* RNAppAuthCarthageExample.app */, - ); - name = Products; - sourceTree = ""; - }; - ADBDB9201DFEBF0600ED6528 /* Products */ = { - isa = PBXGroup; - children = ( - ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */, - 2D16E6721FA4F8DC00B85C8A /* libRCTBlob-tvOS.a */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 13B07F861A680F5B00A75B9A /* RNAppAuthCarthageExample */ = { - isa = PBXNativeTarget; - buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "RNAppAuthCarthageExample" */; - buildPhases = ( - 13B07F871A680F5B00A75B9A /* Sources */, - 13B07F8C1A680F5B00A75B9A /* Frameworks */, - 13B07F8E1A680F5B00A75B9A /* Resources */, - 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, - 025B1FE2216F577000A74269 /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = RNAppAuthCarthageExample; - productName = "Hello World"; - productReference = 13B07F961A680F5B00A75B9A /* RNAppAuthCarthageExample.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 83CBB9F71A601CBA00E9B192 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 940; - ORGANIZATIONNAME = Facebook; - }; - buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "RNAppAuthCarthageExample" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 83CBB9F61A601CBA00E9B192; - productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */; - ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; - }, - { - ProductGroup = 5E91572E1DD0AC6500FF2AA8 /* Products */; - ProjectRef = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; - }, - { - ProductGroup = ADBDB9201DFEBF0600ED6528 /* Products */; - ProjectRef = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */; - }, - { - ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */; - ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; - }, - { - ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */; - ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; - }, - { - ProductGroup = 78C398B11ACF4ADC00677621 /* Products */; - ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; - }, - { - ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */; - ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; - }, - { - ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */; - ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; - }, - { - ProductGroup = 832341B11AAA6A8300B99B32 /* Products */; - ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; - }, - { - ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */; - ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; - }, - { - ProductGroup = 139FDEE71B06529A00C62182 /* Products */; - ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; - }, - { - ProductGroup = 146834001AC3E56700842450 /* Products */; - ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */; - }, - { - ProductGroup = 025B1FDB216F572000A74269 /* Products */; - ProjectRef = 674E7C14052D40178B19C279 /* RNAppAuth.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 13B07F861A680F5B00A75B9A /* RNAppAuthCarthageExample */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTActionSheet.a; - remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTGeolocation.a; - remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTImage.a; - remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTNetwork.a; - remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTVibration.a; - remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 025B1FDF216F572000A74269 /* libRNAppAuth.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRNAppAuth.a; - remoteRef = 025B1FDE216F572000A74269 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTSettings.a; - remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTWebSocket.a; - remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 146834041AC3E56700842450 /* libReact.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libReact.a; - remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 2D16E6721FA4F8DC00B85C8A /* libRCTBlob-tvOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libRCTBlob-tvOS.a"; - remoteRef = 2D16E6711FA4F8DC00B85C8A /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 2D16E6841FA4F8DC00B85C8A /* libfishhook.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libfishhook.a; - remoteRef = 2D16E6831FA4F8DC00B85C8A /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 2D16E6861FA4F8DC00B85C8A /* libfishhook-tvOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libfishhook-tvOS.a"; - remoteRef = 2D16E6851FA4F8DC00B85C8A /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 2DF0FFDF2056DD460020B375 /* libjsinspector.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libjsinspector.a; - remoteRef = 2DF0FFDE2056DD460020B375 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 2DF0FFE12056DD460020B375 /* libjsinspector-tvOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libjsinspector-tvOS.a"; - remoteRef = 2DF0FFE02056DD460020B375 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 2DF0FFE32056DD460020B375 /* libthird-party.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libthird-party.a"; - remoteRef = 2DF0FFE22056DD460020B375 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 2DF0FFE52056DD460020B375 /* libthird-party.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libthird-party.a"; - remoteRef = 2DF0FFE42056DD460020B375 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 2DF0FFE72056DD460020B375 /* libdouble-conversion.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libdouble-conversion.a"; - remoteRef = 2DF0FFE62056DD460020B375 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 2DF0FFE92056DD460020B375 /* libdouble-conversion.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libdouble-conversion.a"; - remoteRef = 2DF0FFE82056DD460020B375 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 2DF0FFEB2056DD460020B375 /* libprivatedata.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libprivatedata.a; - remoteRef = 2DF0FFEA2056DD460020B375 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 2DF0FFED2056DD460020B375 /* libprivatedata-tvOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libprivatedata-tvOS.a"; - remoteRef = 2DF0FFEC2056DD460020B375 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libRCTImage-tvOS.a"; - remoteRef = 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libRCTLinking-tvOS.a"; - remoteRef = 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libRCTNetwork-tvOS.a"; - remoteRef = 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libRCTSettings-tvOS.a"; - remoteRef = 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libRCTText-tvOS.a"; - remoteRef = 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libRCTWebSocket-tvOS.a"; - remoteRef = 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 3DAD3EA31DF850E9000B6D8A /* libReact.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libReact.a; - remoteRef = 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 3DAD3EA51DF850E9000B6D8A /* libyoga.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libyoga.a; - remoteRef = 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 3DAD3EA71DF850E9000B6D8A /* libyoga.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libyoga.a; - remoteRef = 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libcxxreact.a; - remoteRef = 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libcxxreact.a; - remoteRef = 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libjschelpers.a; - remoteRef = 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libjschelpers.a; - remoteRef = 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTAnimation.a; - remoteRef = 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTAnimation.a; - remoteRef = 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTLinking.a; - remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 832341B51AAA6A8300B99B32 /* libRCTText.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTText.a; - remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTBlob.a; - remoteRef = ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 13B07F8E1A680F5B00A75B9A /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, - 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Bundle React Native code and images"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 13B07F871A680F5B00A75B9A /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, - 13B07FC11A68108700A75B9A /* main.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { - isa = PBXVariantGroup; - children = ( - 13B07FB21A68108700A75B9A /* Base */, - ); - name = LaunchScreen.xib; - path = RNAppAuthCarthageExample; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 13B07F941A680F5B00A75B9A /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CURRENT_PROJECT_VERSION = 1; - DEAD_CODE_STRIPPING = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); - HEADER_SEARCH_PATHS = ( - "$(inherited)", - "$(SRCROOT)/../node_modules/react-native-app-auth/ios", - ); - INFOPLIST_FILE = RNAppAuthCarthageExample/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - OTHER_LDFLAGS = ( - "$(inherited)", - "-ObjC", - "-lc++", - ); - PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = RNAppAuthCarthageExample; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 13B07F951A680F5B00A75B9A /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CURRENT_PROJECT_VERSION = 1; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); - HEADER_SEARCH_PATHS = ( - "$(inherited)", - "$(SRCROOT)/../node_modules/react-native-app-auth/ios", - ); - INFOPLIST_FILE = RNAppAuthCarthageExample/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - OTHER_LDFLAGS = ( - "$(inherited)", - "-ObjC", - "-lc++", - ); - PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = RNAppAuthCarthageExample; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; - 83CBBA201A601CBA00E9B192 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 83CBBA211A601CBA00E9B192 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "RNAppAuthCarthageExample" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 13B07F941A680F5B00A75B9A /* Debug */, - 13B07F951A680F5B00A75B9A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "RNAppAuthCarthageExample" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 83CBBA201A601CBA00E9B192 /* Debug */, - 83CBBA211A601CBA00E9B192 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; -} diff --git a/Example/iOSCarthageExample/ios/RNAppAuthCarthageExample.xcodeproj/xcshareddata/xcschemes/RNAppAuthCarthageExample-tvOS.xcscheme b/Example/iOSCarthageExample/ios/RNAppAuthCarthageExample.xcodeproj/xcshareddata/xcschemes/RNAppAuthCarthageExample-tvOS.xcscheme deleted file mode 100644 index fde0cb0b..00000000 --- a/Example/iOSCarthageExample/ios/RNAppAuthCarthageExample.xcodeproj/xcshareddata/xcschemes/RNAppAuthCarthageExample-tvOS.xcscheme +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/iOSCarthageExample/ios/RNAppAuthCarthageExample.xcodeproj/xcshareddata/xcschemes/RNAppAuthCarthageExample.xcscheme b/Example/iOSCarthageExample/ios/RNAppAuthCarthageExample.xcodeproj/xcshareddata/xcschemes/RNAppAuthCarthageExample.xcscheme deleted file mode 100644 index cb69b5c6..00000000 --- a/Example/iOSCarthageExample/ios/RNAppAuthCarthageExample.xcodeproj/xcshareddata/xcschemes/RNAppAuthCarthageExample.xcscheme +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/iOSCarthageExample/ios/RNAppAuthCarthageExample/AppDelegate.h b/Example/iOSCarthageExample/ios/RNAppAuthCarthageExample/AppDelegate.h deleted file mode 100644 index d8160400..00000000 --- a/Example/iOSCarthageExample/ios/RNAppAuthCarthageExample/AppDelegate.h +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Copyright (c) 2015-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -#import -#import "RNAppAuthAuthorizationFlowManager.h" - -@interface AppDelegate : UIResponder - -@property (nonatomic, strong) UIWindow *window; -@property (nonatomic, weak)idauthorizationFlowManagerDelegate; - -@end diff --git a/Example/iOSCarthageExample/ios/RNAppAuthCarthageExample/AppDelegate.m b/Example/iOSCarthageExample/ios/RNAppAuthCarthageExample/AppDelegate.m deleted file mode 100644 index 5ccbeb89..00000000 --- a/Example/iOSCarthageExample/ios/RNAppAuthCarthageExample/AppDelegate.m +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Copyright (c) 2015-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -#import "AppDelegate.h" - -#import -#import - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ - NSURL *jsCodeLocation; - - jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; - - RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation - moduleName:@"RNAppAuthCarthageExample" - initialProperties:nil - launchOptions:launchOptions]; - rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; - - self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; - UIViewController *rootViewController = [UIViewController new]; - rootViewController.view = rootView; - self.window.rootViewController = rootViewController; - [self.window makeKeyAndVisible]; - return YES; -} - -@end diff --git a/Example/iOSCarthageExample/ios/RNAppAuthCarthageExample/Base.lproj/LaunchScreen.xib b/Example/iOSCarthageExample/ios/RNAppAuthCarthageExample/Base.lproj/LaunchScreen.xib deleted file mode 100644 index 8dd931cf..00000000 --- a/Example/iOSCarthageExample/ios/RNAppAuthCarthageExample/Base.lproj/LaunchScreen.xib +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/iOSCarthageExample/ios/RNAppAuthCarthageExample/Images.xcassets/AppIcon.appiconset/Contents.json b/Example/iOSCarthageExample/ios/RNAppAuthCarthageExample/Images.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 118c98f7..00000000 --- a/Example/iOSCarthageExample/ios/RNAppAuthCarthageExample/Images.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Example/iOSCarthageExample/ios/RNAppAuthCarthageExample/Images.xcassets/Contents.json b/Example/iOSCarthageExample/ios/RNAppAuthCarthageExample/Images.xcassets/Contents.json deleted file mode 100644 index 2d92bd53..00000000 --- a/Example/iOSCarthageExample/ios/RNAppAuthCarthageExample/Images.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/Example/iOSCarthageExample/ios/RNAppAuthCarthageExample/Info.plist b/Example/iOSCarthageExample/ios/RNAppAuthCarthageExample/Info.plist deleted file mode 100644 index 65fec4bd..00000000 --- a/Example/iOSCarthageExample/ios/RNAppAuthCarthageExample/Info.plist +++ /dev/null @@ -1,71 +0,0 @@ - - - - - CFBundleURLTypes - - - CFBundleURLName - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleURLSchemes - - io.identityserver.demo - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - RNAppAuthCarthageExample - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - NSLocationWhenInUseUsageDescription - - UILaunchStoryboardName - LaunchScreen - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - NSLocationWhenInUseUsageDescription - - NSAppTransportSecurity - - - NSAllowsArbitraryLoads - - NSExceptionDomains - - localhost - - NSExceptionAllowsInsecureHTTPLoads - - - - - - diff --git a/Example/iOSCarthageExample/ios/RNAppAuthCarthageExample/main.m b/Example/iOSCarthageExample/ios/RNAppAuthCarthageExample/main.m deleted file mode 100644 index c73e0062..00000000 --- a/Example/iOSCarthageExample/ios/RNAppAuthCarthageExample/main.m +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Copyright (c) 2015-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -#import - -#import "AppDelegate.h" - -int main(int argc, char * argv[]) { - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/Example/iOSCarthageExample/package.json b/Example/iOSCarthageExample/package.json deleted file mode 100644 index 05a45adb..00000000 --- a/Example/iOSCarthageExample/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "RNAppAuthCarthageExample", - "version": "0.0.1", - "private": true, - "scripts": { - "start": "node node_modules/react-native/local-cli/cli.js start", - "test": "jest" - }, - "dependencies": { - "react": "16.5.0", - "react-native": "0.57.2", - "react-native-app-auth": "4.1.1", - "styled-components": "^3.4.10" - }, - "devDependencies": { - "babel-jest": "23.6.0", - "jest": "23.6.0", - "metro-react-native-babel-preset": "0.48.1", - "react-test-renderer": "16.5.0" - }, - "jest": { - "preset": "react-native" - } -} diff --git a/Example/iOSCarthageExample/yarn.lock b/Example/iOSCarthageExample/yarn.lock deleted file mode 100644 index f429ad24..00000000 --- a/Example/iOSCarthageExample/yarn.lock +++ /dev/null @@ -1,6258 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.0.0-beta.35": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8" - integrity sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA== - dependencies: - "@babel/highlight" "^7.0.0" - -"@babel/core@^7.0.0": - version "7.1.2" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.1.2.tgz#f8d2a9ceb6832887329a7b60f9d035791400ba4e" - integrity sha512-IFeSSnjXdhDaoysIlev//UzHZbdEmm7D0EIH2qtse9xK7mXEZQpYjs2P00XlP1qYsYvid79p+Zgg6tz1mp6iVw== - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/generator" "^7.1.2" - "@babel/helpers" "^7.1.2" - "@babel/parser" "^7.1.2" - "@babel/template" "^7.1.2" - "@babel/traverse" "^7.1.0" - "@babel/types" "^7.1.2" - convert-source-map "^1.1.0" - debug "^3.1.0" - json5 "^0.5.0" - lodash "^4.17.10" - resolve "^1.3.2" - semver "^5.4.1" - source-map "^0.5.0" - -"@babel/generator@^7.0.0", "@babel/generator@^7.1.2": - version "7.1.2" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.1.2.tgz#fde75c072575ce7abbd97322e8fef5bae67e4630" - integrity sha512-70A9HWLS/1RHk3Ck8tNHKxOoKQuSKocYgwDN85Pyl/RBduss6AKxUR7RIZ/lzduQMSYfWEM4DDBu6A+XGbkFig== - dependencies: - "@babel/types" "^7.1.2" - jsesc "^2.5.1" - lodash "^4.17.10" - source-map "^0.5.0" - trim-right "^1.0.1" - -"@babel/helper-annotate-as-pure@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32" - integrity sha512-3UYcJUj9kvSLbLbUIfQTqzcy5VX7GRZ/CCDrnOaZorFFM01aXp1+GJwuFGV4NDDoAS+mOUyHcO6UD/RfqOks3Q== - dependencies: - "@babel/types" "^7.0.0" - -"@babel/helper-builder-binary-assignment-operator-visitor@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.1.0.tgz#6b69628dfe4087798e0c4ed98e3d4a6b2fbd2f5f" - integrity sha512-qNSR4jrmJ8M1VMM9tibvyRAHXQs2PmaksQF7c1CGJNipfe3D8p+wgNwgso/P2A2r2mdgBWAXljNWR0QRZAMW8w== - dependencies: - "@babel/helper-explode-assignable-expression" "^7.1.0" - "@babel/types" "^7.0.0" - -"@babel/helper-builder-react-jsx@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.0.0.tgz#fa154cb53eb918cf2a9a7ce928e29eb649c5acdb" - integrity sha512-ebJ2JM6NAKW0fQEqN8hOLxK84RbRz9OkUhGS/Xd5u56ejMfVbayJ4+LykERZCOUM6faa6Fp3SZNX3fcT16MKHw== - dependencies: - "@babel/types" "^7.0.0" - esutils "^2.0.0" - -"@babel/helper-call-delegate@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.1.0.tgz#6a957f105f37755e8645343d3038a22e1449cc4a" - integrity sha512-YEtYZrw3GUK6emQHKthltKNZwszBcHK58Ygcis+gVUrF4/FmTVr5CCqQNSfmvg2y+YDEANyYoaLz/SHsnusCwQ== - dependencies: - "@babel/helper-hoist-variables" "^7.0.0" - "@babel/traverse" "^7.1.0" - "@babel/types" "^7.0.0" - -"@babel/helper-define-map@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.1.0.tgz#3b74caec329b3c80c116290887c0dd9ae468c20c" - integrity sha512-yPPcW8dc3gZLN+U1mhYV91QU3n5uTbx7DUdf8NnPbjS0RMwBuHi9Xt2MUgppmNz7CJxTBWsGczTiEp1CSOTPRg== - dependencies: - "@babel/helper-function-name" "^7.1.0" - "@babel/types" "^7.0.0" - lodash "^4.17.10" - -"@babel/helper-explode-assignable-expression@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.1.0.tgz#537fa13f6f1674df745b0c00ec8fe4e99681c8f6" - integrity sha512-NRQpfHrJ1msCHtKjbzs9YcMmJZOg6mQMmGRB+hbamEdG5PNpaSm95275VD92DvJKuyl0s2sFiDmMZ+EnnvufqA== - dependencies: - "@babel/traverse" "^7.1.0" - "@babel/types" "^7.0.0" - -"@babel/helper-function-name@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz#a0ceb01685f73355d4360c1247f582bfafc8ff53" - integrity sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw== - dependencies: - "@babel/helper-get-function-arity" "^7.0.0" - "@babel/template" "^7.1.0" - "@babel/types" "^7.0.0" - -"@babel/helper-get-function-arity@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz#83572d4320e2a4657263734113c42868b64e49c3" - integrity sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ== - dependencies: - "@babel/types" "^7.0.0" - -"@babel/helper-hoist-variables@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.0.0.tgz#46adc4c5e758645ae7a45deb92bab0918c23bb88" - integrity sha512-Ggv5sldXUeSKsuzLkddtyhyHe2YantsxWKNi7A+7LeD12ExRDWTRk29JCXpaHPAbMaIPZSil7n+lq78WY2VY7w== - dependencies: - "@babel/types" "^7.0.0" - -"@babel/helper-member-expression-to-functions@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.0.0.tgz#8cd14b0a0df7ff00f009e7d7a436945f47c7a16f" - integrity sha512-avo+lm/QmZlv27Zsi0xEor2fKcqWG56D5ae9dzklpIaY7cQMK5N8VSpaNVPPagiqmy7LrEjK1IWdGMOqPu5csg== - dependencies: - "@babel/types" "^7.0.0" - -"@babel/helper-module-imports@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz#96081b7111e486da4d2cd971ad1a4fe216cc2e3d" - integrity sha512-aP/hlLq01DWNEiDg4Jn23i+CXxW/owM4WpDLFUbpjxe4NS3BhLVZQ5i7E0ZrxuQ/vwekIeciyamgB1UIYxxM6A== - dependencies: - "@babel/types" "^7.0.0" - -"@babel/helper-module-transforms@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.1.0.tgz#470d4f9676d9fad50b324cdcce5fbabbc3da5787" - integrity sha512-0JZRd2yhawo79Rcm4w0LwSMILFmFXjugG3yqf+P/UsKsRS1mJCmMwwlHDlMg7Avr9LrvSpp4ZSULO9r8jpCzcw== - dependencies: - "@babel/helper-module-imports" "^7.0.0" - "@babel/helper-simple-access" "^7.1.0" - "@babel/helper-split-export-declaration" "^7.0.0" - "@babel/template" "^7.1.0" - "@babel/types" "^7.0.0" - lodash "^4.17.10" - -"@babel/helper-optimise-call-expression@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0.tgz#a2920c5702b073c15de51106200aa8cad20497d5" - integrity sha512-u8nd9NQePYNQV8iPWu/pLLYBqZBa4ZaY1YWRFMuxrid94wKI1QNt67NEZ7GAe5Kc/0LLScbim05xZFWkAdrj9g== - dependencies: - "@babel/types" "^7.0.0" - -"@babel/helper-plugin-utils@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250" - integrity sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA== - -"@babel/helper-regex@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.0.0.tgz#2c1718923b57f9bbe64705ffe5640ac64d9bdb27" - integrity sha512-TR0/N0NDCcUIUEbqV6dCO+LptmmSQFQ7q70lfcEB4URsjD0E1HzicrwUH+ap6BAQ2jhCX9Q4UqZy4wilujWlkg== - dependencies: - lodash "^4.17.10" - -"@babel/helper-remap-async-to-generator@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.1.0.tgz#361d80821b6f38da75bd3f0785ece20a88c5fe7f" - integrity sha512-3fOK0L+Fdlg8S5al8u/hWE6vhufGSn0bN09xm2LXMy//REAF8kDCrYoOBKYmA8m5Nom+sV9LyLCwrFynA8/slg== - dependencies: - "@babel/helper-annotate-as-pure" "^7.0.0" - "@babel/helper-wrap-function" "^7.1.0" - "@babel/template" "^7.1.0" - "@babel/traverse" "^7.1.0" - "@babel/types" "^7.0.0" - -"@babel/helper-replace-supers@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.1.0.tgz#5fc31de522ec0ef0899dc9b3e7cf6a5dd655f362" - integrity sha512-BvcDWYZRWVuDeXTYZWxekQNO5D4kO55aArwZOTFXw6rlLQA8ZaDicJR1sO47h+HrnCiDFiww0fSPV0d713KBGQ== - dependencies: - "@babel/helper-member-expression-to-functions" "^7.0.0" - "@babel/helper-optimise-call-expression" "^7.0.0" - "@babel/traverse" "^7.1.0" - "@babel/types" "^7.0.0" - -"@babel/helper-simple-access@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.1.0.tgz#65eeb954c8c245beaa4e859da6188f39d71e585c" - integrity sha512-Vk+78hNjRbsiu49zAPALxTb+JUQCz1aolpd8osOF16BGnLtseD21nbHgLPGUwrXEurZgiCOUmvs3ExTu4F5x6w== - dependencies: - "@babel/template" "^7.1.0" - "@babel/types" "^7.0.0" - -"@babel/helper-split-export-declaration@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz#3aae285c0311c2ab095d997b8c9a94cad547d813" - integrity sha512-MXkOJqva62dfC0w85mEf/LucPPS/1+04nmmRMPEBUB++hiiThQ2zPtX/mEWQ3mtzCEjIJvPY8nuwxXtQeQwUag== - dependencies: - "@babel/types" "^7.0.0" - -"@babel/helper-wrap-function@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.1.0.tgz#8cf54e9190706067f016af8f75cb3df829cc8c66" - integrity sha512-R6HU3dete+rwsdAfrOzTlE9Mcpk4RjU3aX3gi9grtmugQY0u79X7eogUvfXA5sI81Mfq1cn6AgxihfN33STjJA== - dependencies: - "@babel/helper-function-name" "^7.1.0" - "@babel/template" "^7.1.0" - "@babel/traverse" "^7.1.0" - "@babel/types" "^7.0.0" - -"@babel/helpers@^7.1.2": - version "7.1.2" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.1.2.tgz#ab752e8c35ef7d39987df4e8586c63b8846234b5" - integrity sha512-Myc3pUE8eswD73aWcartxB16K6CGmHDv9KxOmD2CeOs/FaEAQodr3VYGmlvOmog60vNQ2w8QbatuahepZwrHiA== - dependencies: - "@babel/template" "^7.1.2" - "@babel/traverse" "^7.1.0" - "@babel/types" "^7.1.2" - -"@babel/highlight@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4" - integrity sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw== - dependencies: - chalk "^2.0.0" - esutils "^2.0.2" - js-tokens "^4.0.0" - -"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.1.2": - version "7.1.2" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.1.2.tgz#85c5c47af6d244fab77bce6b9bd830e38c978409" - integrity sha512-x5HFsW+E/nQalGMw7hu+fvPqnBeBaIr0lWJ2SG0PPL2j+Pm9lYvCrsZJGIgauPIENx0v10INIyFjmSNUD/gSqQ== - -"@babel/plugin-check-constants@^7.0.0-beta.38": - version "7.0.0-beta.38" - resolved "https://registry.yarnpkg.com/@babel/plugin-check-constants/-/plugin-check-constants-7.0.0-beta.38.tgz#bbda6306d45a4f097ccb416c0b52d6503f6502cf" - integrity sha512-MjdGn/2sMLu0fnNFbkILut0OsegzRTeCOJ/uGHH88TwTXPzxONx2cTVJ36i3cTQXHMiIOUT3hX6HqzWM99Q6vA== - -"@babel/plugin-external-helpers@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-external-helpers/-/plugin-external-helpers-7.0.0.tgz#61ee7ba5dba27d7cad72a13d46bec23c060b762e" - integrity sha512-tZKTMdhZvTy0KCEX5EGQQm1RHr7jUa36q/yax1baEA0yZapVYmu10yW7LTqijITgSq416gPVjrcexiA6y4pJlA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-proposal-class-properties@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.1.0.tgz#9af01856b1241db60ec8838d84691aa0bd1e8df4" - integrity sha512-/PCJWN+CKt5v1xcGn4vnuu13QDoV+P7NcICP44BoonAJoPSGwVkgrXihFIQGiEjjPlUDBIw1cM7wYFLARS2/hw== - dependencies: - "@babel/helper-function-name" "^7.1.0" - "@babel/helper-member-expression-to-functions" "^7.0.0" - "@babel/helper-optimise-call-expression" "^7.0.0" - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-replace-supers" "^7.1.0" - "@babel/plugin-syntax-class-properties" "^7.0.0" - -"@babel/plugin-proposal-export-default-from@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-default-from/-/plugin-proposal-export-default-from-7.0.0.tgz#a057bbfd4649facfe39f33a537e18554bdd2b5da" - integrity sha512-cWhkx6SyjZ4caFOanoPmDNgQCuYYTmou4QXy886JsyLTw/vhWQbop2gLKsWyyswrJkKTB7fSNxVYbP/oEsoySA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-export-default-from" "^7.0.0" - -"@babel/plugin-proposal-nullish-coalescing-operator@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.0.0.tgz#b72ec31adf612d062dc0348316246127a451e45f" - integrity sha512-QIN3UFo1ul4ruAsjIqK43PeXedo1qY74zeGrODJl1KfCGeMc6qJC4rb5Ylml/smzxibqsDeVZGH+TmWHCldRQQ== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.0.0" - -"@babel/plugin-proposal-object-rest-spread@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.0.0.tgz#9a17b547f64d0676b6c9cecd4edf74a82ab85e7e" - integrity sha512-14fhfoPcNu7itSen7Py1iGN0gEm87hX/B+8nZPqkdmANyyYWYMY2pjA3r8WXbWVKMzfnSNS0xY8GVS0IjXi/iw== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-object-rest-spread" "^7.0.0" - -"@babel/plugin-proposal-optional-catch-binding@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.0.0.tgz#b610d928fe551ff7117d42c8bb410eec312a6425" - integrity sha512-JPqAvLG1s13B/AuoBjdBYvn38RqW6n1TzrQO839/sIpqLpbnXKacsAgpZHzLD83Sm8SDXMkkrAvEnJ25+0yIpw== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-optional-catch-binding" "^7.0.0" - -"@babel/plugin-proposal-optional-chaining@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.0.0.tgz#3d344d4152253379b8758e7d041148e8787c4a9d" - integrity sha512-7x8HLa71OzNiofbQUVakS0Kmg++6a+cXNfS7QKHbbv03SuSaumJyaWsfNgw+T7aqrJlqurYpZqrkPgXu0iZK0w== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-optional-chaining" "^7.0.0" - -"@babel/plugin-syntax-class-properties@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.0.0.tgz#e051af5d300cbfbcec4a7476e37a803489881634" - integrity sha512-cR12g0Qzn4sgkjrbrzWy2GE7m9vMl/sFkqZ3gIpAQdrvPDnLM8180i+ANDFIXfjHo9aqp0ccJlQ0QNZcFUbf9w== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-syntax-dynamic-import@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.0.0.tgz#6dfb7d8b6c3be14ce952962f658f3b7eb54c33ee" - integrity sha512-Gt9xNyRrCHCiyX/ZxDGOcBnlJl0I3IWicpZRC4CdC0P5a/I07Ya2OAMEBU+J7GmRFVmIetqEYRko6QYRuKOESw== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-syntax-export-default-from@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-export-default-from/-/plugin-syntax-export-default-from-7.0.0.tgz#084b639bce3d42f3c5bf3f68ccb42220bb2d729d" - integrity sha512-HNnjg/fFFbnuLAqr/Ocp1Y3GB4AjmXcu1xxn3ql3bS2kGrB/qi+Povshb8i3hOkE5jNozzh8r/0/lq1w8oOWbQ== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-syntax-flow@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.0.0.tgz#70638aeaad9ee426bc532e51523cff8ff02f6f17" - integrity sha512-zGcuZWiWWDa5qTZ6iAnpG0fnX/GOu49pGR5PFvkQ9GmKNaSphXQnlNXh/LG20sqWtNrx/eB6krzfEzcwvUyeFA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-syntax-jsx@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.0.0.tgz#034d5e2b4e14ccaea2e4c137af7e4afb39375ffd" - integrity sha512-PdmL2AoPsCLWxhIr3kG2+F9v4WH06Q3z+NoGVpQgnUNGcagXHq5sB3OXxkSahKq9TLdNMN/AJzFYSOo8UKDMHg== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-syntax-nullish-coalescing-operator@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.0.0.tgz#b60931d5a15da82625fff6657c39419969598743" - integrity sha512-oAJmMsAvTSIk9y0sZdU2S/nY44PEUuHN7EzNDMgbuR4e/OwyfR9lSmoBJBZ2lslFZIqhksrTt4i+av7uKfNYDw== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-syntax-object-rest-spread@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.0.0.tgz#37d8fbcaf216bd658ea1aebbeb8b75e88ebc549b" - integrity sha512-5A0n4p6bIiVe5OvQPxBnesezsgFJdHhSs3uFSvaPdMqtsovajLZ+G2vZyvNe10EzJBWWo3AcHGKhAFUxqwp2dw== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-syntax-optional-catch-binding@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.0.0.tgz#886f72008b3a8b185977f7cb70713b45e51ee475" - integrity sha512-Wc+HVvwjcq5qBg1w5RG9o9RVzmCaAg/Vp0erHCKpAYV8La6I94o4GQAmFYNmkzoMO6gzoOSulpKeSSz6mPEoZw== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-syntax-optional-chaining@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.0.0.tgz#1e6ecba124310b5d3a8fc1e00d50b1c4c2e05e68" - integrity sha512-QXedQsZf8yua1nNrXSePT0TsGSQH9A1iK08m9dhCMdZeJaaxYcQfXdgHWVV6Cp7WE/afPVvSKIsAHK5wP+yxDA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-syntax-typescript@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.0.0.tgz#90f4fe0a741ae9c0dcdc3017717c05a0cbbd5158" - integrity sha512-5fxmdqiAQVQTIS+KSvYeZuTt91wKtBTYi6JlIkvbQ6hmO+9fZE81ezxmMiFMIsxE7CdRSgzn7nQ1BChcvK9OpA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-arrow-functions@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.0.0.tgz#a6c14875848c68a3b4b3163a486535ef25c7e749" - integrity sha512-2EZDBl1WIO/q4DIkIp4s86sdp4ZifL51MoIviLY/gG/mLSuOIEg7J8o6mhbxOTvUJkaN50n+8u41FVsr5KLy/w== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-async-to-generator@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.1.0.tgz#109e036496c51dd65857e16acab3bafdf3c57811" - integrity sha512-rNmcmoQ78IrvNCIt/R9U+cixUHeYAzgusTFgIAv+wQb9HJU4szhpDD6e5GCACmj/JP5KxuCwM96bX3L9v4ZN/g== - dependencies: - "@babel/helper-module-imports" "^7.0.0" - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-remap-async-to-generator" "^7.1.0" - -"@babel/plugin-transform-block-scoped-functions@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.0.0.tgz#482b3f75103927e37288b3b67b65f848e2aa0d07" - integrity sha512-AOBiyUp7vYTqz2Jibe1UaAWL0Hl9JUXEgjFvvvcSc9MVDItv46ViXFw2F7SVt1B5k+KWjl44eeXOAk3UDEaJjQ== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-block-scoping@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.0.0.tgz#1745075edffd7cdaf69fab2fb6f9694424b7e9bc" - integrity sha512-GWEMCrmHQcYWISilUrk9GDqH4enf3UmhOEbNbNrlNAX1ssH3MsS1xLOS6rdjRVPgA7XXVPn87tRkdTEoA/dxEg== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - lodash "^4.17.10" - -"@babel/plugin-transform-classes@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.1.0.tgz#ab3f8a564361800cbc8ab1ca6f21108038432249" - integrity sha512-rNaqoD+4OCBZjM7VaskladgqnZ1LO6o2UxuWSDzljzW21pN1KXkB7BstAVweZdxQkHAujps5QMNOTWesBciKFg== - dependencies: - "@babel/helper-annotate-as-pure" "^7.0.0" - "@babel/helper-define-map" "^7.1.0" - "@babel/helper-function-name" "^7.1.0" - "@babel/helper-optimise-call-expression" "^7.0.0" - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-replace-supers" "^7.1.0" - "@babel/helper-split-export-declaration" "^7.0.0" - globals "^11.1.0" - -"@babel/plugin-transform-computed-properties@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.0.0.tgz#2fbb8900cd3e8258f2a2ede909b90e7556185e31" - integrity sha512-ubouZdChNAv4AAWAgU7QKbB93NU5sHwInEWfp+/OzJKA02E6Woh9RVoX4sZrbRwtybky/d7baTUqwFx+HgbvMA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-destructuring@^7.0.0": - version "7.1.2" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.1.2.tgz#5fa77d473f5a0a3f5266ad7ce2e8c995a164d60a" - integrity sha512-cvToXvp/OsYxtEn57XJu9BvsGSEYjAh9UeUuXpoi7x6QHB7YdWyQ4lRU/q0Fu1IJNT0o0u4FQ1DMQBzJ8/8vZg== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-exponentiation-operator@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.1.0.tgz#9c34c2ee7fd77e02779cfa37e403a2e1003ccc73" - integrity sha512-uZt9kD1Pp/JubkukOGQml9tqAeI8NkE98oZnHZ2qHRElmeKCodbTZgOEUtujSCSLhHSBWbzNiFSDIMC4/RBTLQ== - dependencies: - "@babel/helper-builder-binary-assignment-operator-visitor" "^7.1.0" - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-flow-strip-types@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.0.0.tgz#c40ced34c2783985d90d9f9ac77a13e6fb396a01" - integrity sha512-WhXUNb4It5a19RsgKKbQPrjmy4yWOY1KynpEbNw7bnd1QTcrT/EIl3MJvnGgpgvrKyKbqX7nUNOJfkpLOnoDKA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-flow" "^7.0.0" - -"@babel/plugin-transform-for-of@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.0.0.tgz#f2ba4eadb83bd17dc3c7e9b30f4707365e1c3e39" - integrity sha512-TlxKecN20X2tt2UEr2LNE6aqA0oPeMT1Y3cgz8k4Dn1j5ObT8M3nl9aA37LLklx0PBZKETC9ZAf9n/6SujTuXA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-function-name@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.1.0.tgz#29c5550d5c46208e7f730516d41eeddd4affadbb" - integrity sha512-VxOa1TMlFMtqPW2IDYZQaHsFrq/dDoIjgN098NowhexhZcz3UGlvPgZXuE1jEvNygyWyxRacqDpCZt+par1FNg== - dependencies: - "@babel/helper-function-name" "^7.1.0" - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-literals@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.0.0.tgz#2aec1d29cdd24c407359c930cdd89e914ee8ff86" - integrity sha512-1NTDBWkeNXgpUcyoVFxbr9hS57EpZYXpje92zv0SUzjdu3enaRwF/l3cmyRnXLtIdyJASyiS6PtybK+CgKf7jA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-member-expression-literals@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.0.0.tgz#96a265bf61a9ed6f75c39db0c30d41ef7aabf072" - integrity sha512-kgAGWcjVdflNPSaRb9rDPdGJ9/gF80VPmxx80gdKz6NSofHvxA2LofECQ+7GrDVzzH8zBJzTn1xlV4xnmWj/nw== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-modules-commonjs@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.1.0.tgz#0a9d86451cbbfb29bd15186306897c67f6f9a05c" - integrity sha512-wtNwtMjn1XGwM0AXPspQgvmE6msSJP15CX2RVfpTSTNPLhKhaOjaIfBaVfj4iUZ/VrFSodcFedwtPg/NxwQlPA== - dependencies: - "@babel/helper-module-transforms" "^7.1.0" - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-simple-access" "^7.1.0" - -"@babel/plugin-transform-object-assign@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-assign/-/plugin-transform-object-assign-7.0.0.tgz#fca6d7500d9675c42868b8f3882979201b9a5ad8" - integrity sha512-Dag8mxx7/03oj8F8PkNso8GEMhwGfeT0TL6KfMsa9Brjx4IpwZVl3WBvEmYks8BMhPmrvM5NQ/tjaMbwEj5ijA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-object-super@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.1.0.tgz#b1ae194a054b826d8d4ba7ca91486d4ada0f91bb" - integrity sha512-/O02Je1CRTSk2SSJaq0xjwQ8hG4zhZGNjE8psTsSNPXyLRCODv7/PBozqT5AmQMzp7MI3ndvMhGdqp9c96tTEw== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-replace-supers" "^7.1.0" - -"@babel/plugin-transform-parameters@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.1.0.tgz#44f492f9d618c9124026e62301c296bf606a7aed" - integrity sha512-vHV7oxkEJ8IHxTfRr3hNGzV446GAb+0hgbA7o/0Jd76s+YzccdWuTU296FOCOl/xweU4t/Ya4g41yWz80RFCRw== - dependencies: - "@babel/helper-call-delegate" "^7.1.0" - "@babel/helper-get-function-arity" "^7.0.0" - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-property-literals@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.0.0.tgz#0b95a91dbd1f0be5b5a99ed86571ef5b5ae77009" - integrity sha512-7HK6/jB4MLpwQUJQ3diaX0pbCRcoL9asJscQfU3D1HpDwYdrH6yAUKleUNFHFyGNYBI9UeJrS2Jpx2JhtPKu5g== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-react-display-name@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.0.0.tgz#93759e6c023782e52c2da3b75eca60d4f10533ee" - integrity sha512-BX8xKuQTO0HzINxT6j/GiCwoJB0AOMs0HmLbEnAvcte8U8rSkNa/eSCAY+l1OA4JnCVq2jw2p6U8QQryy2fTPg== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-react-jsx-source@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.0.0.tgz#28e00584f9598c0dd279f6280eee213fa0121c3c" - integrity sha512-OSeEpFJEH5dw/TtxTg4nijl4nHBbhqbKL94Xo/Y17WKIf2qJWeIk/QeXACF19lG1vMezkxqruwnTjVizaW7u7w== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-jsx" "^7.0.0" - -"@babel/plugin-transform-react-jsx@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.0.0.tgz#524379e4eca5363cd10c4446ba163f093da75f3e" - integrity sha512-0TMP21hXsSUjIQJmu/r7RiVxeFrXRcMUigbKu0BLegJK9PkYodHstaszcig7zxXfaBji2LYUdtqIkHs+hgYkJQ== - dependencies: - "@babel/helper-builder-react-jsx" "^7.0.0" - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-jsx" "^7.0.0" - -"@babel/plugin-transform-regenerator@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.0.0.tgz#5b41686b4ed40bef874d7ed6a84bdd849c13e0c1" - integrity sha512-sj2qzsEx8KDVv1QuJc/dEfilkg3RRPvPYx/VnKLtItVQRWt1Wqf5eVCOLZm29CiGFfYYsA3VPjfizTCV0S0Dlw== - dependencies: - regenerator-transform "^0.13.3" - -"@babel/plugin-transform-runtime@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.1.0.tgz#9f76920d42551bb577e2dc594df229b5f7624b63" - integrity sha512-WFLMgzu5DLQEah0lKTJzYb14vd6UiES7PTnXcvrPZ1VrwFeJ+mTbvr65fFAsXYMt2bIoOoC0jk76zY1S7HZjUg== - dependencies: - "@babel/helper-module-imports" "^7.0.0" - "@babel/helper-plugin-utils" "^7.0.0" - resolve "^1.8.1" - semver "^5.5.1" - -"@babel/plugin-transform-shorthand-properties@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.0.0.tgz#85f8af592dcc07647541a0350e8c95c7bf419d15" - integrity sha512-g/99LI4vm5iOf5r1Gdxq5Xmu91zvjhEG5+yZDJW268AZELAu4J1EiFLnkSG3yuUsZyOipVOVUKoGPYwfsTymhw== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-spread@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.0.0.tgz#93583ce48dd8c85e53f3a46056c856e4af30b49b" - integrity sha512-L702YFy2EvirrR4shTj0g2xQp7aNwZoWNCkNu2mcoU0uyzMl0XRwDSwzB/xp6DSUFiBmEXuyAyEN16LsgVqGGQ== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-sticky-regex@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.0.0.tgz#30a9d64ac2ab46eec087b8530535becd90e73366" - integrity sha512-LFUToxiyS/WD+XEWpkx/XJBrUXKewSZpzX68s+yEOtIbdnsRjpryDw9U06gYc6klYEij/+KQVRnD3nz3AoKmjw== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-regex" "^7.0.0" - -"@babel/plugin-transform-template-literals@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.0.0.tgz#084f1952efe5b153ddae69eb8945f882c7a97c65" - integrity sha512-vA6rkTCabRZu7Nbl9DfLZE1imj4tzdWcg5vtdQGvj+OH9itNNB6hxuRMHuIY8SGnEt1T9g5foqs9LnrHzsqEFg== - dependencies: - "@babel/helper-annotate-as-pure" "^7.0.0" - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-typescript@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.1.0.tgz#81e7b4be90e7317cbd04bf1163ebf06b2adee60b" - integrity sha512-TOTtVeT+fekAesiCHnPz+PSkYSdOSLyLn42DI45nxg6iCdlQY6LIj/tYqpMB0y+YicoTUiYiXqF8rG6SKfhw6Q== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-typescript" "^7.0.0" - -"@babel/plugin-transform-unicode-regex@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.0.0.tgz#c6780e5b1863a76fe792d90eded9fcd5b51d68fc" - integrity sha512-uJBrJhBOEa3D033P95nPHu3nbFwFE9ZgXsfEitzoIXIwqAZWk7uXcg06yFKXz9FSxBH5ucgU/cYdX0IV8ldHKw== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-regex" "^7.0.0" - regexpu-core "^4.1.3" - -"@babel/register@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.0.0.tgz#fa634bae1bfa429f60615b754fc1f1d745edd827" - integrity sha512-f/+CRmaCe7rVEvcvPvxeA8j5aJhHC3aJie7YuqcMDhUOuyWLA7J/aNrTaHIzoWPEhpHA54mec4Mm8fv8KBlv3g== - dependencies: - core-js "^2.5.7" - find-cache-dir "^1.0.0" - home-or-tmp "^3.0.0" - lodash "^4.17.10" - mkdirp "^0.5.1" - pirates "^4.0.0" - source-map-support "^0.5.9" - -"@babel/runtime@^7.0.0": - version "7.1.2" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.1.2.tgz#81c89935f4647706fc54541145e6b4ecfef4b8e3" - integrity sha512-Y3SCjmhSupzFB6wcv1KmmFucH6gDVnI30WjOcicV10ju0cZjak3Jcs67YLIXBrmZYw1xCrVeJPbycFwrqNyxpg== - dependencies: - regenerator-runtime "^0.12.0" - -"@babel/template@^7.0.0", "@babel/template@^7.1.0", "@babel/template@^7.1.2": - version "7.1.2" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.1.2.tgz#090484a574fef5a2d2d7726a674eceda5c5b5644" - integrity sha512-SY1MmplssORfFiLDcOETrW7fCLl+PavlwMh92rrGcikQaRq4iWPVH0MpwPpY3etVMx6RnDjXtr6VZYr/IbP/Ag== - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/parser" "^7.1.2" - "@babel/types" "^7.1.2" - -"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.1.0.tgz#503ec6669387efd182c3888c4eec07bcc45d91b2" - integrity sha512-bwgln0FsMoxm3pLOgrrnGaXk18sSM9JNf1/nHC/FksmNGFbYnPWY4GYCfLxyP1KRmfsxqkRpfoa6xr6VuuSxdw== - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/generator" "^7.0.0" - "@babel/helper-function-name" "^7.1.0" - "@babel/helper-split-export-declaration" "^7.0.0" - "@babel/parser" "^7.1.0" - "@babel/types" "^7.0.0" - debug "^3.1.0" - globals "^11.1.0" - lodash "^4.17.10" - -"@babel/types@^7.0.0", "@babel/types@^7.1.2": - version "7.1.2" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.1.2.tgz#183e7952cf6691628afdc2e2b90d03240bac80c0" - integrity sha512-pb1I05sZEKiSlMUV9UReaqsCPUpgbHHHu2n1piRm7JkuBkm6QxcaIzKu6FMnMtCbih/cEYTR+RGYYC96Yk9HAg== - dependencies: - esutils "^2.0.2" - lodash "^4.17.10" - to-fast-properties "^2.0.0" - -abab@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.0.tgz#aba0ab4c5eee2d4c79d3487d85450fb2376ebb0f" - integrity sha512-sY5AXXVZv4Y1VACTtR11UJCPHHudgY5i26Qj5TypE6DKlIApbwb5uqhXcJ5UUGbvZNRh7EeIoW+LrJumBsKp7w== - -abbrev@1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" - integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== - -absolute-path@^0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/absolute-path/-/absolute-path-0.0.0.tgz#a78762fbdadfb5297be99b15d35a785b2f095bf7" - integrity sha1-p4di+9rftSl76ZsV01p4Wy8JW/c= - -accepts@~1.3.3, accepts@~1.3.5: - version "1.3.5" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2" - integrity sha1-63d99gEXI6OxTopywIBcjoZ0a9I= - dependencies: - mime-types "~2.1.18" - negotiator "0.6.1" - -acorn-globals@^4.1.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.3.0.tgz#e3b6f8da3c1552a95ae627571f7dd6923bb54103" - integrity sha512-hMtHj3s5RnuhvHPowpBYvJVj3rAar82JiDQHvGs1zO0l10ocX/xEdBShNHTJaboucJUsScghp74pH3s7EnHHQw== - dependencies: - acorn "^6.0.1" - acorn-walk "^6.0.1" - -acorn-walk@^6.0.1: - version "6.1.0" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.1.0.tgz#c957f4a1460da46af4a0388ce28b4c99355b0cbc" - integrity sha512-ugTb7Lq7u4GfWSqqpwE0bGyoBZNMTok/zDBXxfEG0QM50jNlGhIWjRC1pPN7bvV1anhF+bs+/gNcRw+o55Evbg== - -acorn@^5.5.3: - version "5.7.3" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279" - integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw== - -acorn@^6.0.1: - version "6.0.2" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.0.2.tgz#6a459041c320ab17592c6317abbfdf4bbaa98ca4" - integrity sha512-GXmKIvbrN3TV7aVqAzVFaMW8F8wzVX7voEBRO3bDA64+EX37YSayggRJP5Xig6HYHBkWKpFg9W5gg6orklubhg== - -ajv@^5.3.0: - version "5.5.2" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" - integrity sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU= - dependencies: - co "^4.6.0" - fast-deep-equal "^1.0.0" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.3.0" - -ansi-colors@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-1.1.0.tgz#6374b4dd5d4718ff3ce27a671a3b1cad077132a9" - integrity sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA== - dependencies: - ansi-wrap "^0.1.0" - -ansi-cyan@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/ansi-cyan/-/ansi-cyan-0.1.1.tgz#538ae528af8982f28ae30d86f2f17456d2609873" - integrity sha1-U4rlKK+JgvKK4w2G8vF0VtJgmHM= - dependencies: - ansi-wrap "0.1.0" - -ansi-escapes@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.1.0.tgz#f73207bb81207d75fd6c83f125af26eea378ca30" - integrity sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw== - -ansi-gray@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/ansi-gray/-/ansi-gray-0.1.1.tgz#2962cf54ec9792c48510a3deb524436861ef7251" - integrity sha1-KWLPVOyXksSFEKPetSRDaGHvclE= - dependencies: - ansi-wrap "0.1.0" - -ansi-red@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/ansi-red/-/ansi-red-0.1.1.tgz#8c638f9d1080800a353c9c28c8a81ca4705d946c" - integrity sha1-jGOPnRCAgAo1PJwoyKgcpHBdlGw= - dependencies: - ansi-wrap "0.1.0" - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= - -ansi-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" - integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= - -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= - -ansi-styles@^3.2.0, ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -ansi-wrap@0.1.0, ansi-wrap@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf" - integrity sha1-qCJQ3bABXponyoLoLqYDu/pF768= - -ansi@^0.3.0, ansi@~0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/ansi/-/ansi-0.3.1.tgz#0c42d4fb17160d5a9af1e484bace1c66922c1b21" - integrity sha1-DELU+xcWDVqa8eSEus4cZpIsGyE= - -anymatch@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" - integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== - dependencies: - micromatch "^3.1.4" - normalize-path "^2.1.1" - -append-transform@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991" - integrity sha1-126/jKlNJ24keja61EpLdKthGZE= - dependencies: - default-require-extensions "^1.0.0" - -aproba@^1.0.3: - version "1.2.0" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" - integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== - -are-we-there-yet@~1.1.2: - version "1.1.5" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" - integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w== - dependencies: - delegates "^1.0.0" - readable-stream "^2.0.6" - -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - dependencies: - sprintf-js "~1.0.2" - -arr-diff@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-1.1.0.tgz#687c32758163588fef7de7b36fabe495eb1a399a" - integrity sha1-aHwydYFjWI/vfeezb6vklesaOZo= - dependencies: - arr-flatten "^1.0.1" - array-slice "^0.2.3" - -arr-diff@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" - integrity sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8= - dependencies: - arr-flatten "^1.0.1" - -arr-diff@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" - integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= - -arr-flatten@^1.0.1, arr-flatten@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" - integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== - -arr-union@^2.0.1: - version "2.1.0" - resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-2.1.0.tgz#20f9eab5ec70f5c7d215b1077b1c39161d292c7d" - integrity sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0= - -arr-union@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" - integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= - -array-equal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" - integrity sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM= - -array-filter@~0.0.0: - version "0.0.1" - resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-0.0.1.tgz#7da8cf2e26628ed732803581fd21f67cacd2eeec" - integrity sha1-fajPLiZijtcygDWB/SH2fKzS7uw= - -array-map@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/array-map/-/array-map-0.0.0.tgz#88a2bab73d1cf7bcd5c1b118a003f66f665fa662" - integrity sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI= - -array-reduce@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/array-reduce/-/array-reduce-0.0.0.tgz#173899d3ffd1c7d9383e4479525dbe278cab5f2b" - integrity sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys= - -array-slice@^0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-0.2.3.tgz#dd3cfb80ed7973a75117cdac69b0b99ec86186f5" - integrity sha1-3Tz7gO15c6dRF82sabC5nshhhvU= - -array-unique@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" - integrity sha1-odl8yvy8JiXMcPrc6zalDFiwGlM= - -array-unique@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" - integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= - -arrify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" - integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= - -art@^0.10.0: - version "0.10.3" - resolved "https://registry.yarnpkg.com/art/-/art-0.10.3.tgz#b01d84a968ccce6208df55a733838c96caeeaea2" - integrity sha512-HXwbdofRTiJT6qZX/FnchtldzJjS3vkLJxQilc3Xj+ma2MXjY4UAyQ0ls1XZYVnDvVIBiFZbC6QsvtW86TD6tQ== - -asap@~2.0.3: - version "2.0.6" - resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" - integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= - -asn1@~0.2.3: - version "0.2.4" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" - integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== - dependencies: - safer-buffer "~2.1.0" - -assert-plus@1.0.0, assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= - -assign-symbols@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" - integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= - -astral-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" - integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== - -async-limiter@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8" - integrity sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg== - -async@^2.1.4, async@^2.4.0, async@^2.5.0: - version "2.6.1" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.1.tgz#b245a23ca71930044ec53fa46aa00a3e87c6a610" - integrity sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ== - dependencies: - lodash "^4.17.10" - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= - -atob@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" - integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== - -aws-sign2@~0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" - integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= - -aws4@^1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" - integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== - -babel-code-frame@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" - integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= - dependencies: - chalk "^1.1.3" - esutils "^2.0.2" - js-tokens "^3.0.2" - -babel-core@^6.0.0, babel-core@^6.26.0, babel-core@^6.7.2: - version "6.26.3" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207" - integrity sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA== - dependencies: - babel-code-frame "^6.26.0" - babel-generator "^6.26.0" - babel-helpers "^6.24.1" - babel-messages "^6.23.0" - babel-register "^6.26.0" - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - convert-source-map "^1.5.1" - debug "^2.6.9" - json5 "^0.5.1" - lodash "^4.17.4" - minimatch "^3.0.4" - path-is-absolute "^1.0.1" - private "^0.1.8" - slash "^1.0.0" - source-map "^0.5.7" - -babel-generator@^6.18.0, babel-generator@^6.26.0: - version "6.26.1" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" - integrity sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA== - dependencies: - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - detect-indent "^4.0.0" - jsesc "^1.3.0" - lodash "^4.17.4" - source-map "^0.5.7" - trim-right "^1.0.1" - -babel-helper-builder-react-jsx@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.26.0.tgz#39ff8313b75c8b65dceff1f31d383e0ff2a408a0" - integrity sha1-Of+DE7dci2Xc7/HzHTg+D/KkCKA= - dependencies: - babel-runtime "^6.26.0" - babel-types "^6.26.0" - esutils "^2.0.2" - -babel-helper-call-delegate@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d" - integrity sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340= - dependencies: - babel-helper-hoist-variables "^6.24.1" - babel-runtime "^6.22.0" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-define-map@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz#a5f56dab41a25f97ecb498c7ebaca9819f95be5f" - integrity sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8= - dependencies: - babel-helper-function-name "^6.24.1" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - lodash "^4.17.4" - -babel-helper-function-name@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9" - integrity sha1-00dbjAPtmCQqJbSDUasYOZ01gKk= - dependencies: - babel-helper-get-function-arity "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-get-function-arity@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d" - integrity sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0= - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-hoist-variables@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76" - integrity sha1-HssnaJydJVE+rbyZFKc/VAi+enY= - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-optimise-call-expression@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257" - integrity sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc= - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-replace-supers@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a" - integrity sha1-v22/5Dk40XNpohPKiov3S2qQqxo= - dependencies: - babel-helper-optimise-call-expression "^6.24.1" - babel-messages "^6.23.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helpers@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" - integrity sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI= - dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-jest@23.6.0, babel-jest@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-23.6.0.tgz#a644232366557a2240a0c083da6b25786185a2f1" - integrity sha512-lqKGG6LYXYu+DQh/slrQ8nxXQkEkhugdXsU6St7GmhVS7Ilc/22ArwqXNJrf0QaOBjZB0360qZMwXqDYQHXaew== - dependencies: - babel-plugin-istanbul "^4.1.6" - babel-preset-jest "^23.2.0" - -babel-messages@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" - integrity sha1-8830cDhYA1sqKVHG7F7fbGLyYw4= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-check-es2015-constants@^6.8.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a" - integrity sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-istanbul@^4.1.6: - version "4.1.6" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.6.tgz#36c59b2192efce81c5b378321b74175add1c9a45" - integrity sha512-PWP9FQ1AhZhS01T/4qLSKoHGY/xvkZdVBGlKM/HuxxS3+sC66HhTNR7+MpbO/so/cz/wY94MeSWJuP1hXIPfwQ== - dependencies: - babel-plugin-syntax-object-rest-spread "^6.13.0" - find-up "^2.1.0" - istanbul-lib-instrument "^1.10.1" - test-exclude "^4.2.1" - -babel-plugin-jest-hoist@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-23.2.0.tgz#e61fae05a1ca8801aadee57a6d66b8cefaf44167" - integrity sha1-5h+uBaHKiAGq3uV6bWa4zvr0QWc= - -babel-plugin-syntax-class-properties@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz#d7eb23b79a317f8543962c505b827c7d6cac27de" - integrity sha1-1+sjt5oxf4VDlixQW4J8fWysJ94= - -babel-plugin-syntax-flow@^6.18.0, babel-plugin-syntax-flow@^6.8.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d" - integrity sha1-TDqyCiryaqIM0lmVw5jE63AxDI0= - -babel-plugin-syntax-jsx@^6.8.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" - integrity sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY= - -babel-plugin-syntax-object-rest-spread@^6.13.0, babel-plugin-syntax-object-rest-spread@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" - integrity sha1-/WU28rzhODb/o6VFjEkDpZe7O/U= - -babel-plugin-syntax-trailing-function-commas@^6.8.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" - integrity sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM= - -babel-plugin-syntax-trailing-function-commas@^7.0.0-beta.0: - version "7.0.0-beta.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-7.0.0-beta.0.tgz#aa213c1435e2bffeb6fca842287ef534ad05d5cf" - integrity sha512-Xj9XuRuz3nTSbaTXWv3itLOcxyF4oPD8douBBmj7U9BBC6nEBYfyOJYQMf/8PJAFotC62UY5dFfIGEPr7WswzQ== - -babel-plugin-transform-class-properties@^6.8.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz#6a79763ea61d33d36f37b611aa9def81a81b46ac" - integrity sha1-anl2PqYdM9NvN7YRqp3vgagbRqw= - dependencies: - babel-helper-function-name "^6.24.1" - babel-plugin-syntax-class-properties "^6.8.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-arrow-functions@^6.8.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" - integrity sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-block-scoped-functions@^6.8.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141" - integrity sha1-u8UbSflk1wy42OC5ToICRs46YUE= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-block-scoping@^6.8.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz#d70f5299c1308d05c12f463813b0a09e73b1895f" - integrity sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8= - dependencies: - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - lodash "^4.17.4" - -babel-plugin-transform-es2015-classes@^6.8.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" - integrity sha1-WkxYpQyclGHlZLSyo7+ryXolhNs= - dependencies: - babel-helper-define-map "^6.24.1" - babel-helper-function-name "^6.24.1" - babel-helper-optimise-call-expression "^6.24.1" - babel-helper-replace-supers "^6.24.1" - babel-messages "^6.23.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-computed-properties@^6.8.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3" - integrity sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM= - dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-destructuring@^6.8.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" - integrity sha1-mXux8auWf2gtKwh2/jWNYOdlxW0= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-for-of@^6.8.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" - integrity sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-function-name@^6.8.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b" - integrity sha1-g0yJhTvDaxrw86TF26qU/Y6sqos= - dependencies: - babel-helper-function-name "^6.24.1" - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-literals@^6.8.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e" - integrity sha1-T1SgLWzWbPkVKAAZox0xklN3yi4= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-modules-commonjs@^6.8.0: - version "6.26.2" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz#58a793863a9e7ca870bdc5a881117ffac27db6f3" - integrity sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q== - dependencies: - babel-plugin-transform-strict-mode "^6.24.1" - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-types "^6.26.0" - -babel-plugin-transform-es2015-object-super@^6.8.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d" - integrity sha1-JM72muIcuDp/hgPa0CH1cusnj40= - dependencies: - babel-helper-replace-supers "^6.24.1" - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-parameters@^6.8.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b" - integrity sha1-V6w1GrScrxSpfNE7CfZv3wpiXys= - dependencies: - babel-helper-call-delegate "^6.24.1" - babel-helper-get-function-arity "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-shorthand-properties@^6.8.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0" - integrity sha1-JPh11nIch2YbvZmkYi5R8U3jiqA= - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-spread@^6.8.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1" - integrity sha1-1taKmfia7cRTbIGlQujdnxdG+NE= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-template-literals@^6.8.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d" - integrity sha1-qEs0UPfp+PH2g51taH2oS7EjbY0= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es3-member-expression-literals@^6.8.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es3-member-expression-literals/-/babel-plugin-transform-es3-member-expression-literals-6.22.0.tgz#733d3444f3ecc41bef8ed1a6a4e09657b8969ebb" - integrity sha1-cz00RPPsxBvvjtGmpOCWV7iWnrs= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es3-property-literals@^6.8.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es3-property-literals/-/babel-plugin-transform-es3-property-literals-6.22.0.tgz#b2078d5842e22abf40f73e8cde9cd3711abd5758" - integrity sha1-sgeNWELiKr9A9z6M3pzTcRq9V1g= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-flow-strip-types@^6.8.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz#84cb672935d43714fdc32bce84568d87441cf7cf" - integrity sha1-hMtnKTXUNxT9wyvOhFaNh0Qc988= - dependencies: - babel-plugin-syntax-flow "^6.18.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-object-rest-spread@^6.8.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz#0f36692d50fef6b7e2d4b3ac1478137a963b7b06" - integrity sha1-DzZpLVD+9rfi1LOsFHgTepY7ewY= - dependencies: - babel-plugin-syntax-object-rest-spread "^6.8.0" - babel-runtime "^6.26.0" - -babel-plugin-transform-react-display-name@^6.8.0: - version "6.25.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-display-name/-/babel-plugin-transform-react-display-name-6.25.0.tgz#67e2bf1f1e9c93ab08db96792e05392bf2cc28d1" - integrity sha1-Z+K/Hx6ck6sI25Z5LgU5K/LMKNE= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-react-jsx@^6.8.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.24.1.tgz#840a028e7df460dfc3a2d29f0c0d91f6376e66a3" - integrity sha1-hAoCjn30YN/DotKfDA2R9jduZqM= - dependencies: - babel-helper-builder-react-jsx "^6.24.1" - babel-plugin-syntax-jsx "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-strict-mode@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" - integrity sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g= - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-preset-fbjs@^2.1.2: - version "2.3.0" - resolved "https://registry.yarnpkg.com/babel-preset-fbjs/-/babel-preset-fbjs-2.3.0.tgz#92ff81307c18b926895114f9828ae1674c097f80" - integrity sha512-ZOpAI1/bN0Y3J1ZAK9gRsFkHy9gGgJoDRUjtUCla/129LC7uViq9nIK22YdHfey8szohYoZY3f9L2lGOv0Edqw== - dependencies: - babel-plugin-check-es2015-constants "^6.8.0" - babel-plugin-syntax-class-properties "^6.8.0" - babel-plugin-syntax-flow "^6.8.0" - babel-plugin-syntax-jsx "^6.8.0" - babel-plugin-syntax-object-rest-spread "^6.8.0" - babel-plugin-syntax-trailing-function-commas "^6.8.0" - babel-plugin-transform-class-properties "^6.8.0" - babel-plugin-transform-es2015-arrow-functions "^6.8.0" - babel-plugin-transform-es2015-block-scoped-functions "^6.8.0" - babel-plugin-transform-es2015-block-scoping "^6.8.0" - babel-plugin-transform-es2015-classes "^6.8.0" - babel-plugin-transform-es2015-computed-properties "^6.8.0" - babel-plugin-transform-es2015-destructuring "^6.8.0" - babel-plugin-transform-es2015-for-of "^6.8.0" - babel-plugin-transform-es2015-function-name "^6.8.0" - babel-plugin-transform-es2015-literals "^6.8.0" - babel-plugin-transform-es2015-modules-commonjs "^6.8.0" - babel-plugin-transform-es2015-object-super "^6.8.0" - babel-plugin-transform-es2015-parameters "^6.8.0" - babel-plugin-transform-es2015-shorthand-properties "^6.8.0" - babel-plugin-transform-es2015-spread "^6.8.0" - babel-plugin-transform-es2015-template-literals "^6.8.0" - babel-plugin-transform-es3-member-expression-literals "^6.8.0" - babel-plugin-transform-es3-property-literals "^6.8.0" - babel-plugin-transform-flow-strip-types "^6.8.0" - babel-plugin-transform-object-rest-spread "^6.8.0" - babel-plugin-transform-react-display-name "^6.8.0" - babel-plugin-transform-react-jsx "^6.8.0" - -babel-preset-fbjs@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/babel-preset-fbjs/-/babel-preset-fbjs-3.0.1.tgz#0be99c39367d6fb5bbcf1f6c33be0321b5234c1c" - integrity sha512-Fc0t7v8T1tBwv5AVyDDZEnS3T7OQ97qV0XawVZg1ouarlM9xCHL994C5tU8TBIKPk3yZXG+SaEM1YQcx/yLlcg== - dependencies: - "@babel/plugin-check-constants" "^7.0.0-beta.38" - "@babel/plugin-proposal-class-properties" "^7.0.0" - "@babel/plugin-proposal-object-rest-spread" "^7.0.0" - "@babel/plugin-syntax-class-properties" "^7.0.0" - "@babel/plugin-syntax-flow" "^7.0.0" - "@babel/plugin-syntax-jsx" "^7.0.0" - "@babel/plugin-syntax-object-rest-spread" "^7.0.0" - "@babel/plugin-transform-arrow-functions" "^7.0.0" - "@babel/plugin-transform-block-scoped-functions" "^7.0.0" - "@babel/plugin-transform-block-scoping" "^7.0.0" - "@babel/plugin-transform-classes" "^7.0.0" - "@babel/plugin-transform-computed-properties" "^7.0.0" - "@babel/plugin-transform-destructuring" "^7.0.0" - "@babel/plugin-transform-flow-strip-types" "^7.0.0" - "@babel/plugin-transform-for-of" "^7.0.0" - "@babel/plugin-transform-function-name" "^7.0.0" - "@babel/plugin-transform-literals" "^7.0.0" - "@babel/plugin-transform-member-expression-literals" "^7.0.0" - "@babel/plugin-transform-modules-commonjs" "^7.0.0" - "@babel/plugin-transform-object-super" "^7.0.0" - "@babel/plugin-transform-parameters" "^7.0.0" - "@babel/plugin-transform-property-literals" "^7.0.0" - "@babel/plugin-transform-react-display-name" "^7.0.0" - "@babel/plugin-transform-react-jsx" "^7.0.0" - "@babel/plugin-transform-shorthand-properties" "^7.0.0" - "@babel/plugin-transform-spread" "^7.0.0" - "@babel/plugin-transform-template-literals" "^7.0.0" - babel-plugin-syntax-trailing-function-commas "^7.0.0-beta.0" - -babel-preset-jest@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-23.2.0.tgz#8ec7a03a138f001a1a8fb1e8113652bf1a55da46" - integrity sha1-jsegOhOPABoaj7HoETZSvxpV2kY= - dependencies: - babel-plugin-jest-hoist "^23.2.0" - babel-plugin-syntax-object-rest-spread "^6.13.0" - -babel-register@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" - integrity sha1-btAhFz4vy0htestFxgCahW9kcHE= - dependencies: - babel-core "^6.26.0" - babel-runtime "^6.26.0" - core-js "^2.5.0" - home-or-tmp "^2.0.0" - lodash "^4.17.4" - mkdirp "^0.5.1" - source-map-support "^0.4.15" - -babel-runtime@^6.22.0, babel-runtime@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" - integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= - dependencies: - core-js "^2.4.0" - regenerator-runtime "^0.11.0" - -babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" - integrity sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI= - dependencies: - babel-runtime "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - lodash "^4.17.4" - -babel-traverse@^6.0.0, babel-traverse@^6.18.0, babel-traverse@^6.24.1, babel-traverse@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" - integrity sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4= - dependencies: - babel-code-frame "^6.26.0" - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - debug "^2.6.8" - globals "^9.18.0" - invariant "^2.2.2" - lodash "^4.17.4" - -babel-types@^6.0.0, babel-types@^6.18.0, babel-types@^6.24.1, babel-types@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" - integrity sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc= - dependencies: - babel-runtime "^6.26.0" - esutils "^2.0.2" - lodash "^4.17.4" - to-fast-properties "^1.0.3" - -babylon@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" - integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== - -balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= - -base64-js@1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.1.2.tgz#d6400cac1c4c660976d90d07a04351d89395f5e8" - integrity sha1-1kAMrBxMZgl22Q0HoENR2JOV9eg= - -base64-js@^1.0.2, base64-js@^1.1.2, base64-js@^1.2.3: - version "1.3.0" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.0.tgz#cab1e6118f051095e58b5281aea8c1cd22bfc0e3" - integrity sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw== - -base@^0.11.1: - version "0.11.2" - resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" - integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== - dependencies: - cache-base "^1.0.1" - class-utils "^0.3.5" - component-emitter "^1.2.1" - define-property "^1.0.0" - isobject "^3.0.1" - mixin-deep "^1.2.0" - pascalcase "^0.1.1" - -basic-auth@~2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/basic-auth/-/basic-auth-2.0.1.tgz#b998279bf47ce38344b4f3cf916d4679bbf51e3a" - integrity sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg== - dependencies: - safe-buffer "5.1.2" - -bcrypt-pbkdf@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" - integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= - dependencies: - tweetnacl "^0.14.3" - -big-integer@^1.6.7: - version "1.6.36" - resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.36.tgz#78631076265d4ae3555c04f85e7d9d2f3a071a36" - integrity sha512-t70bfa7HYEA1D9idDbmuv7YbsbVkQ+Hp+8KFSul4aE5e/i1bjCNIRYJZlA8Q8p0r9T8cF/RVvwUgRA//FydEyg== - -bplist-creator@0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/bplist-creator/-/bplist-creator-0.0.7.tgz#37df1536092824b87c42f957b01344117372ae45" - integrity sha1-N98VNgkoJLh8QvlXsBNEEXNyrkU= - dependencies: - stream-buffers "~2.2.0" - -bplist-parser@0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/bplist-parser/-/bplist-parser-0.1.1.tgz#d60d5dcc20cba6dc7e1f299b35d3e1f95dafbae6" - integrity sha1-1g1dzCDLptx+HymbNdPh+V2vuuY= - dependencies: - big-integer "^1.6.7" - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -braces@^1.8.2: - version "1.8.5" - resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" - integrity sha1-uneWLhLf+WnWt2cR6RS3N4V79qc= - dependencies: - expand-range "^1.8.1" - preserve "^0.2.0" - repeat-element "^1.1.2" - -braces@^2.3.1: - version "2.3.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" - integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== - dependencies: - arr-flatten "^1.1.0" - array-unique "^0.3.2" - extend-shallow "^2.0.1" - fill-range "^4.0.0" - isobject "^3.0.1" - repeat-element "^1.1.2" - snapdragon "^0.8.1" - snapdragon-node "^2.0.1" - split-string "^3.0.2" - to-regex "^3.0.1" - -browser-process-hrtime@^0.1.2: - version "0.1.3" - resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-0.1.3.tgz#616f00faef1df7ec1b5bf9cfe2bdc3170f26c7b4" - integrity sha512-bRFnI4NnjO6cnyLmOV/7PVoDEMJChlcfN0z4s1YMBY989/SvlfMI1lgCnkFUs53e9gQF+w7qu7XdllSTiSl8Aw== - -browser-resolve@^1.11.3: - version "1.11.3" - resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.3.tgz#9b7cbb3d0f510e4cb86bdbd796124d28b5890af6" - integrity sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ== - dependencies: - resolve "1.1.7" - -bser@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719" - integrity sha1-mseNPtXZFYBP2HrLFYvHlxR6Fxk= - dependencies: - node-int64 "^0.4.0" - -buffer-from@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" - integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== - -buffer@^5.0.3: - version "5.2.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.2.1.tgz#dd57fa0f109ac59c602479044dca7b8b3d0b71d6" - integrity sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg== - dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" - -builtin-modules@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" - integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= - -bytes@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" - integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg= - -cache-base@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" - integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== - dependencies: - collection-visit "^1.0.0" - component-emitter "^1.2.1" - get-value "^2.0.6" - has-value "^1.0.0" - isobject "^3.0.1" - set-value "^2.0.0" - to-object-path "^0.3.0" - union-value "^1.0.0" - unset-value "^1.0.0" - -callsites@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" - integrity sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA= - -camelcase@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" - integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= - -capture-exit@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-1.2.0.tgz#1c5fcc489fd0ab00d4f1ac7ae1072e3173fbab6f" - integrity sha1-HF/MSJ/QqwDU8ax64QcuMXP7q28= - dependencies: - rsvp "^3.3.3" - -caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= - -chalk@^1.1.1, chalk@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= - dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" - -chalk@^2.0.0, chalk@^2.0.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" - integrity sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chardet@^0.4.0: - version "0.4.2" - resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2" - integrity sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I= - -chownr@^1.0.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.1.tgz#54726b8b8fff4df053c42187e801fb4412df1494" - integrity sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g== - -ci-info@^1.5.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.6.0.tgz#2ca20dbb9ceb32d4524a683303313f0304b1e497" - integrity sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A== - -class-utils@^0.3.5: - version "0.3.6" - resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" - integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== - dependencies: - arr-union "^3.1.0" - define-property "^0.2.5" - isobject "^3.0.0" - static-extend "^0.1.1" - -cli-cursor@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" - integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= - dependencies: - restore-cursor "^2.0.0" - -cli-width@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" - integrity sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk= - -cliui@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" - integrity sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0= - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - wrap-ansi "^2.0.0" - -cliui@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49" - integrity sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ== - dependencies: - string-width "^2.1.1" - strip-ansi "^4.0.0" - wrap-ansi "^2.0.0" - -co@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= - -code-point-at@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" - integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= - -collection-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" - integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= - dependencies: - map-visit "^1.0.0" - object-visit "^1.0.0" - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= - -color-support@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" - integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== - -combined-stream@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818" - integrity sha1-cj599ugBrFYTETp+RFqbactjKBg= - dependencies: - delayed-stream "~1.0.0" - -combined-stream@~1.0.6: - version "1.0.7" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.7.tgz#2d1d24317afb8abe95d6d2c0b07b57813539d828" - integrity sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w== - dependencies: - delayed-stream "~1.0.0" - -commander@^2.9.0: - version "2.19.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" - integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg== - -commander@~2.13.0: - version "2.13.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c" - integrity sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA== - -commander@~2.17.1: - version "2.17.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" - integrity sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg== - -commondir@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" - integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= - -component-emitter@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" - integrity sha1-E3kY1teCg/ffemt8WmPhQOaUJeY= - -compressible@~2.0.14: - version "2.0.15" - resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.15.tgz#857a9ab0a7e5a07d8d837ed43fe2defff64fe212" - integrity sha512-4aE67DL33dSW9gw4CI2H/yTxqHLNcxp0yS6jB+4h+wr3e43+1z7vm0HU9qXOH8j+qjKuL8+UtkOxYQSMq60Ylw== - dependencies: - mime-db ">= 1.36.0 < 2" - -compression@^1.7.1: - version "1.7.3" - resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.3.tgz#27e0e176aaf260f7f2c2813c3e440adb9f1993db" - integrity sha512-HSjyBG5N1Nnz7tF2+O7A9XUhyjru71/fwgNb7oIsEVHR0WShfs2tIS/EySLgiTe98aOK18YDlMXpzjCXY/n9mg== - dependencies: - accepts "~1.3.5" - bytes "3.0.0" - compressible "~2.0.14" - debug "2.6.9" - on-headers "~1.0.1" - safe-buffer "5.1.2" - vary "~1.1.2" - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= - -concat-stream@^1.6.0: - version "1.6.2" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" - integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== - dependencies: - buffer-from "^1.0.0" - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - -connect@^3.6.5: - version "3.6.6" - resolved "https://registry.yarnpkg.com/connect/-/connect-3.6.6.tgz#09eff6c55af7236e137135a72574858b6786f524" - integrity sha1-Ce/2xVr3I24TcTWnJXSFi2eG9SQ= - dependencies: - debug "2.6.9" - finalhandler "1.1.0" - parseurl "~1.3.2" - utils-merge "1.0.1" - -console-control-strings@^1.0.0, console-control-strings@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" - integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= - -convert-source-map@^1.1.0, convert-source-map@^1.4.0, convert-source-map@^1.5.1: - version "1.6.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20" - integrity sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A== - dependencies: - safe-buffer "~5.1.1" - -copy-descriptor@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" - integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= - -core-js@^1.0.0: - version "1.2.7" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" - integrity sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY= - -core-js@^2.2.2, core-js@^2.4.0, core-js@^2.4.1, core-js@^2.5.0, core-js@^2.5.7: - version "2.5.7" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e" - integrity sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw== - -core-util-is@1.0.2, core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= - -cosmiconfig@^5.0.5: - version "5.0.6" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.0.6.tgz#dca6cf680a0bd03589aff684700858c81abeeb39" - integrity sha512-6DWfizHriCrFWURP1/qyhsiFvYdlJzbCzmtFWh744+KyWsJo5+kPzUZZaMRSSItoYc0pxFX7gEO7ZC1/gN/7AQ== - dependencies: - is-directory "^0.3.1" - js-yaml "^3.9.0" - parse-json "^4.0.0" - -create-react-class@^15.6.3: - version "15.6.3" - resolved "https://registry.yarnpkg.com/create-react-class/-/create-react-class-15.6.3.tgz#2d73237fb3f970ae6ebe011a9e66f46dbca80036" - integrity sha512-M+/3Q6E6DLO6Yx3OwrWjwHBnvfXXYA7W+dFjt/ZDBemHO1DDZhsalX/NUtnTYclN6GfnBDRh4qRHjcDHmlJBJg== - dependencies: - fbjs "^0.8.9" - loose-envify "^1.3.1" - object-assign "^4.1.1" - -cross-spawn@^5.0.1, cross-spawn@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" - integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= - dependencies: - lru-cache "^4.0.1" - shebang-command "^1.2.0" - which "^1.2.9" - -css-color-keywords@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/css-color-keywords/-/css-color-keywords-1.0.0.tgz#fea2616dc676b2962686b3af8dbdbe180b244e05" - integrity sha1-/qJhbcZ2spYmhrOvjb2+GAskTgU= - -css-to-react-native@^2.0.3: - version "2.2.2" - resolved "https://registry.yarnpkg.com/css-to-react-native/-/css-to-react-native-2.2.2.tgz#c077d0f7bf3e6c915a539e7325821c9dd01f9965" - integrity sha512-w99Fzop1FO8XKm0VpbQp3y5mnTnaS+rtCvS+ylSEOK76YXO5zoHQx/QMB1N54Cp+Ya9jB9922EHrh14ld4xmmw== - dependencies: - css-color-keywords "^1.0.0" - fbjs "^0.8.5" - postcss-value-parser "^3.3.0" - -cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": - version "0.3.4" - resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.4.tgz#8cd52e8a3acfd68d3aed38ee0a640177d2f9d797" - integrity sha512-+7prCSORpXNeR4/fUP3rL+TzqtiFfhMvTd7uEqMdgPvLPt4+uzFUeufx5RHjGTACCargg/DiEt/moMQmvnfkog== - -cssstyle@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-1.1.1.tgz#18b038a9c44d65f7a8e428a653b9f6fe42faf5fb" - integrity sha512-364AI1l/M5TYcFH83JnOH/pSqgaNnKmYgKrm0didZMGKWjQB60dymwWy1rKUgL3J1ffdq9xVi2yGLHdSjjSNog== - dependencies: - cssom "0.3.x" - -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= - dependencies: - assert-plus "^1.0.0" - -data-urls@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-1.0.1.tgz#d416ac3896918f29ca84d81085bc3705834da579" - integrity sha512-0HdcMZzK6ubMUnsMmQmG0AcLQPvbvb47R0+7CCZQCYgcd8OUWG91CG7sM6GoXgjz+WLl4ArFzHtBMy/QqSF4eg== - dependencies: - abab "^2.0.0" - whatwg-mimetype "^2.1.0" - whatwg-url "^7.0.0" - -debug@2.6.9, debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -debug@^3.1.0: - version "3.2.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" - integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== - dependencies: - ms "^2.1.1" - -decamelize@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= - -decode-uri-component@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" - integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= - -deep-extend@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" - integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== - -deep-is@~0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" - integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= - -default-require-extensions@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-1.0.0.tgz#f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8" - integrity sha1-836hXT4T/9m0N9M+GnW1+5eHTLg= - dependencies: - strip-bom "^2.0.0" - -define-properties@^1.1.2: - version "1.1.3" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" - integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== - dependencies: - object-keys "^1.0.12" - -define-property@^0.2.5: - version "0.2.5" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" - integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= - dependencies: - is-descriptor "^0.1.0" - -define-property@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" - integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= - dependencies: - is-descriptor "^1.0.0" - -define-property@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" - integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== - dependencies: - is-descriptor "^1.0.2" - isobject "^3.0.1" - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= - -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" - integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= - -denodeify@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/denodeify/-/denodeify-1.2.1.tgz#3a36287f5034e699e7577901052c2e6c94251631" - integrity sha1-OjYof1A05pnnV3kBBSwubJQlFjE= - -depd@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" - integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= - -destroy@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" - integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= - -detect-indent@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" - integrity sha1-920GQ1LN9Docts5hnE7jqUdd4gg= - dependencies: - repeating "^2.0.0" - -detect-libc@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" - integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= - -detect-newline@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" - integrity sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I= - -diff@^3.2.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" - integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== - -dom-walk@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.1.tgz#672226dc74c8f799ad35307df936aba11acd6018" - integrity sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg= - -domexception@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90" - integrity sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug== - dependencies: - webidl-conversions "^4.0.2" - -ecc-jsbn@~0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" - integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= - dependencies: - jsbn "~0.1.0" - safer-buffer "^2.1.0" - -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= - -encodeurl@~1.0.1, encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= - -encoding@^0.1.11: - version "0.1.12" - resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" - integrity sha1-U4tm8+5izRq1HsMjgp0flIDHS+s= - dependencies: - iconv-lite "~0.4.13" - -envinfo@^5.7.0: - version "5.10.0" - resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-5.10.0.tgz#503a9774ae15b93ea68bdfae2ccd6306624ea6df" - integrity sha512-rXbzXWvnQxy+TcqZlARbWVQwgGVVouVJgFZhLVN5htjLxl1thstrP2ZGi0pXC309AbK7gVOPU+ulz/tmpCI7iw== - -error-ex@^1.2.0, error-ex@^1.3.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - dependencies: - is-arrayish "^0.2.1" - -errorhandler@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/errorhandler/-/errorhandler-1.5.0.tgz#eaba64ca5d542a311ac945f582defc336165d9f4" - integrity sha1-6rpkyl1UKjEayUX1gt78M2Fl2fQ= - dependencies: - accepts "~1.3.3" - escape-html "~1.0.3" - -es-abstract@^1.5.1: - version "1.12.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.12.0.tgz#9dbbdd27c6856f0001421ca18782d786bf8a6165" - integrity sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA== - dependencies: - es-to-primitive "^1.1.1" - function-bind "^1.1.1" - has "^1.0.1" - is-callable "^1.1.3" - is-regex "^1.0.4" - -es-to-primitive@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.0.tgz#edf72478033456e8dda8ef09e00ad9650707f377" - integrity sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg== - dependencies: - is-callable "^1.1.4" - is-date-object "^1.0.1" - is-symbol "^1.0.2" - -escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= - -escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= - -escodegen@^1.9.1: - version "1.11.0" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.11.0.tgz#b27a9389481d5bfd5bec76f7bb1eb3f8f4556589" - integrity sha512-IeMV45ReixHS53K/OmfKAIztN/igDHzTJUhZM3k1jMhIZWjk45SMwAtBsEXiJp3vSPmTcu6CXn7mDvFHRN66fw== - dependencies: - esprima "^3.1.3" - estraverse "^4.2.0" - esutils "^2.0.2" - optionator "^0.8.1" - optionalDependencies: - source-map "~0.6.1" - -esprima@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" - integrity sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM= - -esprima@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -estraverse@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" - integrity sha1-De4/7TH81GlhjOc0IJn8GvoL2xM= - -esutils@^2.0.0, esutils@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" - integrity sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs= - -etag@~1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= - -event-target-shim@^1.0.5: - version "1.1.1" - resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-1.1.1.tgz#a86e5ee6bdaa16054475da797ccddf0c55698491" - integrity sha1-qG5e5r2qFgVEddp5fM3fDFVphJE= - -eventemitter3@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.0.tgz#090b4d6cdbd645ed10bf750d4b5407942d7ba163" - integrity sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA== - -exec-sh@^0.2.0: - version "0.2.2" - resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.2.tgz#2a5e7ffcbd7d0ba2755bdecb16e5a427dfbdec36" - integrity sha512-FIUCJz1RbuS0FKTdaAafAByGS0CPvU3R0MeHxgtl+djzCc//F8HakL8GzmVNZanasTbTAY/3DRFA0KpVqj/eAw== - dependencies: - merge "^1.2.0" - -execa@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" - integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= - dependencies: - cross-spawn "^5.0.1" - get-stream "^3.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - -exit@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" - integrity sha1-BjJjj42HfMghB9MKD/8aF8uhzQw= - -expand-brackets@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" - integrity sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s= - dependencies: - is-posix-bracket "^0.1.0" - -expand-brackets@^2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" - integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= - dependencies: - debug "^2.3.3" - define-property "^0.2.5" - extend-shallow "^2.0.1" - posix-character-classes "^0.1.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -expand-range@^1.8.1: - version "1.8.2" - resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" - integrity sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc= - dependencies: - fill-range "^2.1.0" - -expect@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/expect/-/expect-23.6.0.tgz#1e0c8d3ba9a581c87bd71fb9bc8862d443425f98" - integrity sha512-dgSoOHgmtn/aDGRVFWclQyPDKl2CQRq0hmIEoUAuQs/2rn2NcvCWcSCovm6BLeuB/7EZuLGu2QfnR+qRt5OM4w== - dependencies: - ansi-styles "^3.2.0" - jest-diff "^23.6.0" - jest-get-type "^22.1.0" - jest-matcher-utils "^23.6.0" - jest-message-util "^23.4.0" - jest-regex-util "^23.3.0" - -extend-shallow@^1.1.2: - version "1.1.4" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-1.1.4.tgz#19d6bf94dfc09d76ba711f39b872d21ff4dd9071" - integrity sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE= - dependencies: - kind-of "^1.1.0" - -extend-shallow@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" - integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= - dependencies: - is-extendable "^0.1.0" - -extend-shallow@^3.0.0, extend-shallow@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" - integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= - dependencies: - assign-symbols "^1.0.0" - is-extendable "^1.0.1" - -extend@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" - integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - -external-editor@^2.0.4: - version "2.2.0" - resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.2.0.tgz#045511cfd8d133f3846673d1047c154e214ad3d5" - integrity sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A== - dependencies: - chardet "^0.4.0" - iconv-lite "^0.4.17" - tmp "^0.0.33" - -extglob@^0.3.1: - version "0.3.2" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" - integrity sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE= - dependencies: - is-extglob "^1.0.0" - -extglob@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" - integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== - dependencies: - array-unique "^0.3.2" - define-property "^1.0.0" - expand-brackets "^2.1.4" - extend-shallow "^2.0.1" - fragment-cache "^0.2.1" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -extsprintf@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" - integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= - -extsprintf@^1.2.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" - integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= - -fancy-log@^1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.2.tgz#f41125e3d84f2e7d89a43d06d958c8f78be16be1" - integrity sha1-9BEl49hPLn2JpD0G2VjI94vha+E= - dependencies: - ansi-gray "^0.1.1" - color-support "^1.1.3" - time-stamp "^1.0.0" - -fast-deep-equal@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614" - integrity sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ= - -fast-json-stable-stringify@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" - integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I= - -fast-levenshtein@~2.0.4: - version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= - -fb-watchman@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.0.tgz#54e9abf7dfa2f26cd9b1636c588c1afc05de5d58" - integrity sha1-VOmr99+i8mzZsWNsWIwa/AXeXVg= - dependencies: - bser "^2.0.0" - -fbjs-css-vars@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/fbjs-css-vars/-/fbjs-css-vars-1.0.1.tgz#836d876e887d702f45610f5ebd2fbeef649527fc" - integrity sha512-IM+v/C40MNZWqsLErc32e0TyIk/NhkkQZL0QmjBh6zi1eXv0/GeVKmKmueQX7nn9SXQBQbTUcB8zuexIF3/88w== - -fbjs-scripts@^0.8.1: - version "0.8.3" - resolved "https://registry.yarnpkg.com/fbjs-scripts/-/fbjs-scripts-0.8.3.tgz#b854de7a11e62a37f72dab9aaf4d9b53c4a03174" - integrity sha512-aUJ/uEzMIiBYuj/blLp4sVNkQQ7ZEB/lyplG1IzzOmZ83meiWecrGg5jBo4wWrxXmO4RExdtsSV1QkTjPt2Gag== - dependencies: - ansi-colors "^1.0.1" - babel-core "^6.7.2" - babel-preset-fbjs "^2.1.2" - core-js "^2.4.1" - cross-spawn "^5.1.0" - fancy-log "^1.3.2" - object-assign "^4.0.1" - plugin-error "^0.1.2" - semver "^5.1.0" - through2 "^2.0.0" - -fbjs@0.8.17, fbjs@^0.8.16, fbjs@^0.8.5, fbjs@^0.8.9: - version "0.8.17" - resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.17.tgz#c4d598ead6949112653d6588b01a5cdcd9f90fdd" - integrity sha1-xNWY6taUkRJlPWWIsBpc3Nn5D90= - dependencies: - core-js "^1.0.0" - isomorphic-fetch "^2.1.1" - loose-envify "^1.0.0" - object-assign "^4.1.0" - promise "^7.1.1" - setimmediate "^1.0.5" - ua-parser-js "^0.7.18" - -fbjs@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-1.0.0.tgz#52c215e0883a3c86af2a7a776ed51525ae8e0a5a" - integrity sha512-MUgcMEJaFhCaF1QtWGnmq9ZDRAzECTCRAF7O6UZIlAlkTs1SasiX9aP0Iw7wfD2mJ7wDTNfg2w7u5fSCwJk1OA== - dependencies: - core-js "^2.4.1" - fbjs-css-vars "^1.0.0" - isomorphic-fetch "^2.1.1" - loose-envify "^1.0.0" - object-assign "^4.1.0" - promise "^7.1.1" - setimmediate "^1.0.5" - ua-parser-js "^0.7.18" - -figures@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" - integrity sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI= - dependencies: - escape-string-regexp "^1.0.5" - -filename-regex@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" - integrity sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY= - -fileset@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/fileset/-/fileset-2.0.3.tgz#8e7548a96d3cc2327ee5e674168723a333bba2a0" - integrity sha1-jnVIqW08wjJ+5eZ0FocjozO7oqA= - dependencies: - glob "^7.0.3" - minimatch "^3.0.3" - -fill-range@^2.1.0: - version "2.2.4" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565" - integrity sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q== - dependencies: - is-number "^2.1.0" - isobject "^2.0.0" - randomatic "^3.0.0" - repeat-element "^1.1.2" - repeat-string "^1.5.2" - -fill-range@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" - integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= - dependencies: - extend-shallow "^2.0.1" - is-number "^3.0.0" - repeat-string "^1.6.1" - to-regex-range "^2.1.0" - -finalhandler@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.0.tgz#ce0b6855b45853e791b2fcc680046d88253dd7f5" - integrity sha1-zgtoVbRYU+eRsvzGgARtiCU91/U= - dependencies: - debug "2.6.9" - encodeurl "~1.0.1" - escape-html "~1.0.3" - on-finished "~2.3.0" - parseurl "~1.3.2" - statuses "~1.3.1" - unpipe "~1.0.0" - -find-cache-dir@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-1.0.0.tgz#9288e3e9e3cc3748717d39eade17cf71fc30ee6f" - integrity sha1-kojj6ePMN0hxfTnq3hfPcfww7m8= - dependencies: - commondir "^1.0.1" - make-dir "^1.0.0" - pkg-dir "^2.0.0" - -find-up@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" - integrity sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= - dependencies: - path-exists "^2.0.0" - pinkie-promise "^2.0.0" - -find-up@^2.0.0, find-up@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" - integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= - dependencies: - locate-path "^2.0.0" - -for-in@^1.0.1, for-in@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" - integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= - -for-own@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" - integrity sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4= - dependencies: - for-in "^1.0.1" - -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= - -form-data@~2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.2.tgz#4970498be604c20c005d4f5c23aecd21d6b49099" - integrity sha1-SXBJi+YEwgwAXU9cI67NIda0kJk= - dependencies: - asynckit "^0.4.0" - combined-stream "1.0.6" - mime-types "^2.1.12" - -fragment-cache@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" - integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= - dependencies: - map-cache "^0.2.2" - -fresh@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= - -fs-extra@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-1.0.0.tgz#cd3ce5f7e7cb6145883fcae3191e9877f8587950" - integrity sha1-zTzl9+fLYUWIP8rjGR6Yd/hYeVA= - dependencies: - graceful-fs "^4.1.2" - jsonfile "^2.1.0" - klaw "^1.0.0" - -fs-minipass@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d" - integrity sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ== - dependencies: - minipass "^2.2.1" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= - -fsevents@^1.2.3: - version "1.2.4" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.4.tgz#f41dcb1af2582af3692da36fc55cbd8e1041c426" - integrity sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg== - dependencies: - nan "^2.9.2" - node-pre-gyp "^0.10.0" - -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - -gauge@~1.2.5: - version "1.2.7" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-1.2.7.tgz#e9cec5483d3d4ee0ef44b60a7d99e4935e136d93" - integrity sha1-6c7FSD09TuDvRLYKfZnkk14TbZM= - dependencies: - ansi "^0.3.0" - has-unicode "^2.0.0" - lodash.pad "^4.1.0" - lodash.padend "^4.1.0" - lodash.padstart "^4.1.0" - -gauge@~2.7.3: - version "2.7.4" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" - integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= - dependencies: - aproba "^1.0.3" - console-control-strings "^1.0.0" - has-unicode "^2.0.0" - object-assign "^4.1.0" - signal-exit "^3.0.0" - string-width "^1.0.1" - strip-ansi "^3.0.1" - wide-align "^1.1.0" - -get-caller-file@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" - integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== - -get-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" - integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= - -get-value@^2.0.3, get-value@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" - integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= - -getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= - dependencies: - assert-plus "^1.0.0" - -glob-base@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" - integrity sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q= - dependencies: - glob-parent "^2.0.0" - is-glob "^2.0.0" - -glob-parent@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" - integrity sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg= - dependencies: - is-glob "^2.0.0" - -glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2: - version "7.1.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" - integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -global@^4.3.0: - version "4.3.2" - resolved "https://registry.yarnpkg.com/global/-/global-4.3.2.tgz#e76989268a6c74c38908b1305b10fc0e394e9d0f" - integrity sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8= - dependencies: - min-document "^2.19.0" - process "~0.5.1" - -globals@^11.1.0: - version "11.8.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.8.0.tgz#c1ef45ee9bed6badf0663c5cb90e8d1adec1321d" - integrity sha512-io6LkyPVuzCHBSQV9fmOwxZkUk6nIaGmxheLDgmuFv89j0fm2aqDbIXKAGfzCMHqz3HLF2Zf8WSG6VqMh2qFmA== - -globals@^9.18.0: - version "9.18.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" - integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ== - -graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.3, graceful-fs@^4.1.6, graceful-fs@^4.1.9: - version "4.1.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" - integrity sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg= - -growly@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" - integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= - -handlebars@^4.0.3: - version "4.0.12" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.12.tgz#2c15c8a96d46da5e266700518ba8cb8d919d5bc5" - integrity sha512-RhmTekP+FZL+XNhwS1Wf+bTTZpdLougwt5pcgA1tuz6Jcx0fpH/7z0qd71RKnZHBCxIRBHfBOnio4gViPemNzA== - dependencies: - async "^2.5.0" - optimist "^0.6.1" - source-map "^0.6.1" - optionalDependencies: - uglify-js "^3.1.4" - -har-schema@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" - integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= - -har-validator@~5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.0.tgz#44657f5688a22cfd4b72486e81b3a3fb11742c29" - integrity sha512-+qnmNjI4OfH2ipQ9VQOw23bBd/ibtfbVdK2fYbY4acTDqKTW/YDp9McimZdDbG8iV9fZizUqQMD5xvriB146TA== - dependencies: - ajv "^5.3.0" - har-schema "^2.0.0" - -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= - dependencies: - ansi-regex "^2.0.0" - -has-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" - integrity sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo= - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= - -has-symbols@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44" - integrity sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q= - -has-unicode@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" - integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= - -has-value@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" - integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= - dependencies: - get-value "^2.0.3" - has-values "^0.1.4" - isobject "^2.0.0" - -has-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" - integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= - dependencies: - get-value "^2.0.6" - has-values "^1.0.0" - isobject "^3.0.0" - -has-values@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" - integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= - -has-values@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" - integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= - dependencies: - is-number "^3.0.0" - kind-of "^4.0.0" - -has@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - -hoist-non-react-statics@^2.5.0: - version "2.5.5" - resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz#c5903cf409c0dfd908f388e619d86b9c1174cb47" - integrity sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw== - -home-or-tmp@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" - integrity sha1-42w/LSyufXRqhX440Y1fMqeILbg= - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.1" - -home-or-tmp@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-3.0.0.tgz#57a8fe24cf33cdd524860a15821ddc25c86671fb" - integrity sha1-V6j+JM8zzdUkhgoVgh3cJchmcfs= - -hosted-git-info@^2.1.4: - version "2.7.1" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" - integrity sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w== - -html-encoding-sniffer@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz#e70d84b94da53aa375e11fe3a351be6642ca46f8" - integrity sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw== - dependencies: - whatwg-encoding "^1.0.1" - -http-errors@~1.6.2: - version "1.6.3" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" - integrity sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0= - dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.0" - statuses ">= 1.4.0 < 2" - -http-signature@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" - integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= - dependencies: - assert-plus "^1.0.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - -iconv-lite@0.4.24, iconv-lite@^0.4.17, iconv-lite@^0.4.4, iconv-lite@~0.4.13: - version "0.4.24" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - -ieee754@^1.1.4: - version "1.1.12" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.12.tgz#50bf24e5b9c8bb98af4964c941cdb0918da7b60b" - integrity sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA== - -ignore-walk@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8" - integrity sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ== - dependencies: - minimatch "^3.0.4" - -image-size@^0.6.0: - version "0.6.3" - resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.6.3.tgz#e7e5c65bb534bd7cdcedd6cb5166272a85f75fb2" - integrity sha512-47xSUiQioGaB96nqtp5/q55m0aBQSQdyIloMOc/x+QVTDZLNmXE892IIDrJ0hM1A5vcNUDD5tDffkSP5lCaIIA== - -import-local@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-1.0.0.tgz#5e4ffdc03f4fe6c009c6729beb29631c2f8227bc" - integrity sha512-vAaZHieK9qjGo58agRBg+bhHX3hoTZU/Oa3GESWLz7t1U62fk63aHuDJJEteXoDeTCcPmUT+z38gkHPZkkmpmQ== - dependencies: - pkg-dir "^2.0.0" - resolve-cwd "^2.0.0" - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@2.0.3, inherits@^2.0.3, inherits@~2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= - -ini@~1.3.0: - version "1.3.5" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" - integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== - -inquirer@^3.0.6: - version "3.3.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9" - integrity sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ== - dependencies: - ansi-escapes "^3.0.0" - chalk "^2.0.0" - cli-cursor "^2.1.0" - cli-width "^2.0.0" - external-editor "^2.0.4" - figures "^2.0.0" - lodash "^4.3.0" - mute-stream "0.0.7" - run-async "^2.2.0" - rx-lite "^4.0.8" - rx-lite-aggregates "^4.0.8" - string-width "^2.1.0" - strip-ansi "^4.0.0" - through "^2.3.6" - -invariant@^2.2.2, invariant@^2.2.4: - version "2.2.4" - resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" - integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== - dependencies: - loose-envify "^1.0.0" - -invert-kv@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" - integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= - -is-accessor-descriptor@^0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" - integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= - dependencies: - kind-of "^3.0.2" - -is-accessor-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" - integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== - dependencies: - kind-of "^6.0.0" - -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= - -is-buffer@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" - integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== - -is-builtin-module@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" - integrity sha1-VAVy0096wxGfj3bDDLwbHgN6/74= - dependencies: - builtin-modules "^1.0.0" - -is-callable@^1.1.3, is-callable@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75" - integrity sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA== - -is-ci@^1.0.10: - version "1.2.1" - resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.2.1.tgz#e3779c8ee17fccf428488f6e281187f2e632841c" - integrity sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg== - dependencies: - ci-info "^1.5.0" - -is-data-descriptor@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" - integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= - dependencies: - kind-of "^3.0.2" - -is-data-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" - integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== - dependencies: - kind-of "^6.0.0" - -is-date-object@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" - integrity sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY= - -is-descriptor@^0.1.0: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" - integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== - dependencies: - is-accessor-descriptor "^0.1.6" - is-data-descriptor "^0.1.4" - kind-of "^5.0.0" - -is-descriptor@^1.0.0, is-descriptor@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" - integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== - dependencies: - is-accessor-descriptor "^1.0.0" - is-data-descriptor "^1.0.0" - kind-of "^6.0.2" - -is-directory@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" - integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE= - -is-dotfile@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" - integrity sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE= - -is-equal-shallow@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" - integrity sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ= - dependencies: - is-primitive "^2.0.0" - -is-extendable@^0.1.0, is-extendable@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" - integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= - -is-extendable@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" - integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== - dependencies: - is-plain-object "^2.0.4" - -is-extglob@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" - integrity sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA= - -is-finite@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" - integrity sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko= - dependencies: - number-is-nan "^1.0.0" - -is-fullwidth-code-point@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" - integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= - dependencies: - number-is-nan "^1.0.0" - -is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= - -is-generator-fn@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-1.0.0.tgz#969d49e1bb3329f6bb7f09089be26578b2ddd46a" - integrity sha1-lp1J4bszKfa7fwkIm+JleLLd1Go= - -is-glob@^2.0.0, is-glob@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" - integrity sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM= - dependencies: - is-extglob "^1.0.0" - -is-number@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" - integrity sha1-Afy7s5NGOlSPL0ZszhbezknbkI8= - dependencies: - kind-of "^3.0.2" - -is-number@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" - integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= - dependencies: - kind-of "^3.0.2" - -is-number@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" - integrity sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ== - -is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" - integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== - dependencies: - isobject "^3.0.1" - -is-posix-bracket@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" - integrity sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q= - -is-primitive@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" - integrity sha1-IHurkWOEmcB7Kt8kCkGochADRXU= - -is-promise@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" - integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o= - -is-regex@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" - integrity sha1-VRdIm1RwkbCTDglWVM7SXul+lJE= - dependencies: - has "^1.0.1" - -is-stream@^1.0.1, is-stream@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" - integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= - -is-symbol@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.2.tgz#a055f6ae57192caee329e7a860118b497a950f38" - integrity sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw== - dependencies: - has-symbols "^1.0.0" - -is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= - -is-utf8@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" - integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= - -is-windows@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" - integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== - -isarray@1.0.0, isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= - -isobject@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" - integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= - dependencies: - isarray "1.0.0" - -isobject@^3.0.0, isobject@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" - integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= - -isomorphic-fetch@^2.1.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" - integrity sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk= - dependencies: - node-fetch "^1.0.1" - whatwg-fetch ">=0.10.0" - -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= - -istanbul-api@^1.3.1: - version "1.3.7" - resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.3.7.tgz#a86c770d2b03e11e3f778cd7aedd82d2722092aa" - integrity sha512-4/ApBnMVeEPG3EkSzcw25wDe4N66wxwn+KKn6b47vyek8Xb3NBAcg4xfuQbS7BqcZuTX4wxfD5lVagdggR3gyA== - dependencies: - async "^2.1.4" - fileset "^2.0.2" - istanbul-lib-coverage "^1.2.1" - istanbul-lib-hook "^1.2.2" - istanbul-lib-instrument "^1.10.2" - istanbul-lib-report "^1.1.5" - istanbul-lib-source-maps "^1.2.6" - istanbul-reports "^1.5.1" - js-yaml "^3.7.0" - mkdirp "^0.5.1" - once "^1.4.0" - -istanbul-lib-coverage@^1.2.0, istanbul-lib-coverage@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz#ccf7edcd0a0bb9b8f729feeb0930470f9af664f0" - integrity sha512-PzITeunAgyGbtY1ibVIUiV679EFChHjoMNRibEIobvmrCRaIgwLxNucOSimtNWUhEib/oO7QY2imD75JVgCJWQ== - -istanbul-lib-hook@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.2.2.tgz#bc6bf07f12a641fbf1c85391d0daa8f0aea6bf86" - integrity sha512-/Jmq7Y1VeHnZEQ3TL10VHyb564mn6VrQXHchON9Jf/AEcmQ3ZIiyD1BVzNOKTZf/G3gE+kiGK6SmpF9y3qGPLw== - dependencies: - append-transform "^0.4.0" - -istanbul-lib-instrument@^1.10.1, istanbul-lib-instrument@^1.10.2: - version "1.10.2" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.2.tgz#1f55ed10ac3c47f2bdddd5307935126754d0a9ca" - integrity sha512-aWHxfxDqvh/ZlxR8BBaEPVSWDPUkGD63VjGQn3jcw8jCp7sHEMKcrj4xfJn/ABzdMEHiQNyvDQhqm5o8+SQg7A== - dependencies: - babel-generator "^6.18.0" - babel-template "^6.16.0" - babel-traverse "^6.18.0" - babel-types "^6.18.0" - babylon "^6.18.0" - istanbul-lib-coverage "^1.2.1" - semver "^5.3.0" - -istanbul-lib-report@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.5.tgz#f2a657fc6282f96170aaf281eb30a458f7f4170c" - integrity sha512-UsYfRMoi6QO/doUshYNqcKJqVmFe9w51GZz8BS3WB0lYxAllQYklka2wP9+dGZeHYaWIdcXUx8JGdbqaoXRXzw== - dependencies: - istanbul-lib-coverage "^1.2.1" - mkdirp "^0.5.1" - path-parse "^1.0.5" - supports-color "^3.1.2" - -istanbul-lib-source-maps@^1.2.4, istanbul-lib-source-maps@^1.2.6: - version "1.2.6" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.6.tgz#37b9ff661580f8fca11232752ee42e08c6675d8f" - integrity sha512-TtbsY5GIHgbMsMiRw35YBHGpZ1DVFEO19vxxeiDMYaeOFOCzfnYVxvl6pOUIZR4dtPhAGpSMup8OyF8ubsaqEg== - dependencies: - debug "^3.1.0" - istanbul-lib-coverage "^1.2.1" - mkdirp "^0.5.1" - rimraf "^2.6.1" - source-map "^0.5.3" - -istanbul-reports@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.5.1.tgz#97e4dbf3b515e8c484caea15d6524eebd3ff4e1a" - integrity sha512-+cfoZ0UXzWjhAdzosCPP3AN8vvef8XDkWtTfgaN+7L3YTpNYITnCaEkceo5SEYy644VkHka/P1FvkWvrG/rrJw== - dependencies: - handlebars "^4.0.3" - -jest-changed-files@^23.4.2: - version "23.4.2" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-23.4.2.tgz#1eed688370cd5eebafe4ae93d34bb3b64968fe83" - integrity sha512-EyNhTAUWEfwnK0Is/09LxoqNDOn7mU7S3EHskG52djOFS/z+IT0jT3h3Ql61+dklcG7bJJitIWEMB4Sp1piHmA== - dependencies: - throat "^4.0.0" - -jest-cli@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-23.6.0.tgz#61ab917744338f443ef2baa282ddffdd658a5da4" - integrity sha512-hgeD1zRUp1E1zsiyOXjEn4LzRLWdJBV//ukAHGlx6s5mfCNJTbhbHjgxnDUXA8fsKWN/HqFFF6X5XcCwC/IvYQ== - dependencies: - ansi-escapes "^3.0.0" - chalk "^2.0.1" - exit "^0.1.2" - glob "^7.1.2" - graceful-fs "^4.1.11" - import-local "^1.0.0" - is-ci "^1.0.10" - istanbul-api "^1.3.1" - istanbul-lib-coverage "^1.2.0" - istanbul-lib-instrument "^1.10.1" - istanbul-lib-source-maps "^1.2.4" - jest-changed-files "^23.4.2" - jest-config "^23.6.0" - jest-environment-jsdom "^23.4.0" - jest-get-type "^22.1.0" - jest-haste-map "^23.6.0" - jest-message-util "^23.4.0" - jest-regex-util "^23.3.0" - jest-resolve-dependencies "^23.6.0" - jest-runner "^23.6.0" - jest-runtime "^23.6.0" - jest-snapshot "^23.6.0" - jest-util "^23.4.0" - jest-validate "^23.6.0" - jest-watcher "^23.4.0" - jest-worker "^23.2.0" - micromatch "^2.3.11" - node-notifier "^5.2.1" - prompts "^0.1.9" - realpath-native "^1.0.0" - rimraf "^2.5.4" - slash "^1.0.0" - string-length "^2.0.0" - strip-ansi "^4.0.0" - which "^1.2.12" - yargs "^11.0.0" - -jest-config@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-23.6.0.tgz#f82546a90ade2d8c7026fbf6ac5207fc22f8eb1d" - integrity sha512-i8V7z9BeDXab1+VNo78WM0AtWpBRXJLnkT+lyT+Slx/cbP5sZJ0+NDuLcmBE5hXAoK0aUp7vI+MOxR+R4d8SRQ== - dependencies: - babel-core "^6.0.0" - babel-jest "^23.6.0" - chalk "^2.0.1" - glob "^7.1.1" - jest-environment-jsdom "^23.4.0" - jest-environment-node "^23.4.0" - jest-get-type "^22.1.0" - jest-jasmine2 "^23.6.0" - jest-regex-util "^23.3.0" - jest-resolve "^23.6.0" - jest-util "^23.4.0" - jest-validate "^23.6.0" - micromatch "^2.3.11" - pretty-format "^23.6.0" - -jest-diff@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-23.6.0.tgz#1500f3f16e850bb3d71233408089be099f610c7d" - integrity sha512-Gz9l5Ov+X3aL5L37IT+8hoCUsof1CVYBb2QEkOupK64XyRR3h+uRpYIm97K7sY8diFxowR8pIGEdyfMKTixo3g== - dependencies: - chalk "^2.0.1" - diff "^3.2.0" - jest-get-type "^22.1.0" - pretty-format "^23.6.0" - -jest-docblock@23.2.0, jest-docblock@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-23.2.0.tgz#f085e1f18548d99fdd69b20207e6fd55d91383a7" - integrity sha1-8IXh8YVI2Z/dabICB+b9VdkTg6c= - dependencies: - detect-newline "^2.1.0" - -jest-each@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-23.6.0.tgz#ba0c3a82a8054387016139c733a05242d3d71575" - integrity sha512-x7V6M/WGJo6/kLoissORuvLIeAoyo2YqLOoCDkohgJ4XOXSqOtyvr8FbInlAWS77ojBsZrafbozWoKVRdtxFCg== - dependencies: - chalk "^2.0.1" - pretty-format "^23.6.0" - -jest-environment-jsdom@^23.4.0: - version "23.4.0" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-23.4.0.tgz#056a7952b3fea513ac62a140a2c368c79d9e6023" - integrity sha1-BWp5UrP+pROsYqFAosNox52eYCM= - dependencies: - jest-mock "^23.2.0" - jest-util "^23.4.0" - jsdom "^11.5.1" - -jest-environment-node@^23.4.0: - version "23.4.0" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-23.4.0.tgz#57e80ed0841dea303167cce8cd79521debafde10" - integrity sha1-V+gO0IQd6jAxZ8zozXlSHeuv3hA= - dependencies: - jest-mock "^23.2.0" - jest-util "^23.4.0" - -jest-get-type@^22.1.0: - version "22.4.3" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-22.4.3.tgz#e3a8504d8479342dd4420236b322869f18900ce4" - integrity sha512-/jsz0Y+V29w1chdXVygEKSz2nBoHoYqNShPe+QgxSNjAuP1i8+k4LbQNrfoliKej0P45sivkSCh7yiD6ubHS3w== - -jest-haste-map@23.5.0: - version "23.5.0" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-23.5.0.tgz#d4ca618188bd38caa6cb20349ce6610e194a8065" - integrity sha512-bt9Swigb6KZ6ZQq/fQDUwdUeHenVvZ6G/lKwJjwRGp+Fap8D4B3bND3FaeJg7vXVsLX8hXshRArbVxLop/5wLw== - dependencies: - fb-watchman "^2.0.0" - graceful-fs "^4.1.11" - invariant "^2.2.4" - jest-docblock "^23.2.0" - jest-serializer "^23.0.1" - jest-worker "^23.2.0" - micromatch "^2.3.11" - sane "^2.0.0" - -jest-haste-map@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-23.6.0.tgz#2e3eb997814ca696d62afdb3f2529f5bbc935e16" - integrity sha512-uyNhMyl6dr6HaXGHp8VF7cK6KpC6G9z9LiMNsst+rJIZ8l7wY0tk8qwjPmEghczojZ2/ZhtEdIabZ0OQRJSGGg== - dependencies: - fb-watchman "^2.0.0" - graceful-fs "^4.1.11" - invariant "^2.2.4" - jest-docblock "^23.2.0" - jest-serializer "^23.0.1" - jest-worker "^23.2.0" - micromatch "^2.3.11" - sane "^2.0.0" - -jest-jasmine2@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-23.6.0.tgz#840e937f848a6c8638df24360ab869cc718592e0" - integrity sha512-pe2Ytgs1nyCs8IvsEJRiRTPC0eVYd8L/dXJGU08GFuBwZ4sYH/lmFDdOL3ZmvJR8QKqV9MFuwlsAi/EWkFUbsQ== - dependencies: - babel-traverse "^6.0.0" - chalk "^2.0.1" - co "^4.6.0" - expect "^23.6.0" - is-generator-fn "^1.0.0" - jest-diff "^23.6.0" - jest-each "^23.6.0" - jest-matcher-utils "^23.6.0" - jest-message-util "^23.4.0" - jest-snapshot "^23.6.0" - jest-util "^23.4.0" - pretty-format "^23.6.0" - -jest-leak-detector@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-23.6.0.tgz#e4230fd42cf381a1a1971237ad56897de7e171de" - integrity sha512-f/8zA04rsl1Nzj10HIyEsXvYlMpMPcy0QkQilVZDFOaPbv2ur71X5u2+C4ZQJGyV/xvVXtCCZ3wQ99IgQxftCg== - dependencies: - pretty-format "^23.6.0" - -jest-matcher-utils@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-23.6.0.tgz#726bcea0c5294261a7417afb6da3186b4b8cac80" - integrity sha512-rosyCHQfBcol4NsckTn01cdelzWLU9Cq7aaigDf8VwwpIRvWE/9zLgX2bON+FkEW69/0UuYslUe22SOdEf2nog== - dependencies: - chalk "^2.0.1" - jest-get-type "^22.1.0" - pretty-format "^23.6.0" - -jest-message-util@^23.4.0: - version "23.4.0" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-23.4.0.tgz#17610c50942349508d01a3d1e0bda2c079086a9f" - integrity sha1-F2EMUJQjSVCNAaPR4L2iwHkIap8= - dependencies: - "@babel/code-frame" "^7.0.0-beta.35" - chalk "^2.0.1" - micromatch "^2.3.11" - slash "^1.0.0" - stack-utils "^1.0.1" - -jest-mock@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-23.2.0.tgz#ad1c60f29e8719d47c26e1138098b6d18b261134" - integrity sha1-rRxg8p6HGdR8JuETgJi20YsmETQ= - -jest-regex-util@^23.3.0: - version "23.3.0" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-23.3.0.tgz#5f86729547c2785c4002ceaa8f849fe8ca471bc5" - integrity sha1-X4ZylUfCeFxAAs6qj4Sf6MpHG8U= - -jest-resolve-dependencies@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-23.6.0.tgz#b4526af24c8540d9a3fab102c15081cf509b723d" - integrity sha512-EkQWkFWjGKwRtRyIwRwI6rtPAEyPWlUC2MpzHissYnzJeHcyCn1Hc8j7Nn1xUVrS5C6W5+ZL37XTem4D4pLZdA== - dependencies: - jest-regex-util "^23.3.0" - jest-snapshot "^23.6.0" - -jest-resolve@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-23.6.0.tgz#cf1d1a24ce7ee7b23d661c33ba2150f3aebfa0ae" - integrity sha512-XyoRxNtO7YGpQDmtQCmZjum1MljDqUCob7XlZ6jy9gsMugHdN2hY4+Acz9Qvjz2mSsOnPSH7skBmDYCHXVZqkA== - dependencies: - browser-resolve "^1.11.3" - chalk "^2.0.1" - realpath-native "^1.0.0" - -jest-runner@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-23.6.0.tgz#3894bd219ffc3f3cb94dc48a4170a2e6f23a5a38" - integrity sha512-kw0+uj710dzSJKU6ygri851CObtCD9cN8aNkg8jWJf4ewFyEa6kwmiH/r/M1Ec5IL/6VFa0wnAk6w+gzUtjJzA== - dependencies: - exit "^0.1.2" - graceful-fs "^4.1.11" - jest-config "^23.6.0" - jest-docblock "^23.2.0" - jest-haste-map "^23.6.0" - jest-jasmine2 "^23.6.0" - jest-leak-detector "^23.6.0" - jest-message-util "^23.4.0" - jest-runtime "^23.6.0" - jest-util "^23.4.0" - jest-worker "^23.2.0" - source-map-support "^0.5.6" - throat "^4.0.0" - -jest-runtime@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-23.6.0.tgz#059e58c8ab445917cd0e0d84ac2ba68de8f23082" - integrity sha512-ycnLTNPT2Gv+TRhnAYAQ0B3SryEXhhRj1kA6hBPSeZaNQkJ7GbZsxOLUkwg6YmvWGdX3BB3PYKFLDQCAE1zNOw== - dependencies: - babel-core "^6.0.0" - babel-plugin-istanbul "^4.1.6" - chalk "^2.0.1" - convert-source-map "^1.4.0" - exit "^0.1.2" - fast-json-stable-stringify "^2.0.0" - graceful-fs "^4.1.11" - jest-config "^23.6.0" - jest-haste-map "^23.6.0" - jest-message-util "^23.4.0" - jest-regex-util "^23.3.0" - jest-resolve "^23.6.0" - jest-snapshot "^23.6.0" - jest-util "^23.4.0" - jest-validate "^23.6.0" - micromatch "^2.3.11" - realpath-native "^1.0.0" - slash "^1.0.0" - strip-bom "3.0.0" - write-file-atomic "^2.1.0" - yargs "^11.0.0" - -jest-serializer@23.0.1, jest-serializer@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-23.0.1.tgz#a3776aeb311e90fe83fab9e533e85102bd164165" - integrity sha1-o3dq6zEekP6D+rnlM+hRAr0WQWU= - -jest-snapshot@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-23.6.0.tgz#f9c2625d1b18acda01ec2d2b826c0ce58a5aa17a" - integrity sha512-tM7/Bprftun6Cvj2Awh/ikS7zV3pVwjRYU2qNYS51VZHgaAMBs5l4o/69AiDHhQrj5+LA2Lq4VIvK7zYk/bswg== - dependencies: - babel-types "^6.0.0" - chalk "^2.0.1" - jest-diff "^23.6.0" - jest-matcher-utils "^23.6.0" - jest-message-util "^23.4.0" - jest-resolve "^23.6.0" - mkdirp "^0.5.1" - natural-compare "^1.4.0" - pretty-format "^23.6.0" - semver "^5.5.0" - -jest-util@^23.4.0: - version "23.4.0" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-23.4.0.tgz#4d063cb927baf0a23831ff61bec2cbbf49793561" - integrity sha1-TQY8uSe68KI4Mf9hvsLLv0l5NWE= - dependencies: - callsites "^2.0.0" - chalk "^2.0.1" - graceful-fs "^4.1.11" - is-ci "^1.0.10" - jest-message-util "^23.4.0" - mkdirp "^0.5.1" - slash "^1.0.0" - source-map "^0.6.0" - -jest-validate@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-23.6.0.tgz#36761f99d1ed33fcd425b4e4c5595d62b6597474" - integrity sha512-OFKapYxe72yz7agrDAWi8v2WL8GIfVqcbKRCLbRG9PAxtzF9b1SEDdTpytNDN12z2fJynoBwpMpvj2R39plI2A== - dependencies: - chalk "^2.0.1" - jest-get-type "^22.1.0" - leven "^2.1.0" - pretty-format "^23.6.0" - -jest-watcher@^23.4.0: - version "23.4.0" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-23.4.0.tgz#d2e28ce74f8dad6c6afc922b92cabef6ed05c91c" - integrity sha1-0uKM50+NrWxq/JIrksq+9u0FyRw= - dependencies: - ansi-escapes "^3.0.0" - chalk "^2.0.1" - string-length "^2.0.0" - -jest-worker@23.2.0, jest-worker@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-23.2.0.tgz#faf706a8da36fae60eb26957257fa7b5d8ea02b9" - integrity sha1-+vcGqNo2+uYOsmlXJX+ntdjqArk= - dependencies: - merge-stream "^1.0.1" - -jest@23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest/-/jest-23.6.0.tgz#ad5835e923ebf6e19e7a1d7529a432edfee7813d" - integrity sha512-lWzcd+HSiqeuxyhG+EnZds6iO3Y3ZEnMrfZq/OTGvF/C+Z4fPMCdhWTGSAiO2Oym9rbEXfwddHhh6jqrTF3+Lw== - dependencies: - import-local "^1.0.0" - jest-cli "^23.6.0" - -"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -js-tokens@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" - integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= - -js-yaml@^3.7.0, js-yaml@^3.9.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1" - integrity sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= - -jsdom@^11.5.1: - version "11.12.0" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.12.0.tgz#1a80d40ddd378a1de59656e9e6dc5a3ba8657bc8" - integrity sha512-y8Px43oyiBM13Zc1z780FrfNLJCXTL40EWlty/LXUtcjykRBNgLlCjWXpfSPBl2iv+N7koQN+dvqszHZgT/Fjw== - dependencies: - abab "^2.0.0" - acorn "^5.5.3" - acorn-globals "^4.1.0" - array-equal "^1.0.0" - cssom ">= 0.3.2 < 0.4.0" - cssstyle "^1.0.0" - data-urls "^1.0.0" - domexception "^1.0.1" - escodegen "^1.9.1" - html-encoding-sniffer "^1.0.2" - left-pad "^1.3.0" - nwsapi "^2.0.7" - parse5 "4.0.0" - pn "^1.1.0" - request "^2.87.0" - request-promise-native "^1.0.5" - sax "^1.2.4" - symbol-tree "^3.2.2" - tough-cookie "^2.3.4" - w3c-hr-time "^1.0.1" - webidl-conversions "^4.0.2" - whatwg-encoding "^1.0.3" - whatwg-mimetype "^2.1.0" - whatwg-url "^6.4.1" - ws "^5.2.0" - xml-name-validator "^3.0.0" - -jsesc@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" - integrity sha1-RsP+yMGJKxKwgz25vHYiF226s0s= - -jsesc@^2.5.1: - version "2.5.1" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.1.tgz#e421a2a8e20d6b0819df28908f782526b96dd1fe" - integrity sha1-5CGiqOINawgZ3yiQj3glJrlt0f4= - -jsesc@~0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" - integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= - -json-parse-better-errors@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" - integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== - -json-schema-traverse@^0.3.0: - version "0.3.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" - integrity sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A= - -json-schema@0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" - integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= - -json-stable-stringify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" - integrity sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8= - dependencies: - jsonify "~0.0.0" - -json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= - -json5@^0.5.0, json5@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" - integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE= - -jsonfile@^2.1.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" - integrity sha1-NzaitCi4e72gzIO1P6PWM6NcKug= - optionalDependencies: - graceful-fs "^4.1.6" - -jsonify@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" - integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM= - -jsprim@^1.2.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" - integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.2.3" - verror "1.10.0" - -kind-of@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-1.1.0.tgz#140a3d2d41a36d2efcfa9377b62c24f8495a5c44" - integrity sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ= - -kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" - integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= - dependencies: - is-buffer "^1.1.5" - -kind-of@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" - integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= - dependencies: - is-buffer "^1.1.5" - -kind-of@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" - integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== - -kind-of@^6.0.0, kind-of@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" - integrity sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA== - -klaw@^1.0.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" - integrity sha1-QIhDO0azsbolnXh4XY6W9zugJDk= - optionalDependencies: - graceful-fs "^4.1.9" - -kleur@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/kleur/-/kleur-2.0.2.tgz#b704f4944d95e255d038f0cb05fb8a602c55a300" - integrity sha512-77XF9iTllATmG9lSlIv0qdQ2BQ/h9t0bJllHlbvsQ0zUWfU7Yi0S8L5JXzPZgkefIiajLmBJJ4BsMJmqcf7oxQ== - -lcid@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" - integrity sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU= - dependencies: - invert-kv "^1.0.0" - -left-pad@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e" - integrity sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA== - -leven@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" - integrity sha1-wuep93IJTe6dNCAq6KzORoeHVYA= - -levn@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" - integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= - dependencies: - prelude-ls "~1.1.2" - type-check "~0.3.2" - -load-json-file@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" - integrity sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA= - dependencies: - graceful-fs "^4.1.2" - parse-json "^2.2.0" - pify "^2.0.0" - pinkie-promise "^2.0.0" - strip-bom "^2.0.0" - -load-json-file@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" - integrity sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg= - dependencies: - graceful-fs "^4.1.2" - parse-json "^2.2.0" - pify "^2.0.0" - strip-bom "^3.0.0" - -locate-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" - integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= - dependencies: - p-locate "^2.0.0" - path-exists "^3.0.0" - -lodash.pad@^4.1.0: - version "4.5.1" - resolved "https://registry.yarnpkg.com/lodash.pad/-/lodash.pad-4.5.1.tgz#4330949a833a7c8da22cc20f6a26c4d59debba70" - integrity sha1-QzCUmoM6fI2iLMIPaibE1Z3runA= - -lodash.padend@^4.1.0: - version "4.6.1" - resolved "https://registry.yarnpkg.com/lodash.padend/-/lodash.padend-4.6.1.tgz#53ccba047d06e158d311f45da625f4e49e6f166e" - integrity sha1-U8y6BH0G4VjTEfRdpiX05J5vFm4= - -lodash.padstart@^4.1.0: - version "4.6.1" - resolved "https://registry.yarnpkg.com/lodash.padstart/-/lodash.padstart-4.6.1.tgz#d2e3eebff0d9d39ad50f5cbd1b52a7bce6bb611b" - integrity sha1-0uPuv/DZ05rVD1y9G1KnvOa7YRs= - -lodash.sortby@^4.7.0: - version "4.7.0" - resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" - integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= - -lodash.throttle@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/lodash.throttle/-/lodash.throttle-4.1.1.tgz#c23e91b710242ac70c37f1e1cda9274cc39bf2f4" - integrity sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ= - -lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.3.0, lodash@^4.6.1: - version "4.17.11" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" - integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== - -loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.1: - version "1.4.0" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" - integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== - dependencies: - js-tokens "^3.0.0 || ^4.0.0" - -lru-cache@^4.0.1: - version "4.1.3" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.3.tgz#a1175cf3496dfc8436c156c334b4955992bce69c" - integrity sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA== - dependencies: - pseudomap "^1.0.2" - yallist "^2.1.2" - -make-dir@^1.0.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" - integrity sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ== - dependencies: - pify "^3.0.0" - -makeerror@1.0.x: - version "1.0.11" - resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" - integrity sha1-4BpckQnyr3lmDk6LlYd5AYT1qWw= - dependencies: - tmpl "1.0.x" - -map-cache@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" - integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= - -map-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" - integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= - dependencies: - object-visit "^1.0.0" - -math-random@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.1.tgz#8b3aac588b8a66e4975e3cdea67f7bb329601fac" - integrity sha1-izqsWIuKZuSXXjzepn97sylgH6w= - -mem@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" - integrity sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y= - dependencies: - mimic-fn "^1.0.0" - -merge-stream@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1" - integrity sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE= - dependencies: - readable-stream "^2.0.1" - -merge@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da" - integrity sha1-dTHjnUlJwoGma4xabgJl6LBYlNo= - -metro-babel-register@^0.47.1: - version "0.47.1" - resolved "https://registry.yarnpkg.com/metro-babel-register/-/metro-babel-register-0.47.1.tgz#b1ceb07e4904cba7d0de807f49404fa95e874acd" - integrity sha512-yp7Z55VrpO3ZJLgFTcBNlhYmPCfstvBDRbj0S/d6IAk9YQeI10XSFOsVJcRgbrEfihrU/un7VXc3QC8PIkjxlQ== - dependencies: - "@babel/core" "^7.0.0" - "@babel/plugin-proposal-class-properties" "^7.0.0" - "@babel/plugin-proposal-nullish-coalescing-operator" "^7.0.0" - "@babel/plugin-proposal-object-rest-spread" "^7.0.0" - "@babel/plugin-proposal-optional-catch-binding" "^7.0.0" - "@babel/plugin-proposal-optional-chaining" "^7.0.0" - "@babel/plugin-transform-async-to-generator" "^7.0.0" - "@babel/plugin-transform-flow-strip-types" "^7.0.0" - "@babel/plugin-transform-modules-commonjs" "^7.0.0" - "@babel/register" "^7.0.0" - core-js "^2.2.2" - escape-string-regexp "^1.0.5" - -metro-babel7-plugin-react-transform@0.47.1: - version "0.47.1" - resolved "https://registry.yarnpkg.com/metro-babel7-plugin-react-transform/-/metro-babel7-plugin-react-transform-0.47.1.tgz#83cc3fa73bc42f8ab054235c1d538baed36660a1" - integrity sha512-b7drnNbVww/AastsGlVBy3o5HJUGgjEMB1UrXHYh8Me5dVqirH5uEdy0d3cQAnMaq4lv5PBmcaoX/FP0bdLI5A== - dependencies: - "@babel/helper-module-imports" "^7.0.0" - -metro-babel7-plugin-react-transform@0.48.1: - version "0.48.1" - resolved "https://registry.yarnpkg.com/metro-babel7-plugin-react-transform/-/metro-babel7-plugin-react-transform-0.48.1.tgz#d5c8aeadcf30b75344477017b52edf4683a00e6a" - integrity sha512-b39Sowwzp0bqitbS3NkF5fzcuoT6vpLqj6Su7xgfCyW5EmYpvxunK7HwMSoZagAIpbD0H6r+iw+L2Ib1EEWfWw== - dependencies: - "@babel/helper-module-imports" "^7.0.0" - -metro-cache@0.47.1: - version "0.47.1" - resolved "https://registry.yarnpkg.com/metro-cache/-/metro-cache-0.47.1.tgz#a0a4726dc46fae0b5594ad10b6c1725abea37674" - integrity sha512-pMW9soKT2adcTLLPX52aJADPVl1u0NYKNBXG+B3J2vB4OZmtAQq66PlG+sl0sjqGoq4PoUW+Oq+L3J5RcAMTmQ== - dependencies: - jest-serializer "23.0.1" - metro-core "0.47.1" - mkdirp "^0.5.1" - rimraf "^2.5.4" - -metro-config@0.47.1: - version "0.47.1" - resolved "https://registry.yarnpkg.com/metro-config/-/metro-config-0.47.1.tgz#950a4db847d691beca91e1e8ce7c96bc978f4983" - integrity sha512-TqVGWCfD8OHqdSmQn7hEmEYxGlATim6rnhOEp5hJvqPPdVnN8iU/5qRdTl8FR7sH7Axx5TeV1pi8G86M8m0djg== - dependencies: - cosmiconfig "^5.0.5" - metro "0.47.1" - metro-cache "0.47.1" - metro-core "0.47.1" - pretty-format "^23.4.1" - -metro-core@0.47.1, metro-core@^0.47.1: - version "0.47.1" - resolved "https://registry.yarnpkg.com/metro-core/-/metro-core-0.47.1.tgz#890722cb4dd9c248be811dd3952a8be3dcb82337" - integrity sha512-xO/vP3jNd8GD2nZw7rJq+dQ/UEJ4pniHmP3rV0a8jIMRMIsknHaf8EX/C66H8bcYV0eTkRoY1MZH2AV1cCGTAw== - dependencies: - jest-haste-map "23.5.0" - lodash.throttle "^4.1.1" - metro-resolver "0.47.1" - wordwrap "^1.0.0" - -metro-memory-fs@^0.47.1: - version "0.47.1" - resolved "https://registry.yarnpkg.com/metro-memory-fs/-/metro-memory-fs-0.47.1.tgz#f3e21846d13ac50b46dfed877d9f593a8f35e0fc" - integrity sha512-C+QSofDZvPlWvFKMn0aYFYWpOT8t28i6TfdIhWY5AkXECUr0W8a7POgSIx022G4fWyF/SxSqccXpp7zSjn6EZA== - -metro-minify-uglify@0.47.1: - version "0.47.1" - resolved "https://registry.yarnpkg.com/metro-minify-uglify/-/metro-minify-uglify-0.47.1.tgz#0ef6ab8d72031a88b2468f0c4ae11f2c7afaf721" - integrity sha512-7AKb8wZJr4TiJMV5xyeV67ZGhhvh0s9tV56zCM1DIMuJVuFbqcKHJUPghiiA+zL6m1MgRMTxaIzjeNh3eM+xoA== - dependencies: - uglify-es "^3.1.9" - -metro-react-native-babel-preset@0.47.1: - version "0.47.1" - resolved "https://registry.yarnpkg.com/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.47.1.tgz#b74ecdafbcbac23b90d07a5bc552c22960e1ad29" - integrity sha512-p5qrbcECeZ/PYQm3Sv7cxMtVdUz4TZrhjjGFkAdmSWlhveztALYzk0lNn6fL3DCRcFRiO0NvS90JO5XXOJFk3w== - dependencies: - "@babel/plugin-proposal-class-properties" "^7.0.0" - "@babel/plugin-proposal-export-default-from" "^7.0.0" - "@babel/plugin-proposal-nullish-coalescing-operator" "^7.0.0" - "@babel/plugin-proposal-object-rest-spread" "^7.0.0" - "@babel/plugin-proposal-optional-catch-binding" "^7.0.0" - "@babel/plugin-proposal-optional-chaining" "^7.0.0" - "@babel/plugin-syntax-dynamic-import" "^7.0.0" - "@babel/plugin-syntax-export-default-from" "^7.0.0" - "@babel/plugin-transform-arrow-functions" "^7.0.0" - "@babel/plugin-transform-block-scoping" "^7.0.0" - "@babel/plugin-transform-classes" "^7.0.0" - "@babel/plugin-transform-computed-properties" "^7.0.0" - "@babel/plugin-transform-destructuring" "^7.0.0" - "@babel/plugin-transform-exponentiation-operator" "^7.0.0" - "@babel/plugin-transform-flow-strip-types" "^7.0.0" - "@babel/plugin-transform-for-of" "^7.0.0" - "@babel/plugin-transform-function-name" "^7.0.0" - "@babel/plugin-transform-literals" "^7.0.0" - "@babel/plugin-transform-modules-commonjs" "^7.0.0" - "@babel/plugin-transform-object-assign" "^7.0.0" - "@babel/plugin-transform-parameters" "^7.0.0" - "@babel/plugin-transform-react-display-name" "^7.0.0" - "@babel/plugin-transform-react-jsx" "^7.0.0" - "@babel/plugin-transform-react-jsx-source" "^7.0.0" - "@babel/plugin-transform-regenerator" "^7.0.0" - "@babel/plugin-transform-runtime" "^7.0.0" - "@babel/plugin-transform-shorthand-properties" "^7.0.0" - "@babel/plugin-transform-spread" "^7.0.0" - "@babel/plugin-transform-sticky-regex" "^7.0.0" - "@babel/plugin-transform-template-literals" "^7.0.0" - "@babel/plugin-transform-typescript" "^7.0.0" - "@babel/plugin-transform-unicode-regex" "^7.0.0" - "@babel/template" "^7.0.0" - metro-babel7-plugin-react-transform "0.47.1" - react-transform-hmr "^1.0.4" - -metro-react-native-babel-preset@0.48.1: - version "0.48.1" - resolved "https://registry.yarnpkg.com/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.48.1.tgz#dddbbe205bdfe75f25cd8dafeb7d1b628a90b755" - integrity sha512-euJ0MOyBYTa76kQNbly6An9FNpu9BqxfkXhKtD8hWZxo5dxIAk25AmoWfXU2OHj7PogG/u0Ndo3tmhZZ2NWYvA== - dependencies: - "@babel/plugin-proposal-class-properties" "^7.0.0" - "@babel/plugin-proposal-export-default-from" "^7.0.0" - "@babel/plugin-proposal-nullish-coalescing-operator" "^7.0.0" - "@babel/plugin-proposal-object-rest-spread" "^7.0.0" - "@babel/plugin-proposal-optional-catch-binding" "^7.0.0" - "@babel/plugin-proposal-optional-chaining" "^7.0.0" - "@babel/plugin-syntax-dynamic-import" "^7.0.0" - "@babel/plugin-syntax-export-default-from" "^7.0.0" - "@babel/plugin-transform-arrow-functions" "^7.0.0" - "@babel/plugin-transform-block-scoping" "^7.0.0" - "@babel/plugin-transform-classes" "^7.0.0" - "@babel/plugin-transform-computed-properties" "^7.0.0" - "@babel/plugin-transform-destructuring" "^7.0.0" - "@babel/plugin-transform-exponentiation-operator" "^7.0.0" - "@babel/plugin-transform-flow-strip-types" "^7.0.0" - "@babel/plugin-transform-for-of" "^7.0.0" - "@babel/plugin-transform-function-name" "^7.0.0" - "@babel/plugin-transform-literals" "^7.0.0" - "@babel/plugin-transform-modules-commonjs" "^7.0.0" - "@babel/plugin-transform-object-assign" "^7.0.0" - "@babel/plugin-transform-parameters" "^7.0.0" - "@babel/plugin-transform-react-display-name" "^7.0.0" - "@babel/plugin-transform-react-jsx" "^7.0.0" - "@babel/plugin-transform-react-jsx-source" "^7.0.0" - "@babel/plugin-transform-regenerator" "^7.0.0" - "@babel/plugin-transform-runtime" "^7.0.0" - "@babel/plugin-transform-shorthand-properties" "^7.0.0" - "@babel/plugin-transform-spread" "^7.0.0" - "@babel/plugin-transform-sticky-regex" "^7.0.0" - "@babel/plugin-transform-template-literals" "^7.0.0" - "@babel/plugin-transform-typescript" "^7.0.0" - "@babel/plugin-transform-unicode-regex" "^7.0.0" - "@babel/template" "^7.0.0" - metro-babel7-plugin-react-transform "0.48.1" - react-transform-hmr "^1.0.4" - -metro-resolver@0.47.1: - version "0.47.1" - resolved "https://registry.yarnpkg.com/metro-resolver/-/metro-resolver-0.47.1.tgz#fec75534c083fc50105667ee28689f0bed88dbbd" - integrity sha512-eb6i2tnVi+wASPxWk71P4lsJ7ndbRsv8qEijgTDaOBXYZliDEJW5uHC41JJK0IeRLYu+N3eGc/EdhOjTUGJj1A== - dependencies: - absolute-path "^0.0.0" - -metro-source-map@0.47.1: - version "0.47.1" - resolved "https://registry.yarnpkg.com/metro-source-map/-/metro-source-map-0.47.1.tgz#54bb5b9b315d0fc695974338850dcd58d74b56ca" - integrity sha512-E3mM+CVC4m9QMCQWgHOf2iapjZbt7KeKu1AorRt5pDbWk6bPxbmdO7y+mvaZWktqveB5qTi7CCoBhvS7E7Qonw== - dependencies: - source-map "^0.5.6" - -metro@0.47.1, metro@^0.47.1: - version "0.47.1" - resolved "https://registry.yarnpkg.com/metro/-/metro-0.47.1.tgz#ec6e1b44a9b9a0dbc44798507e18b80478831a14" - integrity sha512-39o0ZLHNWOi8+Pc2zB/gG0bito7BEmjUF4AKZLkOSGMuQw4JF/WcgN20v3XRR4hCL8SEQr6YSFw2Vpzw8OSYyA== - dependencies: - "@babel/core" "^7.0.0" - "@babel/generator" "^7.0.0" - "@babel/parser" "^7.0.0" - "@babel/plugin-external-helpers" "^7.0.0" - "@babel/template" "^7.0.0" - "@babel/traverse" "^7.0.0" - "@babel/types" "^7.0.0" - absolute-path "^0.0.0" - async "^2.4.0" - babel-preset-fbjs "^3.0.1" - chalk "^1.1.1" - concat-stream "^1.6.0" - connect "^3.6.5" - debug "^2.2.0" - denodeify "^1.2.1" - eventemitter3 "^3.0.0" - fbjs "^1.0.0" - fs-extra "^1.0.0" - graceful-fs "^4.1.3" - image-size "^0.6.0" - jest-docblock "23.2.0" - jest-haste-map "23.5.0" - jest-worker "23.2.0" - json-stable-stringify "^1.0.1" - lodash.throttle "^4.1.1" - merge-stream "^1.0.1" - metro-cache "0.47.1" - metro-config "0.47.1" - metro-core "0.47.1" - metro-minify-uglify "0.47.1" - metro-react-native-babel-preset "0.47.1" - metro-resolver "0.47.1" - metro-source-map "0.47.1" - mime-types "2.1.11" - mkdirp "^0.5.1" - node-fetch "^2.2.0" - nullthrows "^1.1.0" - react-transform-hmr "^1.0.4" - resolve "^1.5.0" - rimraf "^2.5.4" - serialize-error "^2.1.0" - source-map "^0.5.6" - temp "0.8.3" - throat "^4.1.0" - wordwrap "^1.0.0" - write-file-atomic "^1.2.0" - ws "^1.1.0" - xpipe "^1.0.5" - yargs "^9.0.0" - -micromatch@^2.3.11: - version "2.3.11" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" - integrity sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU= - dependencies: - arr-diff "^2.0.0" - array-unique "^0.2.1" - braces "^1.8.2" - expand-brackets "^0.1.4" - extglob "^0.3.1" - filename-regex "^2.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.1" - kind-of "^3.0.2" - normalize-path "^2.0.1" - object.omit "^2.0.0" - parse-glob "^3.0.4" - regex-cache "^0.4.2" - -micromatch@^3.1.4: - version "3.1.10" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" - integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - braces "^2.3.1" - define-property "^2.0.2" - extend-shallow "^3.0.2" - extglob "^2.0.4" - fragment-cache "^0.2.1" - kind-of "^6.0.2" - nanomatch "^1.2.9" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.2" - -"mime-db@>= 1.36.0 < 2", mime-db@~1.36.0: - version "1.36.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.36.0.tgz#5020478db3c7fe93aad7bbcc4dcf869c43363397" - integrity sha512-L+xvyD9MkoYMXb1jAmzI/lWYAxAMCPvIBSWur0PZ5nOf5euahRLVqH//FKW9mWp2lkqUgYiXPgkzfMUFi4zVDw== - -mime-db@~1.23.0: - version "1.23.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.23.0.tgz#a31b4070adaea27d732ea333740a64d0ec9a6659" - integrity sha1-oxtAcK2uon1zLqMzdApk0OyaZlk= - -mime-types@2.1.11: - version "2.1.11" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.11.tgz#c259c471bda808a85d6cd193b430a5fae4473b3c" - integrity sha1-wlnEcb2oCKhdbNGTtDCl+uRHOzw= - dependencies: - mime-db "~1.23.0" - -mime-types@^2.1.12, mime-types@~2.1.18, mime-types@~2.1.19: - version "2.1.20" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.20.tgz#930cb719d571e903738520f8470911548ca2cc19" - integrity sha512-HrkrPaP9vGuWbLK1B1FfgAkbqNjIuy4eHlIYnFi7kamZyLLrGlo2mpcx0bBmNpKqBtYtAfGbodDddIgddSJC2A== - dependencies: - mime-db "~1.36.0" - -mime@1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" - integrity sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ== - -mime@^1.3.4: - version "1.6.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" - integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== - -mimic-fn@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" - integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== - -min-document@^2.19.0: - version "2.19.0" - resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" - integrity sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU= - dependencies: - dom-walk "^0.1.0" - -minimatch@^3.0.3, minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== - dependencies: - brace-expansion "^1.1.7" - -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= - -minimist@^1.1.1, minimist@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= - -minimist@~0.0.1: - version "0.0.10" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" - integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= - -minipass@^2.2.1, minipass@^2.3.3: - version "2.3.4" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.4.tgz#4768d7605ed6194d6d576169b9e12ef71e9d9957" - integrity sha512-mlouk1OHlaUE8Odt1drMtG1bAJA4ZA6B/ehysgV0LUIrDHdKgo1KorZq3pK0b/7Z7LJIQ12MNM6aC+Tn6lUZ5w== - dependencies: - safe-buffer "^5.1.2" - yallist "^3.0.0" - -minizlib@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.1.1.tgz#6734acc045a46e61d596a43bb9d9cd326e19cc42" - integrity sha512-TrfjCjk4jLhcJyGMYymBH6oTXcWjYbUAXTHDbtnWHjZC25h0cdajHuPE1zxb4DVmu8crfh+HwH/WMuyLG0nHBg== - dependencies: - minipass "^2.2.1" - -mixin-deep@^1.2.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe" - integrity sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ== - dependencies: - for-in "^1.0.2" - is-extendable "^1.0.1" - -mkdirp@^0.5.0, mkdirp@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= - dependencies: - minimist "0.0.8" - -morgan@^1.9.0: - version "1.9.1" - resolved "https://registry.yarnpkg.com/morgan/-/morgan-1.9.1.tgz#0a8d16734a1d9afbc824b99df87e738e58e2da59" - integrity sha512-HQStPIV4y3afTiCYVxirakhlCfGkI161c76kKFca7Fk1JusM//Qeo1ej2XaMniiNeaZklMVrh3vTtIzpzwbpmA== - dependencies: - basic-auth "~2.0.0" - debug "2.6.9" - depd "~1.1.2" - on-finished "~2.3.0" - on-headers "~1.0.1" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= - -ms@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" - integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== - -mute-stream@0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" - integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= - -nan@^2.9.2: - version "2.11.1" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.11.1.tgz#90e22bccb8ca57ea4cd37cc83d3819b52eea6766" - integrity sha512-iji6k87OSXa0CcrLl9z+ZiYSuR2o+c0bGuNmXdrhTQTakxytAFsC56SArGYoiHlJlFoHSnvmhpceZJaXkVuOtA== - -nanomatch@^1.2.9: - version "1.2.13" - resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" - integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - define-property "^2.0.2" - extend-shallow "^3.0.2" - fragment-cache "^0.2.1" - is-windows "^1.0.2" - kind-of "^6.0.2" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= - -needle@^2.2.1: - version "2.2.4" - resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.4.tgz#51931bff82533b1928b7d1d69e01f1b00ffd2a4e" - integrity sha512-HyoqEb4wr/rsoaIDfTH2aVL9nWtQqba2/HvMv+++m8u0dz808MaagKILxtfeSN7QU7nvbQ79zk3vYOJp9zsNEA== - dependencies: - debug "^2.1.2" - iconv-lite "^0.4.4" - sax "^1.2.4" - -negotiator@0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" - integrity sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk= - -node-fetch@^1.0.1: - version "1.7.3" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" - integrity sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ== - dependencies: - encoding "^0.1.11" - is-stream "^1.0.1" - -node-fetch@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.2.0.tgz#4ee79bde909262f9775f731e3656d0db55ced5b5" - integrity sha512-OayFWziIxiHY8bCUyLX6sTpDH8Jsbp4FfYd1j1f7vZyfgkcOnAyM4oQR16f8a0s7Gl/viMGRey8eScYk4V4EZA== - -node-int64@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" - integrity sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs= - -node-modules-regexp@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" - integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA= - -node-notifier@^5.2.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.2.1.tgz#fa313dd08f5517db0e2502e5758d664ac69f9dea" - integrity sha512-MIBs+AAd6dJ2SklbbE8RUDRlIVhU8MaNLh1A9SUZDUHPiZkWLFde6UNwG41yQHZEToHgJMXqyVZ9UcS/ReOVTg== - dependencies: - growly "^1.3.0" - semver "^5.4.1" - shellwords "^0.1.1" - which "^1.3.0" - -node-pre-gyp@^0.10.0: - version "0.10.3" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.10.3.tgz#3070040716afdc778747b61b6887bf78880b80fc" - integrity sha512-d1xFs+C/IPS8Id0qPTZ4bUT8wWryfR/OzzAFxweG+uLN85oPzyo2Iw6bVlLQ/JOdgNonXLCoRyqDzDWq4iw72A== - dependencies: - detect-libc "^1.0.2" - mkdirp "^0.5.1" - needle "^2.2.1" - nopt "^4.0.1" - npm-packlist "^1.1.6" - npmlog "^4.0.2" - rc "^1.2.7" - rimraf "^2.6.1" - semver "^5.3.0" - tar "^4" - -nopt@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" - integrity sha1-0NRoWv1UFRk8jHUFYC0NF81kR00= - dependencies: - abbrev "1" - osenv "^0.1.4" - -normalize-package-data@^2.3.2: - version "2.4.0" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" - integrity sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw== - dependencies: - hosted-git-info "^2.1.4" - is-builtin-module "^1.0.0" - semver "2 || 3 || 4 || 5" - validate-npm-package-license "^3.0.1" - -normalize-path@^2.0.1, normalize-path@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" - integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= - dependencies: - remove-trailing-separator "^1.0.1" - -npm-bundled@^1.0.1: - version "1.0.5" - resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.5.tgz#3c1732b7ba936b3a10325aef616467c0ccbcc979" - integrity sha512-m/e6jgWu8/v5niCUKQi9qQl8QdeEduFA96xHDDzFGqly0OOjI7c+60KM/2sppfnUU9JJagf+zs+yGhqSOFj71g== - -npm-packlist@^1.1.6: - version "1.1.12" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.1.12.tgz#22bde2ebc12e72ca482abd67afc51eb49377243a" - integrity sha512-WJKFOVMeAlsU/pjXuqVdzU0WfgtIBCupkEVwn+1Y0ERAbUfWw8R4GjgVbaKnUjRoD2FoQbHOCbOyT5Mbs9Lw4g== - dependencies: - ignore-walk "^3.0.1" - npm-bundled "^1.0.1" - -npm-run-path@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" - integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= - dependencies: - path-key "^2.0.0" - -npmlog@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-2.0.4.tgz#98b52530f2514ca90d09ec5b22c8846722375692" - integrity sha1-mLUlMPJRTKkNCexbIsiEZyI3VpI= - dependencies: - ansi "~0.3.1" - are-we-there-yet "~1.1.2" - gauge "~1.2.5" - -npmlog@^4.0.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" - integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== - dependencies: - are-we-there-yet "~1.1.2" - console-control-strings "~1.1.0" - gauge "~2.7.3" - set-blocking "~2.0.0" - -nullthrows@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/nullthrows/-/nullthrows-1.1.0.tgz#832bb19ef7fedab989f81675c846e2858a3917a2" - integrity sha512-YoigDq49JRqVCUlb4XlwZirXQiNCoXdwoyfklXJAEYHN+XKHWgDkrcWxNgxEtP7N+XF9Akp7Lr6wLq8HZxLttw== - -number-is-nan@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" - integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= - -nwsapi@^2.0.7: - version "2.0.9" - resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.0.9.tgz#77ac0cdfdcad52b6a1151a84e73254edc33ed016" - integrity sha512-nlWFSCTYQcHk/6A9FFnfhKc14c3aFhfdNBXgo8Qgi9QTBu/qg3Ww+Uiz9wMzXd1T8GFxPc2QIHB6Qtf2XFryFQ== - -oauth-sign@~0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" - integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== - -object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= - -object-copy@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" - integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= - dependencies: - copy-descriptor "^0.1.0" - define-property "^0.2.5" - kind-of "^3.0.3" - -object-keys@^1.0.12: - version "1.0.12" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.12.tgz#09c53855377575310cca62f55bb334abff7b3ed2" - integrity sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag== - -object-visit@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" - integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= - dependencies: - isobject "^3.0.0" - -object.getownpropertydescriptors@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16" - integrity sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY= - dependencies: - define-properties "^1.1.2" - es-abstract "^1.5.1" - -object.omit@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" - integrity sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo= - dependencies: - for-own "^0.1.4" - is-extendable "^0.1.1" - -object.pick@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" - integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= - dependencies: - isobject "^3.0.1" - -on-finished@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" - integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= - dependencies: - ee-first "1.1.1" - -on-headers@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.1.tgz#928f5d0f470d49342651ea6794b0857c100693f7" - integrity sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c= - -once@^1.3.0, once@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= - dependencies: - wrappy "1" - -onetime@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" - integrity sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= - dependencies: - mimic-fn "^1.0.0" - -opn@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/opn/-/opn-3.0.3.tgz#b6d99e7399f78d65c3baaffef1fb288e9b85243a" - integrity sha1-ttmec5n3jWXDuq/+8fsojpuFJDo= - dependencies: - object-assign "^4.0.1" - -optimist@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" - integrity sha1-2j6nRob6IaGaERwybpDrFaAZZoY= - dependencies: - minimist "~0.0.1" - wordwrap "~0.0.2" - -optionator@^0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" - integrity sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q= - dependencies: - deep-is "~0.1.3" - fast-levenshtein "~2.0.4" - levn "~0.3.0" - prelude-ls "~1.1.2" - type-check "~0.3.2" - wordwrap "~1.0.0" - -options@>=0.0.5: - version "0.0.6" - resolved "https://registry.yarnpkg.com/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f" - integrity sha1-7CLTEoBrtT5zF3Pnza788cZDEo8= - -os-homedir@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" - integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= - -os-locale@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" - integrity sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA== - dependencies: - execa "^0.7.0" - lcid "^1.0.0" - mem "^1.1.0" - -os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= - -osenv@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" - integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.0" - -p-finally@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" - integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= - -p-limit@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" - integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== - dependencies: - p-try "^1.0.0" - -p-locate@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" - integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= - dependencies: - p-limit "^1.1.0" - -p-try@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" - integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= - -parse-glob@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" - integrity sha1-ssN2z7EfNVE7rdFz7wu246OIORw= - dependencies: - glob-base "^0.3.0" - is-dotfile "^1.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.0" - -parse-json@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" - integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= - dependencies: - error-ex "^1.2.0" - -parse-json@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" - integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= - dependencies: - error-ex "^1.3.1" - json-parse-better-errors "^1.0.1" - -parse5@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" - integrity sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA== - -parseurl@~1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3" - integrity sha1-/CidTtiZMRlGDBViUyYs3I3mW/M= - -pascalcase@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" - integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= - -path-exists@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" - integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= - dependencies: - pinkie-promise "^2.0.0" - -path-exists@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" - integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= - -path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= - -path-key@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" - integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= - -path-parse@^1.0.5: - version "1.0.6" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" - integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== - -path-type@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" - integrity sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE= - dependencies: - graceful-fs "^4.1.2" - pify "^2.0.0" - pinkie-promise "^2.0.0" - -path-type@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" - integrity sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM= - dependencies: - pify "^2.0.0" - -pegjs@^0.10.0: - version "0.10.0" - resolved "https://registry.yarnpkg.com/pegjs/-/pegjs-0.10.0.tgz#cf8bafae6eddff4b5a7efb185269eaaf4610ddbd" - integrity sha1-z4uvrm7d/0tafvsYUmnqr0YQ3b0= - -performance-now@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" - integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= - -pify@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= - -pify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" - integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= - -pinkie-promise@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" - integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= - dependencies: - pinkie "^2.0.0" - -pinkie@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" - integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= - -pirates@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.0.tgz#850b18781b4ac6ec58a43c9ed9ec5fe6796addbd" - integrity sha512-8t5BsXy1LUIjn3WWOlOuFDuKswhQb/tkak641lvBgmPOBUQHXveORtlMCp6OdPV1dtuTaEahKA8VNz6uLfKBtA== - dependencies: - node-modules-regexp "^1.0.0" - -pkg-dir@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" - integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s= - dependencies: - find-up "^2.1.0" - -plist@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/plist/-/plist-2.0.1.tgz#0a32ca9481b1c364e92e18dc55c876de9d01da8b" - integrity sha1-CjLKlIGxw2TpLhjcVch23p0B2os= - dependencies: - base64-js "1.1.2" - xmlbuilder "8.2.2" - xmldom "0.1.x" - -plist@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/plist/-/plist-3.0.1.tgz#a9b931d17c304e8912ef0ba3bdd6182baf2e1f8c" - integrity sha512-GpgvHHocGRyQm74b6FWEZZVRroHKE1I0/BTjAmySaohK+cUn+hZpbqXkc3KWgW3gQYkqcQej35FohcT0FRlkRQ== - dependencies: - base64-js "^1.2.3" - xmlbuilder "^9.0.7" - xmldom "0.1.x" - -plugin-error@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/plugin-error/-/plugin-error-0.1.2.tgz#3b9bb3335ccf00f425e07437e19276967da47ace" - integrity sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4= - dependencies: - ansi-cyan "^0.1.1" - ansi-red "^0.1.1" - arr-diff "^1.0.1" - arr-union "^2.0.1" - extend-shallow "^1.1.2" - -pn@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb" - integrity sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA== - -posix-character-classes@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" - integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= - -postcss-value-parser@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz#87f38f9f18f774a4ab4c8a232f5c5ce8872a9d15" - integrity sha1-h/OPnxj3dKSrTIojL1xc6IcqnRU= - -prelude-ls@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" - integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= - -preserve@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" - integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks= - -pretty-format@^23.4.1, pretty-format@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.6.0.tgz#5eaac8eeb6b33b987b7fe6097ea6a8a146ab5760" - integrity sha512-zf9NV1NSlDLDjycnwm6hpFATCGl/K1lt0R/GdkAK2O5LN/rwJoB+Mh93gGJjut4YbmecbfgLWVGSTCr0Ewvvbw== - dependencies: - ansi-regex "^3.0.0" - ansi-styles "^3.2.0" - -pretty-format@^4.2.1: - version "4.3.1" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-4.3.1.tgz#530be5c42b3c05b36414a7a2a4337aa80acd0e8d" - integrity sha1-UwvlxCs8BbNkFKeipDN6qArNDo0= - -private@^0.1.6, private@^0.1.8: - version "0.1.8" - resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" - integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg== - -process-nextick-args@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" - integrity sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw== - -process@~0.5.1: - version "0.5.2" - resolved "https://registry.yarnpkg.com/process/-/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf" - integrity sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8= - -promise@^7.1.1: - version "7.3.1" - resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" - integrity sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg== - dependencies: - asap "~2.0.3" - -prompts@^0.1.9: - version "0.1.14" - resolved "https://registry.yarnpkg.com/prompts/-/prompts-0.1.14.tgz#a8e15c612c5c9ec8f8111847df3337c9cbd443b2" - integrity sha512-rxkyiE9YH6zAz/rZpywySLKkpaj0NMVyNw1qhsubdbjjSgcayjTShDreZGlFMcGSu5sab3bAKPfFk78PB90+8w== - dependencies: - kleur "^2.0.1" - sisteransi "^0.1.1" - -prop-types@^15.5.4, prop-types@^15.5.8, prop-types@^15.6.2: - version "15.6.2" - resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.2.tgz#05d5ca77b4453e985d60fc7ff8c859094a497102" - integrity sha512-3pboPvLiWD7dkI3qf3KbUe6hKFKa52w+AE0VCqECtf+QHAKgOL37tTaNCnuX1nAAQ4ZhyP+kYVKf8rLmJ/feDQ== - dependencies: - loose-envify "^1.3.1" - object-assign "^4.1.1" - -pseudomap@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" - integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= - -psl@^1.1.24: - version "1.1.29" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.29.tgz#60f580d360170bb722a797cc704411e6da850c67" - integrity sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ== - -punycode@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= - -punycode@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - -qs@~6.5.2: - version "6.5.2" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" - integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== - -randomatic@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.1.0.tgz#36f2ca708e9e567f5ed2ec01949026d50aa10116" - integrity sha512-KnGPVE0lo2WoXxIZ7cPR8YBpiol4gsSuOwDSg410oHh80ZMp5EiypNqL2K4Z77vJn6lB5rap7IkAmcUlalcnBQ== - dependencies: - is-number "^4.0.0" - kind-of "^6.0.0" - math-random "^1.0.1" - -range-parser@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" - integrity sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4= - -rc@^1.2.7: - version "1.2.8" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" - integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== - dependencies: - deep-extend "^0.6.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - -react-clone-referenced-element@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/react-clone-referenced-element/-/react-clone-referenced-element-1.1.0.tgz#9cdda7f2aeb54fea791f3ab8c6ab96c7a77d0158" - integrity sha512-FKOsfKbBkPxYE8576EM6uAfHC4rnMpLyH6/TJUL4WcHUEB3EUn8AxPjnnV/IiwSSzsClvHYK+sDELKN/EJ0WYg== - -react-deep-force-update@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/react-deep-force-update/-/react-deep-force-update-1.1.2.tgz#3d2ae45c2c9040cbb1772be52f8ea1ade6ca2ee1" - integrity sha512-WUSQJ4P/wWcusaH+zZmbECOk7H5N2pOIl0vzheeornkIMhu+qrNdGFm0bDZLCb0hSF0jf/kH1SgkNGfBdTc4wA== - -react-devtools-core@^3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-3.4.0.tgz#6b61594dce01b129a9e0b44b5bc4952f8f59ceec" - integrity sha512-yV3LLhoRwbfcQyVPNwb1EZ9W7CGu+kX2EqyZ3Cl5C+cbXcb6FJ3YSeeBt9BQB+hjyjRMBjQSKqnpPS6OMSEUow== - dependencies: - shell-quote "^1.6.1" - ws "^3.3.1" - -react-is@^16.3.1, react-is@^16.5.0: - version "16.5.2" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.5.2.tgz#e2a7b7c3f5d48062eb769fcb123505eb928722e3" - integrity sha512-hSl7E6l25GTjNEZATqZIuWOgSnpXb3kD0DVCujmg46K5zLxsbiKaaT6VO9slkSBDPZfYs30lwfJwbOFOnoEnKQ== - -react-native-app-auth@4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/react-native-app-auth/-/react-native-app-auth-4.1.1.tgz#ae1b57b29c139109d8c2969598a346c9b42d26fb" - integrity sha512-MIwu0uzNcoDjPbSNnU24WKKtvKunxOAQEPatw+UNe/ED/GtDfYbyLJ5/SEObsfOH3fDd/yEP2svsyxqeR+Fh1Q== - -react-native@0.57.2: - version "0.57.2" - resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.57.2.tgz#6beb2985bd94686087613af8d2af653f5fb61ffa" - integrity sha512-UbFbyt0rfrNLOtBXn3EmtHJ3EqL0/PhGCfGGZIg7vHn/U4K+2wZNvrLwzhqiZYSjvtmJluA1vMiQTvWBupCx8w== - dependencies: - "@babel/runtime" "^7.0.0" - absolute-path "^0.0.0" - art "^0.10.0" - base64-js "^1.1.2" - chalk "^1.1.1" - commander "^2.9.0" - compression "^1.7.1" - connect "^3.6.5" - create-react-class "^15.6.3" - debug "^2.2.0" - denodeify "^1.2.1" - envinfo "^5.7.0" - errorhandler "^1.5.0" - escape-string-regexp "^1.0.5" - event-target-shim "^1.0.5" - fbjs "0.8.17" - fbjs-scripts "^0.8.1" - fs-extra "^1.0.0" - glob "^7.1.1" - graceful-fs "^4.1.3" - inquirer "^3.0.6" - lodash "^4.17.5" - metro "^0.47.1" - metro-babel-register "^0.47.1" - metro-core "^0.47.1" - metro-memory-fs "^0.47.1" - mime "^1.3.4" - minimist "^1.2.0" - mkdirp "^0.5.1" - morgan "^1.9.0" - node-fetch "^2.2.0" - node-notifier "^5.2.1" - npmlog "^2.0.4" - opn "^3.0.2" - optimist "^0.6.1" - plist "^3.0.0" - pretty-format "^4.2.1" - promise "^7.1.1" - prop-types "^15.5.8" - react-clone-referenced-element "^1.0.1" - react-devtools-core "^3.4.0" - react-timer-mixin "^0.13.2" - regenerator-runtime "^0.11.0" - rimraf "^2.5.4" - semver "^5.0.3" - serve-static "^1.13.1" - shell-quote "1.6.1" - stacktrace-parser "^0.1.3" - ws "^1.1.0" - xcode "^0.9.1" - xmldoc "^0.4.0" - yargs "^9.0.0" - -react-proxy@^1.1.7: - version "1.1.8" - resolved "https://registry.yarnpkg.com/react-proxy/-/react-proxy-1.1.8.tgz#9dbfd9d927528c3aa9f444e4558c37830ab8c26a" - integrity sha1-nb/Z2SdSjDqp9ETkVYw3gwq4wmo= - dependencies: - lodash "^4.6.1" - react-deep-force-update "^1.0.0" - -react-test-renderer@16.5.0: - version "16.5.0" - resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-16.5.0.tgz#1aeca0edc4f27f63265dcaed80ba82e11e762f56" - integrity sha512-cuN9BoZ1p6T3oxrjxN7pQDSmgWzAxWBi8gtCHcViMYcw/1xqOIyatt2YFhiCWg7115TPQqkTKEu+F44YjFE4ig== - dependencies: - object-assign "^4.1.1" - prop-types "^15.6.2" - react-is "^16.5.0" - schedule "^0.3.0" - -react-timer-mixin@^0.13.2: - version "0.13.4" - resolved "https://registry.yarnpkg.com/react-timer-mixin/-/react-timer-mixin-0.13.4.tgz#75a00c3c94c13abe29b43d63b4c65a88fc8264d3" - integrity sha512-4+ow23tp/Tv7hBM5Az5/Be/eKKF7DIvJ09voz5LyHGQaqqz9WV8YMs31eFvcYQs7d451LSg7kDJV70XYN/Ug/Q== - -react-transform-hmr@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/react-transform-hmr/-/react-transform-hmr-1.0.4.tgz#e1a40bd0aaefc72e8dfd7a7cda09af85066397bb" - integrity sha1-4aQL0Krvxy6N/Xp82gmvhQZjl7s= - dependencies: - global "^4.3.0" - react-proxy "^1.1.7" - -react@16.5.0: - version "16.5.0" - resolved "https://registry.yarnpkg.com/react/-/react-16.5.0.tgz#f2c1e754bf9751a549d9c6d9aca41905beb56575" - integrity sha512-nw/yB/L51kA9PsAy17T1JrzzGRk+BlFCJwFF7p+pwVxgqwPjYNeZEkkH7LXn9dmflolrYMXLWMTkQ77suKPTNQ== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - prop-types "^15.6.2" - schedule "^0.3.0" - -read-pkg-up@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" - integrity sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI= - dependencies: - find-up "^1.0.0" - read-pkg "^1.0.0" - -read-pkg-up@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" - integrity sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4= - dependencies: - find-up "^2.0.0" - read-pkg "^2.0.0" - -read-pkg@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" - integrity sha1-9f+qXs0pyzHAR0vKfXVra7KePyg= - dependencies: - load-json-file "^1.0.0" - normalize-package-data "^2.3.2" - path-type "^1.0.0" - -read-pkg@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" - integrity sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg= - dependencies: - load-json-file "^2.0.0" - normalize-package-data "^2.3.2" - path-type "^2.0.0" - -readable-stream@^2.0.1, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2: - version "2.3.6" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" - integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.1.1" - util-deprecate "~1.0.1" - -realpath-native@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/realpath-native/-/realpath-native-1.0.2.tgz#cd51ce089b513b45cf9b1516c82989b51ccc6560" - integrity sha512-+S3zTvVt9yTntFrBpm7TQmQ3tzpCrnA1a/y+3cUHAc9ZR6aIjG0WNLR+Rj79QpJktY+VeW/TQtFlQ1bzsehI8g== - dependencies: - util.promisify "^1.0.0" - -regenerate-unicode-properties@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-7.0.0.tgz#107405afcc4a190ec5ed450ecaa00ed0cafa7a4c" - integrity sha512-s5NGghCE4itSlUS+0WUj88G6cfMVMmH8boTPNvABf8od+2dhT9WDlWu8n01raQAJZMOK8Ch6jSexaRO7swd6aw== - dependencies: - regenerate "^1.4.0" - -regenerate@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" - integrity sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg== - -regenerator-runtime@^0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" - integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== - -regenerator-runtime@^0.12.0: - version "0.12.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz#fa1a71544764c036f8c49b13a08b2594c9f8a0de" - integrity sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg== - -regenerator-transform@^0.13.3: - version "0.13.3" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.13.3.tgz#264bd9ff38a8ce24b06e0636496b2c856b57bcbb" - integrity sha512-5ipTrZFSq5vU2YoGoww4uaRVAK4wyYC4TSICibbfEPOruUu8FFP7ErV0BjmbIOEpn3O/k9na9UEdYR/3m7N6uA== - dependencies: - private "^0.1.6" - -regex-cache@^0.4.2: - version "0.4.4" - resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" - integrity sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ== - dependencies: - is-equal-shallow "^0.1.3" - -regex-not@^1.0.0, regex-not@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" - integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== - dependencies: - extend-shallow "^3.0.2" - safe-regex "^1.1.0" - -regexpu-core@^4.1.3: - version "4.2.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.2.0.tgz#a3744fa03806cffe146dea4421a3e73bdcc47b1d" - integrity sha512-Z835VSnJJ46CNBttalHD/dB+Sj2ezmY6Xp38npwU87peK6mqOzOpV8eYktdkLTEkzzD+JsTcxd84ozd8I14+rw== - dependencies: - regenerate "^1.4.0" - regenerate-unicode-properties "^7.0.0" - regjsgen "^0.4.0" - regjsparser "^0.3.0" - unicode-match-property-ecmascript "^1.0.4" - unicode-match-property-value-ecmascript "^1.0.2" - -regjsgen@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.4.0.tgz#c1eb4c89a209263f8717c782591523913ede2561" - integrity sha512-X51Lte1gCYUdlwhF28+2YMO0U6WeN0GLpgpA7LK7mbdDnkQYiwvEpmpe0F/cv5L14EbxgrdayAG3JETBv0dbXA== - -regjsparser@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.3.0.tgz#3c326da7fcfd69fa0d332575a41c8c0cdf588c96" - integrity sha512-zza72oZBBHzt64G7DxdqrOo/30bhHkwMUoT0WqfGu98XLd7N+1tsy5MJ96Bk4MD0y74n629RhmrGW6XlnLLwCA== - dependencies: - jsesc "~0.5.0" - -remove-trailing-separator@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" - integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= - -repeat-element@^1.1.2: - version "1.1.3" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" - integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== - -repeat-string@^1.5.2, repeat-string@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= - -repeating@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" - integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= - dependencies: - is-finite "^1.0.0" - -request-promise-core@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.1.tgz#3eee00b2c5aa83239cfb04c5700da36f81cd08b6" - integrity sha1-Pu4AssWqgyOc+wTFcA2jb4HNCLY= - dependencies: - lodash "^4.13.1" - -request-promise-native@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.5.tgz#5281770f68e0c9719e5163fd3fab482215f4fda5" - integrity sha1-UoF3D2jgyXGeUWP9P6tIIhX0/aU= - dependencies: - request-promise-core "1.1.1" - stealthy-require "^1.1.0" - tough-cookie ">=2.3.3" - -request@^2.87.0: - version "2.88.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" - integrity sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg== - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.8.0" - caseless "~0.12.0" - combined-stream "~1.0.6" - extend "~3.0.2" - forever-agent "~0.6.1" - form-data "~2.3.2" - har-validator "~5.1.0" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.19" - oauth-sign "~0.9.0" - performance-now "^2.1.0" - qs "~6.5.2" - safe-buffer "^5.1.2" - tough-cookie "~2.4.3" - tunnel-agent "^0.6.0" - uuid "^3.3.2" - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= - -require-main-filename@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" - integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= - -resolve-cwd@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" - integrity sha1-AKn3OHVW4nA46uIyyqNypqWbZlo= - dependencies: - resolve-from "^3.0.0" - -resolve-from@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" - integrity sha1-six699nWiBvItuZTM17rywoYh0g= - -resolve-url@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" - integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= - -resolve@1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" - integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= - -resolve@^1.3.2, resolve@^1.5.0, resolve@^1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" - integrity sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA== - dependencies: - path-parse "^1.0.5" - -restore-cursor@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" - integrity sha1-n37ih/gv0ybU/RYpI9YhKe7g368= - dependencies: - onetime "^2.0.0" - signal-exit "^3.0.2" - -ret@~0.1.10: - version "0.1.15" - resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" - integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== - -rimraf@^2.5.4, rimraf@^2.6.1: - version "2.6.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" - integrity sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w== - dependencies: - glob "^7.0.5" - -rimraf@~2.2.6: - version "2.2.8" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.2.8.tgz#e439be2aaee327321952730f99a8929e4fc50582" - integrity sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI= - -rsvp@^3.3.3: - version "3.6.2" - resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-3.6.2.tgz#2e96491599a96cde1b515d5674a8f7a91452926a" - integrity sha512-OfWGQTb9vnwRjwtA2QwpG2ICclHC3pgXZO5xt8H2EfgDquO0qVdSb5T88L4qJVAEugbS56pAuV4XZM58UX8ulw== - -run-async@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" - integrity sha1-A3GrSuC91yDUFm19/aZP96RFpsA= - dependencies: - is-promise "^2.1.0" - -rx-lite-aggregates@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be" - integrity sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74= - dependencies: - rx-lite "*" - -rx-lite@*, rx-lite@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" - integrity sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ= - -safe-buffer@5.1.2, safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -safe-regex@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" - integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= - dependencies: - ret "~0.1.10" - -"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -sane@^2.0.0: - version "2.5.2" - resolved "https://registry.yarnpkg.com/sane/-/sane-2.5.2.tgz#b4dc1861c21b427e929507a3e751e2a2cb8ab3fa" - integrity sha1-tNwYYcIbQn6SlQej51HiosuKs/o= - dependencies: - anymatch "^2.0.0" - capture-exit "^1.2.0" - exec-sh "^0.2.0" - fb-watchman "^2.0.0" - micromatch "^3.1.4" - minimist "^1.1.1" - walker "~1.0.5" - watch "~0.18.0" - optionalDependencies: - fsevents "^1.2.3" - -sax@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" - integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== - -sax@~1.1.1: - version "1.1.6" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.1.6.tgz#5d616be8a5e607d54e114afae55b7eaf2fcc3240" - integrity sha1-XWFr6KXmB9VOEUr65Vt+ry/MMkA= - -schedule@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/schedule/-/schedule-0.3.0.tgz#1be2ab2fc2e768536269ce7326efb478d6c045e8" - integrity sha512-20+1KVo517sR7Nt+bYBN8a+bEJDKLPEx7Ohtts1kX05E4/HY53YUNuhfkVNItmWAnBYHcpG9vsd2/CJxG+aPCQ== - dependencies: - object-assign "^4.1.1" - -"semver@2 || 3 || 4 || 5", semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1: - version "5.6.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" - integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== - -send@0.16.2: - version "0.16.2" - resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1" - integrity sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw== - dependencies: - debug "2.6.9" - depd "~1.1.2" - destroy "~1.0.4" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "~1.6.2" - mime "1.4.1" - ms "2.0.0" - on-finished "~2.3.0" - range-parser "~1.2.0" - statuses "~1.4.0" - -serialize-error@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/serialize-error/-/serialize-error-2.1.0.tgz#50b679d5635cdf84667bdc8e59af4e5b81d5f60a" - integrity sha1-ULZ51WNc34Rme9yOWa9OW4HV9go= - -serve-static@^1.13.1: - version "1.13.2" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.2.tgz#095e8472fd5b46237db50ce486a43f4b86c6cec1" - integrity sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw== - dependencies: - encodeurl "~1.0.2" - escape-html "~1.0.3" - parseurl "~1.3.2" - send "0.16.2" - -set-blocking@^2.0.0, set-blocking@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= - -set-value@^0.4.3: - version "0.4.3" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" - integrity sha1-fbCPnT0i3H945Trzw79GZuzfzPE= - dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.1" - to-object-path "^0.3.0" - -set-value@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274" - integrity sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg== - dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.3" - split-string "^3.0.1" - -setimmediate@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" - integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= - -setprototypeof@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" - integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== - -shebang-command@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" - integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= - dependencies: - shebang-regex "^1.0.0" - -shebang-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" - integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= - -shell-quote@1.6.1, shell-quote@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.6.1.tgz#f4781949cce402697127430ea3b3c5476f481767" - integrity sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c= - dependencies: - array-filter "~0.0.0" - array-map "~0.0.0" - array-reduce "~0.0.0" - jsonify "~0.0.0" - -shellwords@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" - integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww== - -signal-exit@^3.0.0, signal-exit@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" - integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= - -simple-plist@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/simple-plist/-/simple-plist-0.2.1.tgz#71766db352326928cf3a807242ba762322636723" - integrity sha1-cXZts1IyaSjPOoByQrp2IyJjZyM= - dependencies: - bplist-creator "0.0.7" - bplist-parser "0.1.1" - plist "2.0.1" - -sisteransi@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-0.1.1.tgz#5431447d5f7d1675aac667ccd0b865a4994cb3ce" - integrity sha512-PmGOd02bM9YO5ifxpw36nrNMBTptEtfRl4qUYl9SndkolplkrZZOW7PGHjrZL53QvMVj9nQ+TKqUnRsw4tJa4g== - -slash@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" - integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU= - -slide@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707" - integrity sha1-VusCfWW00tzmyy4tMsTUr8nh1wc= - -snapdragon-node@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" - integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== - dependencies: - define-property "^1.0.0" - isobject "^3.0.0" - snapdragon-util "^3.0.1" - -snapdragon-util@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" - integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== - dependencies: - kind-of "^3.2.0" - -snapdragon@^0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" - integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== - dependencies: - base "^0.11.1" - debug "^2.2.0" - define-property "^0.2.5" - extend-shallow "^2.0.1" - map-cache "^0.2.2" - source-map "^0.5.6" - source-map-resolve "^0.5.0" - use "^3.1.0" - -source-map-resolve@^0.5.0: - version "0.5.2" - resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259" - integrity sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA== - dependencies: - atob "^2.1.1" - decode-uri-component "^0.2.0" - resolve-url "^0.2.1" - source-map-url "^0.4.0" - urix "^0.1.0" - -source-map-support@^0.4.15: - version "0.4.18" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" - integrity sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA== - dependencies: - source-map "^0.5.6" - -source-map-support@^0.5.6, source-map-support@^0.5.9: - version "0.5.9" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.9.tgz#41bc953b2534267ea2d605bccfa7bfa3111ced5f" - integrity sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map-url@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" - integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= - -source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= - -source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -spdx-correct@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.0.2.tgz#19bb409e91b47b1ad54159243f7312a858db3c2e" - integrity sha512-q9hedtzyXHr5S0A1vEPoK/7l8NpfkFYTq6iCY+Pno2ZbdZR6WexZFtqeVGkGxW3TEJMN914Z55EnAGMmenlIQQ== - dependencies: - spdx-expression-parse "^3.0.0" - spdx-license-ids "^3.0.0" - -spdx-exceptions@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977" - integrity sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA== - -spdx-expression-parse@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" - integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== - dependencies: - spdx-exceptions "^2.1.0" - spdx-license-ids "^3.0.0" - -spdx-license-ids@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.1.tgz#e2a303236cac54b04031fa7a5a79c7e701df852f" - integrity sha512-TfOfPcYGBB5sDuPn3deByxPhmfegAhpDYKSOXZQN81Oyrrif8ZCodOLzK3AesELnCx03kikhyDwh0pfvvQvF8w== - -split-string@^3.0.1, split-string@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" - integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== - dependencies: - extend-shallow "^3.0.0" - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= - -sshpk@^1.7.0: - version "1.14.2" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.2.tgz#c6fc61648a3d9c4e764fd3fcdf4ea105e492ba98" - integrity sha1-xvxhZIo9nE52T9P8306hBeSSupg= - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - dashdash "^1.12.0" - getpass "^0.1.1" - safer-buffer "^2.0.2" - optionalDependencies: - bcrypt-pbkdf "^1.0.0" - ecc-jsbn "~0.1.1" - jsbn "~0.1.0" - tweetnacl "~0.14.0" - -stack-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.1.tgz#d4f33ab54e8e38778b0ca5cfd3b3afb12db68620" - integrity sha1-1PM6tU6OOHeLDKXP07OvsS22hiA= - -stacktrace-parser@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/stacktrace-parser/-/stacktrace-parser-0.1.4.tgz#01397922e5f62ecf30845522c95c4fe1d25e7d4e" - integrity sha1-ATl5IuX2Ls8whFUiyVxP4dJefU4= - -static-extend@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" - integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= - dependencies: - define-property "^0.2.5" - object-copy "^0.1.0" - -"statuses@>= 1.4.0 < 2": - version "1.5.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" - integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= - -statuses@~1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" - integrity sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4= - -statuses@~1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" - integrity sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew== - -stealthy-require@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" - integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks= - -stream-buffers@~2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/stream-buffers/-/stream-buffers-2.2.0.tgz#91d5f5130d1cef96dcfa7f726945188741d09ee4" - integrity sha1-kdX1Ew0c75bc+n9yaUUYh0HQnuQ= - -string-length@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/string-length/-/string-length-2.0.0.tgz#d40dbb686a3ace960c1cffca562bf2c45f8363ed" - integrity sha1-1A27aGo6zpYMHP/KVivyxF+DY+0= - dependencies: - astral-regex "^1.0.0" - strip-ansi "^4.0.0" - -string-width@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" - integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - strip-ansi "^3.0.0" - -"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - -strip-ansi@^3.0.0, strip-ansi@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= - dependencies: - ansi-regex "^2.0.0" - -strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= - dependencies: - ansi-regex "^3.0.0" - -strip-bom@3.0.0, strip-bom@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" - integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= - -strip-bom@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" - integrity sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4= - dependencies: - is-utf8 "^0.2.0" - -strip-eof@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" - integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= - -strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= - -styled-components@^3.4.10: - version "3.4.10" - resolved "https://registry.yarnpkg.com/styled-components/-/styled-components-3.4.10.tgz#9a654c50ea2b516c36ade57ddcfa296bf85c96e1" - integrity sha512-TA8ip8LoILgmSAFd3r326pKtXytUUGu5YWuqZcOQVwVVwB6XqUMn4MHW2IuYJ/HAD81jLrdQed8YWfLSG1LX4Q== - dependencies: - buffer "^5.0.3" - css-to-react-native "^2.0.3" - fbjs "^0.8.16" - hoist-non-react-statics "^2.5.0" - prop-types "^15.5.4" - react-is "^16.3.1" - stylis "^3.5.0" - stylis-rule-sheet "^0.0.10" - supports-color "^3.2.3" - -stylis-rule-sheet@^0.0.10: - version "0.0.10" - resolved "https://registry.yarnpkg.com/stylis-rule-sheet/-/stylis-rule-sheet-0.0.10.tgz#44e64a2b076643f4b52e5ff71efc04d8c3c4a430" - integrity sha512-nTbZoaqoBnmK+ptANthb10ZRZOGC+EmTLLUxeYIuHNkEKcmKgXX1XWKkUBT2Ac4es3NybooPe0SmvKdhKJZAuw== - -stylis@^3.5.0: - version "3.5.3" - resolved "https://registry.yarnpkg.com/stylis/-/stylis-3.5.3.tgz#99fdc46afba6af4deff570825994181a5e6ce546" - integrity sha512-TxU0aAscJghF9I3V9q601xcK3Uw1JbXvpsBGj/HULqexKOKlOEzzlIpLFRbKkCK990ccuxfXUqmPbIIo7Fq/cQ== - -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= - -supports-color@^3.1.2, supports-color@^3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" - integrity sha1-ZawFBLOVQXHYpklGsq48u4pfVPY= - dependencies: - has-flag "^1.0.0" - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -symbol-tree@^3.2.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" - integrity sha1-rifbOPZgp64uHDt9G8KQgZuFGeY= - -tar@^4: - version "4.4.6" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.6.tgz#63110f09c00b4e60ac8bcfe1bf3c8660235fbc9b" - integrity sha512-tMkTnh9EdzxyfW+6GK6fCahagXsnYk6kE6S9Gr9pjVdys769+laCTbodXDhPAjzVtEBazRgP0gYqOjnk9dQzLg== - dependencies: - chownr "^1.0.1" - fs-minipass "^1.2.5" - minipass "^2.3.3" - minizlib "^1.1.0" - mkdirp "^0.5.0" - safe-buffer "^5.1.2" - yallist "^3.0.2" - -temp@0.8.3: - version "0.8.3" - resolved "https://registry.yarnpkg.com/temp/-/temp-0.8.3.tgz#e0c6bc4d26b903124410e4fed81103014dfc1f59" - integrity sha1-4Ma8TSa5AxJEEOT+2BEDAU38H1k= - dependencies: - os-tmpdir "^1.0.0" - rimraf "~2.2.6" - -test-exclude@^4.2.1: - version "4.2.3" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.2.3.tgz#a9a5e64474e4398339245a0a769ad7c2f4a97c20" - integrity sha512-SYbXgY64PT+4GAL2ocI3HwPa4Q4TBKm0cwAVeKOt/Aoc0gSpNRjJX8w0pA1LMKZ3LBmd8pYBqApFNQLII9kavA== - dependencies: - arrify "^1.0.1" - micromatch "^2.3.11" - object-assign "^4.1.0" - read-pkg-up "^1.0.1" - require-main-filename "^1.0.1" - -throat@^4.0.0, throat@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a" - integrity sha1-iQN8vJLFarGJJua6TLsgDhVnKmo= - -through2@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" - integrity sha1-AARWmzfHx0ujnEPzzteNGtlBQL4= - dependencies: - readable-stream "^2.1.5" - xtend "~4.0.1" - -through@^2.3.6: - version "2.3.8" - resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= - -time-stamp@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.1.0.tgz#764a5a11af50561921b133f3b44e618687e0f5c3" - integrity sha1-dkpaEa9QVhkhsTPztE5hhofg9cM= - -tmp@^0.0.33: - version "0.0.33" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" - integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== - dependencies: - os-tmpdir "~1.0.2" - -tmpl@1.0.x: - version "1.0.4" - resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" - integrity sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE= - -to-fast-properties@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" - integrity sha1-uDVx+k2MJbguIxsG46MFXeTKGkc= - -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" - integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= - -to-object-path@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" - integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= - dependencies: - kind-of "^3.0.2" - -to-regex-range@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" - integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= - dependencies: - is-number "^3.0.0" - repeat-string "^1.6.1" - -to-regex@^3.0.1, to-regex@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" - integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== - dependencies: - define-property "^2.0.2" - extend-shallow "^3.0.2" - regex-not "^1.0.2" - safe-regex "^1.1.0" - -tough-cookie@>=2.3.3, tough-cookie@^2.3.4, tough-cookie@~2.4.3: - version "2.4.3" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" - integrity sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ== - dependencies: - psl "^1.1.24" - punycode "^1.4.1" - -tr46@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" - integrity sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk= - dependencies: - punycode "^2.1.0" - -trim-right@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" - integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= - -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= - dependencies: - safe-buffer "^5.0.1" - -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= - -type-check@~0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" - integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= - dependencies: - prelude-ls "~1.1.2" - -typedarray@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" - integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= - -ua-parser-js@^0.7.18: - version "0.7.18" - resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.18.tgz#a7bfd92f56edfb117083b69e31d2aa8882d4b1ed" - integrity sha512-LtzwHlVHwFGTptfNSgezHp7WUlwiqb0gA9AALRbKaERfxwJoiX0A73QbTToxteIAuIaFshhgIZfqK8s7clqgnA== - -uglify-es@^3.1.9: - version "3.3.9" - resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.9.tgz#0c1c4f0700bed8dbc124cdb304d2592ca203e677" - integrity sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ== - dependencies: - commander "~2.13.0" - source-map "~0.6.1" - -uglify-js@^3.1.4: - version "3.4.9" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.4.9.tgz#af02f180c1207d76432e473ed24a28f4a782bae3" - integrity sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q== - dependencies: - commander "~2.17.1" - source-map "~0.6.1" - -ultron@1.0.x: - version "1.0.2" - resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.0.2.tgz#ace116ab557cd197386a4e88f4685378c8b2e4fa" - integrity sha1-rOEWq1V80Zc4ak6I9GhTeMiy5Po= - -ultron@~1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c" - integrity sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og== - -unicode-canonical-property-names-ecmascript@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" - integrity sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ== - -unicode-match-property-ecmascript@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz#8ed2a32569961bce9227d09cd3ffbb8fed5f020c" - integrity sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg== - dependencies: - unicode-canonical-property-names-ecmascript "^1.0.4" - unicode-property-aliases-ecmascript "^1.0.4" - -unicode-match-property-value-ecmascript@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.0.2.tgz#9f1dc76926d6ccf452310564fd834ace059663d4" - integrity sha512-Rx7yODZC1L/T8XKo/2kNzVAQaRE88AaMvI1EF/Xnj3GW2wzN6fop9DDWuFAKUVFH7vozkz26DzP0qyWLKLIVPQ== - -unicode-property-aliases-ecmascript@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.4.tgz#5a533f31b4317ea76f17d807fa0d116546111dd0" - integrity sha512-2WSLa6OdYd2ng8oqiGIWnJqyFArvhn+5vgx5GTxMbUYjCYKUcuKS62YLFF0R/BDGlB1yzXjQOLtPAfHsgirEpg== - -union-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" - integrity sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ= - dependencies: - arr-union "^3.1.0" - get-value "^2.0.6" - is-extendable "^0.1.1" - set-value "^0.4.3" - -unpipe@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= - -unset-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" - integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= - dependencies: - has-value "^0.3.1" - isobject "^3.0.0" - -urix@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" - integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= - -use@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" - integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== - -util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= - -util.promisify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030" - integrity sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA== - dependencies: - define-properties "^1.1.2" - object.getownpropertydescriptors "^2.0.3" - -utils-merge@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= - -uuid@3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1" - integrity sha1-ZUS7ot/ajBzxfmKaOjBeK7H+5sE= - -uuid@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" - integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== - -validate-npm-package-license@^3.0.1: - version "3.0.4" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" - integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== - dependencies: - spdx-correct "^3.0.0" - spdx-expression-parse "^3.0.0" - -vary@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= - -verror@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" - integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= - dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" - -w3c-hr-time@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz#82ac2bff63d950ea9e3189a58a65625fedf19045" - integrity sha1-gqwr/2PZUOqeMYmlimViX+3xkEU= - dependencies: - browser-process-hrtime "^0.1.2" - -walker@~1.0.5: - version "1.0.7" - resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" - integrity sha1-L3+bj9ENZ3JisYqITijRlhjgKPs= - dependencies: - makeerror "1.0.x" - -watch@~0.18.0: - version "0.18.0" - resolved "https://registry.yarnpkg.com/watch/-/watch-0.18.0.tgz#28095476c6df7c90c963138990c0a5423eb4b986" - integrity sha1-KAlUdsbffJDJYxOJkMClQj60uYY= - dependencies: - exec-sh "^0.2.0" - minimist "^1.2.0" - -webidl-conversions@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" - integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== - -whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3: - version "1.0.5" - resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0" - integrity sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw== - dependencies: - iconv-lite "0.4.24" - -whatwg-fetch@>=0.10.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz#fc804e458cc460009b1a2b966bc8817d2578aefb" - integrity sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q== - -whatwg-mimetype@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.2.0.tgz#a3d58ef10b76009b042d03e25591ece89b88d171" - integrity sha512-5YSO1nMd5D1hY3WzAQV3PzZL83W3YeyR1yW9PcH26Weh1t+Vzh9B6XkDh7aXm83HBZ4nSMvkjvN2H2ySWIvBgw== - -whatwg-url@^6.4.1: - version "6.5.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.5.0.tgz#f2df02bff176fd65070df74ad5ccbb5a199965a8" - integrity sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ== - dependencies: - lodash.sortby "^4.7.0" - tr46 "^1.0.1" - webidl-conversions "^4.0.2" - -whatwg-url@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.0.0.tgz#fde926fa54a599f3adf82dff25a9f7be02dc6edd" - integrity sha512-37GeVSIJ3kn1JgKyjiYNmSLP1yzbpb29jdmwBSgkD9h40/hyrR/OifpVUndji3tmwGgD8qpw7iQu3RSbCrBpsQ== - dependencies: - lodash.sortby "^4.7.0" - tr46 "^1.0.1" - webidl-conversions "^4.0.2" - -which-module@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" - integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= - -which@^1.2.12, which@^1.2.9, which@^1.3.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" - integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== - dependencies: - isexe "^2.0.0" - -wide-align@^1.1.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" - integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== - dependencies: - string-width "^1.0.2 || 2" - -wordwrap@^1.0.0, wordwrap@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" - integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= - -wordwrap@~0.0.2: - version "0.0.3" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" - integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc= - -wrap-ansi@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" - integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU= - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= - -write-file-atomic@^1.2.0: - version "1.3.4" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-1.3.4.tgz#f807a4f0b1d9e913ae7a48112e6cc3af1991b45f" - integrity sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8= - dependencies: - graceful-fs "^4.1.11" - imurmurhash "^0.1.4" - slide "^1.1.5" - -write-file-atomic@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.3.0.tgz#1ff61575c2e2a4e8e510d6fa4e243cce183999ab" - integrity sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA== - dependencies: - graceful-fs "^4.1.11" - imurmurhash "^0.1.4" - signal-exit "^3.0.2" - -ws@^1.1.0: - version "1.1.5" - resolved "https://registry.yarnpkg.com/ws/-/ws-1.1.5.tgz#cbd9e6e75e09fc5d2c90015f21f0c40875e0dd51" - integrity sha512-o3KqipXNUdS7wpQzBHSe180lBGO60SoK0yVo3CYJgb2MkobuWuBX6dhkYP5ORCLd55y+SaflMOV5fqAB53ux4w== - dependencies: - options ">=0.0.5" - ultron "1.0.x" - -ws@^3.3.1: - version "3.3.3" - resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2" - integrity sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA== - dependencies: - async-limiter "~1.0.0" - safe-buffer "~5.1.0" - ultron "~1.1.0" - -ws@^5.2.0: - version "5.2.2" - resolved "https://registry.yarnpkg.com/ws/-/ws-5.2.2.tgz#dffef14866b8e8dc9133582514d1befaf96e980f" - integrity sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA== - dependencies: - async-limiter "~1.0.0" - -xcode@^0.9.1: - version "0.9.3" - resolved "https://registry.yarnpkg.com/xcode/-/xcode-0.9.3.tgz#910a89c16aee6cc0b42ca805a6d0b4cf87211cf3" - integrity sha1-kQqJwWrubMC0LKgFptC0z4chHPM= - dependencies: - pegjs "^0.10.0" - simple-plist "^0.2.1" - uuid "3.0.1" - -xml-name-validator@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" - integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw== - -xmlbuilder@8.2.2: - version "8.2.2" - resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-8.2.2.tgz#69248673410b4ba42e1a6136551d2922335aa773" - integrity sha1-aSSGc0ELS6QuGmE2VR0pIjNap3M= - -xmlbuilder@^9.0.7: - version "9.0.7" - resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d" - integrity sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0= - -xmldoc@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/xmldoc/-/xmldoc-0.4.0.tgz#d257224be8393eaacbf837ef227fd8ec25b36888" - integrity sha1-0lciS+g5PqrL+DfvIn/Y7CWzaIg= - dependencies: - sax "~1.1.1" - -xmldom@0.1.x: - version "0.1.27" - resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.1.27.tgz#d501f97b3bdb403af8ef9ecc20573187aadac0e9" - integrity sha1-1QH5ezvbQDr4757MIFcxh6rawOk= - -xpipe@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/xpipe/-/xpipe-1.0.5.tgz#8dd8bf45fc3f7f55f0e054b878f43a62614dafdf" - integrity sha1-jdi/Rfw/f1Xw4FS4ePQ6YmFNr98= - -xtend@~4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" - integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68= - -y18n@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" - integrity sha1-bRX7qITAhnnA136I53WegR4H+kE= - -yallist@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" - integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= - -yallist@^3.0.0, yallist@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.2.tgz#8452b4bb7e83c7c188d8041c1a837c773d6d8bb9" - integrity sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k= - -yargs-parser@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9" - integrity sha1-jQrELxbqVd69MyyvTEA4s+P139k= - dependencies: - camelcase "^4.1.0" - -yargs-parser@^9.0.2: - version "9.0.2" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-9.0.2.tgz#9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077" - integrity sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc= - dependencies: - camelcase "^4.1.0" - -yargs@^11.0.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.1.0.tgz#90b869934ed6e871115ea2ff58b03f4724ed2d77" - integrity sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A== - dependencies: - cliui "^4.0.0" - decamelize "^1.1.1" - find-up "^2.1.0" - get-caller-file "^1.0.1" - os-locale "^2.0.0" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^2.0.0" - which-module "^2.0.0" - y18n "^3.2.1" - yargs-parser "^9.0.2" - -yargs@^9.0.0: - version "9.0.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-9.0.1.tgz#52acc23feecac34042078ee78c0c007f5085db4c" - integrity sha1-UqzCP+7Kw0BCB47njAwAf1CF20w= - dependencies: - camelcase "^4.1.0" - cliui "^3.2.0" - decamelize "^1.1.1" - get-caller-file "^1.0.1" - os-locale "^2.0.0" - read-pkg-up "^2.0.0" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^2.0.0" - which-module "^2.0.0" - y18n "^3.2.1" - yargs-parser "^7.0.0" diff --git a/Example/iOSPodsExample/.buckconfig b/Example/iOSPodsExample/.buckconfig deleted file mode 100644 index 934256cb..00000000 --- a/Example/iOSPodsExample/.buckconfig +++ /dev/null @@ -1,6 +0,0 @@ - -[android] - target = Google Inc.:Google APIs:23 - -[maven_repositories] - central = https://repo1.maven.org/maven2 diff --git a/Example/iOSPodsExample/.flowconfig b/Example/iOSPodsExample/.flowconfig deleted file mode 100644 index 47d80d95..00000000 --- a/Example/iOSPodsExample/.flowconfig +++ /dev/null @@ -1,69 +0,0 @@ -[ignore] -; We fork some components by platform -.*/*[.]android.js - -; Ignore "BUCK" generated dirs -/\.buckd/ - -; Ignore unexpected extra "@providesModule" -.*/node_modules/.*/node_modules/fbjs/.* - -; Ignore duplicate module providers -; For RN Apps installed via npm, "Libraries" folder is inside -; "node_modules/react-native" but in the source repo it is in the root -.*/Libraries/react-native/React.js - -; Ignore polyfills -.*/Libraries/polyfills/.* - -; Ignore metro -.*/node_modules/metro/.* - -[include] - -[libs] -node_modules/react-native/Libraries/react-native/react-native-interface.js -node_modules/react-native/flow/ - -[options] -emoji=true - -esproposal.optional_chaining=enable -esproposal.nullish_coalescing=enable - -module.system=haste -module.system.haste.use_name_reducers=true -# get basename -module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1' -# strip .js or .js.flow suffix -module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1' -# strip .ios suffix -module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1' -module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1' -module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1' -module.system.haste.paths.blacklist=.*/__tests__/.* -module.system.haste.paths.blacklist=.*/__mocks__/.* -module.system.haste.paths.blacklist=/node_modules/react-native/Libraries/Animated/src/polyfills/.* -module.system.haste.paths.whitelist=/node_modules/react-native/Libraries/.* - -munge_underscores=true - -module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub' - -module.file_ext=.js -module.file_ext=.jsx -module.file_ext=.json -module.file_ext=.native.js - -suppress_type=$FlowIssue -suppress_type=$FlowFixMe -suppress_type=$FlowFixMeProps -suppress_type=$FlowFixMeState - -suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) -suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ -suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy -suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError - -[version] -^0.92.0 diff --git a/Example/iOSPodsExample/.gitattributes b/Example/iOSPodsExample/.gitattributes deleted file mode 100644 index d42ff183..00000000 --- a/Example/iOSPodsExample/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -*.pbxproj -text diff --git a/Example/iOSPodsExample/.gitignore b/Example/iOSPodsExample/.gitignore deleted file mode 100644 index 5d647565..00000000 --- a/Example/iOSPodsExample/.gitignore +++ /dev/null @@ -1,56 +0,0 @@ -# OSX -# -.DS_Store - -# Xcode -# -build/ -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata -*.xccheckout -*.moved-aside -DerivedData -*.hmap -*.ipa -*.xcuserstate -project.xcworkspace - -# Android/IntelliJ -# -build/ -.idea -.gradle -local.properties -*.iml - -# node.js -# -node_modules/ -npm-debug.log -yarn-error.log - -# BUCK -buck-out/ -\.buckd/ -*.keystore - -# fastlane -# -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the -# screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://docs.fastlane.tools/best-practices/source-control/ - -*/fastlane/report.xml -*/fastlane/Preview.html -*/fastlane/screenshots - -# Bundle artifact -*.jsbundle diff --git a/Example/iOSPodsExample/.watchmanconfig b/Example/iOSPodsExample/.watchmanconfig deleted file mode 100644 index 9e26dfee..00000000 --- a/Example/iOSPodsExample/.watchmanconfig +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/Example/iOSPodsExample/App.js b/Example/iOSPodsExample/App.js deleted file mode 100644 index 87f46752..00000000 --- a/Example/iOSPodsExample/App.js +++ /dev/null @@ -1,132 +0,0 @@ -import React, { Component } from 'react'; -import { UIManager, LayoutAnimation, Alert } from 'react-native'; -import { authorize, refresh, revoke } from 'react-native-app-auth'; -import { Page, Button, ButtonContainer, Form, Heading } from './components'; - -UIManager.setLayoutAnimationEnabledExperimental && - UIManager.setLayoutAnimationEnabledExperimental(true); - -type State = { - hasLoggedInOnce: boolean, - accessToken: ?string, - accessTokenExpirationDate: ?string, - refreshToken: ?string, -}; - -const config = { - issuer: 'https://demo.identityserver.io', - clientId: 'native.code', - redirectUrl: 'io.identityserver.demo:/oauthredirect', - additionalParameters: {}, - scopes: ['openid', 'profile', 'email', 'offline_access'] - - // serviceConfiguration: { - // authorizationEndpoint: 'https://demo.identityserver.io/connect/authorize', - // tokenEndpoint: 'https://demo.identityserver.io/connect/token', - // revocationEndpoint: 'https://demo.identityserver.io/connect/revoke' - // } -}; - -export default class App extends Component<{}, State> { - state = { - hasLoggedInOnce: false, - accessToken: '', - accessTokenExpirationDate: '', - refreshToken: '', - }; - - animateState(nextState: $Shape, delay: number = 0) { - setTimeout(() => { - this.setState(() => { - LayoutAnimation.easeInEaseOut(); - return nextState; - }); - }, delay); - } - - authorize = async () => { - try { - const authState = await authorize(config); - - this.animateState( - { - hasLoggedInOnce: true, - accessToken: authState.accessToken, - accessTokenExpirationDate: authState.accessTokenExpirationDate, - refreshToken: authState.refreshToken, - scopes: authState.scopes, - }, - 500 - ); - } catch (error) { - Alert.alert('Failed to log in', error.message); - } - }; - - refresh = async () => { - try { - const authState = await refresh(config, { - refreshToken: this.state.refreshToken, - }); - - this.animateState({ - accessToken: authState.accessToken || this.state.accessToken, - accessTokenExpirationDate: - authState.accessTokenExpirationDate || this.state.accessTokenExpirationDate, - refreshToken: authState.refreshToken || this.state.refreshToken, - }); - } catch (error) { - Alert.alert('Failed to refresh token', error.message); - } - }; - - revoke = async () => { - try { - await revoke(config, { - tokenToRevoke: this.state.accessToken, - sendClientId: true, - }); - this.animateState({ - accessToken: '', - accessTokenExpirationDate: '', - refreshToken: '', - }); - } catch (error) { - Alert.alert('Failed to revoke token', error.message); - } - }; - - render() { - const { state } = this; - return ( - - {!!state.accessToken ? ( -
- accessToken - {state.accessToken} - accessTokenExpirationDate - {state.accessTokenExpirationDate} - refreshToken - {state.refreshToken} - scopes - {state.scopes.join(', ')} -
- ) : ( - {state.hasLoggedInOnce ? 'Goodbye.' : 'Hello, stranger.'} - )} - - - {!state.accessToken ? ( -