diff --git a/AlamofireOauth2.podspec b/AlamofireOauth2.podspec index fc4e761..fa8af19 100644 --- a/AlamofireOauth2.podspec +++ b/AlamofireOauth2.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| # s.name = "AlamofireOauth2" -s.version = "2.0.2" +s.version = "2.0.3" s.summary = "Oauth2 implementation using Alamofire" s.description = "A Swift implementation of Oauth2 using Alamofire" diff --git a/AlamofireOauth2.xcodeproj/project.pbxproj b/AlamofireOauth2.xcodeproj/project.pbxproj index 5eda411..3456d7b 100644 --- a/AlamofireOauth2.xcodeproj/project.pbxproj +++ b/AlamofireOauth2.xcodeproj/project.pbxproj @@ -168,7 +168,7 @@ TargetAttributes = { 7FD256B61B5707E500825BF1 = { CreatedOnToolsVersion = 6.4; - DevelopmentTeam = WTH4QGEA23; + DevelopmentTeam = 8829GZ84Q6; LastSwiftMigration = 0800; SystemCapabilities = { com.apple.SafariKeychain = { @@ -389,7 +389,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - DEVELOPMENT_TEAM = WTH4QGEA23; + DEVELOPMENT_TEAM = 8829GZ84Q6; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", @@ -410,7 +410,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - DEVELOPMENT_TEAM = WTH4QGEA23; + DEVELOPMENT_TEAM = 8829GZ84Q6; INFOPLIST_FILE = Oauth2Test/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = nl.evict.Oauth2Test.github; diff --git a/AlamofireOauth2.xcworkspace/xcuserdata/evermeer.xcuserdatad/UserInterfaceState.xcuserstate b/AlamofireOauth2.xcworkspace/xcuserdata/evermeer.xcuserdatad/UserInterfaceState.xcuserstate index 004e837..ca48b7a 100644 Binary files a/AlamofireOauth2.xcworkspace/xcuserdata/evermeer.xcuserdatad/UserInterfaceState.xcuserstate and b/AlamofireOauth2.xcworkspace/xcuserdata/evermeer.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/AlamofireOauth2/AuthenticationViewController.swift b/AlamofireOauth2/AuthenticationViewController.swift index 1392953..8a71ab7 100755 --- a/AlamofireOauth2/AuthenticationViewController.swift +++ b/AlamofireOauth2/AuthenticationViewController.swift @@ -57,7 +57,8 @@ class AuthenticationViewController : UIViewController, UIWebViewDelegate{ // TO alter if more parameters needed let url:String! = self.oauth2Settings.authorizeURL + "?response_type=code&client_id=" + self.oauth2Settings.clientID + "&redirect_uri=" + self.oauth2Settings.redirectURL.addingPercentEncoding(withAllowedCharacters: NSCharacterSet.urlHostAllowed)! + "&scope=" + self.oauth2Settings.scope + "&state=" + expectedState - let urlRequest : NSURLRequest = NSURLRequest(url: NSURL(string: url.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!)! as URL) + //.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)! + let urlRequest : NSURLRequest = NSURLRequest(url: NSURL(string: url)! as URL) self.webView!.loadRequest(urlRequest as URLRequest) } diff --git a/Oauth2Test/ViewController.swift b/Oauth2Test/ViewController.swift index 52145eb..82ec0a8 100644 --- a/Oauth2Test/ViewController.swift +++ b/Oauth2Test/ViewController.swift @@ -15,7 +15,7 @@ class ViewController: UIViewController { @IBAction func startWordpressOauth2Test(sender: AnyObject) { self.result.text = "" - UsingOauth2(settings: wordpressOauth2Settings, performWithToken: { token in + UsingOauth2(wordpressOauth2Settings, performWithToken: { token in WordPressRequestConvertible.OAuthToken = token Alamofire.request(WordPressRequestConvertible.Me()) .responseJSON(completionHandler: { (result) -> Void in @@ -33,7 +33,7 @@ class ViewController: UIViewController { @IBAction func startGoogleOauth2Test(sender: AnyObject) { self.result.text = "" - UsingOauth2(settings: googleOauth2Settings, performWithToken: { token in + UsingOauth2(googleOauth2Settings, performWithToken: { token in GoogleRequestConvertible.OAuthToken = token Alamofire.request(GoogleRequestConvertible.Me()) .responseJSON(completionHandler: { (result) -> Void in @@ -51,8 +51,8 @@ class ViewController: UIViewController { } @IBAction func clearTokens(sender: AnyObject) { - Oauth2ClearTokensFromKeychain(settings: wordpressOauth2Settings) - Oauth2ClearTokensFromKeychain(settings: googleOauth2Settings) + Oauth2ClearTokensFromKeychain(wordpressOauth2Settings) + Oauth2ClearTokensFromKeychain(googleOauth2Settings) } }