Skip to content

Commit

Permalink
swift update
Browse files Browse the repository at this point in the history
  • Loading branch information
evermeer committed Mar 10, 2017
1 parent 742621d commit fcc0b54
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion AlamofireOauth2.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions AlamofireOauth2.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
TargetAttributes = {
7FD256B61B5707E500825BF1 = {
CreatedOnToolsVersion = 6.4;
DevelopmentTeam = WTH4QGEA23;
DevelopmentTeam = 8829GZ84Q6;
LastSwiftMigration = 0800;
SystemCapabilities = {
com.apple.SafariKeychain = {
Expand Down Expand Up @@ -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)",
Expand All @@ -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;
Expand Down
Binary file not shown.
3 changes: 2 additions & 1 deletion AlamofireOauth2/AuthenticationViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
8 changes: 4 additions & 4 deletions Oauth2Test/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -51,8 +51,8 @@ class ViewController: UIViewController {
}

@IBAction func clearTokens(sender: AnyObject) {
Oauth2ClearTokensFromKeychain(settings: wordpressOauth2Settings)
Oauth2ClearTokensFromKeychain(settings: googleOauth2Settings)
Oauth2ClearTokensFromKeychain(wordpressOauth2Settings)
Oauth2ClearTokensFromKeychain(googleOauth2Settings)
}
}

Expand Down

0 comments on commit fcc0b54

Please sign in to comment.