Skip to content

Commit

Permalink
Merge branch 'pr/91'
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpassos committed Oct 4, 2019
2 parents c0e4634 + 286f053 commit 47a993a
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 85 deletions.
57 changes: 15 additions & 42 deletions AeroGearOAuth2.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@
4833045E19AF1635002F8DA9 /* Frameworks */,
4833045F19AF1635002F8DA9 /* Headers */,
4833046019AF1635002F8DA9 /* Resources */,
7BA5AFF5C6DA9134893CDFC3 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand All @@ -261,7 +260,6 @@
4833046B19AF1635002F8DA9 /* Resources */,
6F1432B31A16857C003BEE5B /* Copy Frameworks */,
81DD998A611C4EAF191D8BE0 /* [CP] Embed Pods Frameworks */,
8C9D4DEB6C7183EC37B53099 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand All @@ -280,7 +278,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0700;
LastUpgradeCheck = 0900;
LastUpgradeCheck = 1100;
ORGANIZATIONNAME = aerogear;
TargetAttributes = {
4833046119AF1635002F8DA9 = {
Expand All @@ -289,7 +287,7 @@
};
4833046C19AF1635002F8DA9 = {
CreatedOnToolsVersion = 6.0;
LastSwiftMigration = 0900;
LastSwiftMigration = 1100;
};
};
};
Expand All @@ -298,6 +296,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = 4833045819AF1635002F8DA9;
Expand Down Expand Up @@ -347,54 +346,22 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/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# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
7BA5AFF5C6DA9134893CDFC3 /* [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-AeroGearOAuth2/Pods-AeroGearOAuth2-resources.sh\"\n";
showEnvVarsInLog = 0;
};
81DD998A611C4EAF191D8BE0 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-AeroGearOAuth2Tests/Pods-AeroGearOAuth2Tests-frameworks.sh",
"${PODS_ROOT}/Target Support Files/Pods-AeroGearOAuth2Tests/Pods-AeroGearOAuth2Tests-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/OHHTTPStubs/OHHTTPStubs.framework",
"${BUILT_PRODUCTS_DIR}/AeroGearHttp/AeroGearHttp.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OHHTTPStubs.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AeroGearHttp.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-AeroGearOAuth2Tests/Pods-AeroGearOAuth2Tests-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
8C9D4DEB6C7183EC37B53099 /* [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-AeroGearOAuth2Tests/Pods-AeroGearOAuth2Tests-resources.sh\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-AeroGearOAuth2Tests/Pods-AeroGearOAuth2Tests-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
FE44ED274111AE8BBB6AE3E2 /* [CP] Check Pods Manifest.lock */ = {
Expand Down Expand Up @@ -469,6 +436,7 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)";
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand All @@ -477,12 +445,14 @@
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;
Expand Down Expand Up @@ -528,6 +498,7 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)";
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand All @@ -536,12 +507,14 @@
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;
Expand Down Expand Up @@ -594,7 +567,7 @@
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -616,7 +589,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand All @@ -637,7 +610,7 @@
SWIFT_OBJC_BRIDGING_HEADER = "";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -653,7 +626,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0900"
LastUpgradeVersion = "1100"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,9 +26,17 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4833046119AF1635002F8DA9"
BuildableName = "AeroGearOAuth2.framework"
BlueprintName = "AeroGearOAuth2"
ReferencedContainer = "container:AeroGearOAuth2.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
Expand All @@ -41,23 +49,11 @@
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4833046119AF1635002F8DA9"
BuildableName = "AeroGearOAuth2.framework"
BlueprintName = "AeroGearOAuth2"
ReferencedContainer = "container:AeroGearOAuth2.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand All @@ -73,8 +69,6 @@
ReferencedContainer = "container:AeroGearOAuth2.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0900"
LastUpgradeVersion = "1100"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,8 +26,16 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4833046C19AF1635002F8DA9"
BuildableName = "AeroGearOAuth2Tests.xctest"
BlueprintName = "AeroGearOAuth2Tests"
ReferencedContainer = "container:AeroGearOAuth2.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
Expand All @@ -40,23 +48,11 @@
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4833046C19AF1635002F8DA9"
BuildableName = "AeroGearOAuth2Tests.xctest"
BlueprintName = "AeroGearOAuth2Tests"
ReferencedContainer = "container:AeroGearOAuth2.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand All @@ -72,8 +68,6 @@
ReferencedContainer = "container:AeroGearOAuth2.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
14 changes: 7 additions & 7 deletions AeroGearOAuth2/Config.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ open class Config {
/**
Applies the baseURL to the configuration.
*/
open let baseURL: String
public let baseURL: String

/**
Applies the "callback URL" once request token issued.
*/
open let redirectURL: String
public let redirectURL: String

/**
Applies the "authorization endpoint" to the request token.
Expand All @@ -44,17 +44,17 @@ open class Config {
/**
Endpoint for request to invalidate both accessToken and refreshToken.
*/
open let revokeTokenEndpoint: String?
public let revokeTokenEndpoint: String?

/**
Endpoint for request a refreshToken.
*/
open let refreshTokenEndpoint: String?
public let refreshTokenEndpoint: String?

/**
Endpoint for OpenID Connect to get user information.
*/
open let userInfoEndpoint: String?
public let userInfoEndpoint: String?

/**
Boolean to indicate whether OpenID Connect on authorization code grant flow is used.
Expand Down Expand Up @@ -84,12 +84,12 @@ open class Config {
/**
Applies the "client id" obtained with the client registration process.
*/
open let clientId: String
public let clientId: String

/**
Applies the "client secret" obtained with the client registration process.
*/
open let clientSecret: String?
public let clientSecret: String?

/**
Applies the "audience" obtained with the client registration process.
Expand Down
2 changes: 1 addition & 1 deletion AeroGearOAuth2/OAuth2Module.swift
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ open class OAuth2Module: AuthzModule {

func extractCode(_ notification: Notification, completionHandler: @escaping (AnyObject?, NSError?) -> Void) {
let info = notification.userInfo!
let url: URL? = info[UIApplicationLaunchOptionsKey.url] as? URL
let url: URL? = info[UIApplication.LaunchOptionsKey.url] as? URL

// extract the code from the URL
let queryParamsDict = self.parametersFrom(queryString: url?.query)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class OpenIDConnectFacebookOAuth2ModuleTests: XCTestCase {
let oauth2Module = AccountManager.addAccountWith(config: fbConfig, moduleClass: MyFacebookMockOAuth2ModuleSuccess.self)

oauth2Module.login {(accessToken: AnyObject?, claims: OpenIdClaim?, error: NSError?) in
var erroDict = (error?.userInfo)!
let erroDict = (error?.userInfo)!
let value = erroDict["OpenID Connect"] as! String
XCTAssertTrue( value == "No UserInfo endpoint available in config", "claim should be as mocked")
loginExpectation.fulfill()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class OpenIDConnectGoogleOAuth2ModuleTests: XCTestCase {
let oauth2Module = AccountManager.addAccountWith(config: googleConfig, moduleClass: MyMockOAuth2ModuleSuccess.self)

oauth2Module.login {(accessToken: AnyObject?, claims: OpenIdClaim?, error: NSError?) in
var erroDict = (error?.userInfo)!
let erroDict = (error?.userInfo)!
let value = erroDict["OpenID Connect"] as! String
XCTAssertTrue( value == "No UserInfo endpoint available in config", "claim should be as mocked")
loginExpectation.fulfill()
Expand Down
7 changes: 6 additions & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,15 @@ DEPENDENCIES:
- AeroGearHttp (= 2.0.0)
- OHHTTPStubs (= 5.2.2)

SPEC REPOS:
https://github.com/cocoapods/specs.git:
- AeroGearHttp
- OHHTTPStubs

SPEC CHECKSUMS:
AeroGearHttp: 65bf374aefd3521e1d8d33547e4db96047b745aa
OHHTTPStubs: 34d9d0994e64fcf8552dbfade5ce82ada913ee31

PODFILE CHECKSUM: 7b302d89355d58023f6fc008e933fbcf534556a8

COCOAPODS: 1.3.1
COCOAPODS: 1.7.4

3 comments on commit 47a993a

@siddhu-sm
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danielpassos Could you please release a new version of the merged code.

@danielpassos
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @SiddharthMurugaiyan I'm not part of the team anymore, maybe @secondsun or @ziccardi can help you!

@ziccardi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danielpassos @SiddharthMurugaiyan Published version 2.1.0
Thank you!

Please sign in to comment.