Swift based OAuth library for iOS
In success handler/closure an OAuthSwiftResponse
object is now returned instead of multiple objects (data and http response)
oauthswift.client.get("an url",
success: { response in
let data = response.data // response.string for utf8 decoded string from data
},
...
You can extends OAuthSwiftResponse
to return a decoded object by reading JSON for instance
You can also get the URLRequest
send to the server into this OAuthSwiftResponse
object
Backward compatibility with Objective C work with prefixed objc_
functions
Update to swift 3
authorizeWithCallbackURL(
-> authorize(withCallbackURL:
)OAuthSwiftError
_
renamed (ex: oauthSwift.client.credential.oauth_token
-> oauthSwift.client.credential.oauthToken
)OAuthSwift.Headers
, OAuthSwift.Parameters
)Take a look to also updated project OAuthSwiftAlamofire if you want to use Alamofire to make request
:warning: If you update and use SafariURLHandler
, you will have a compilation issue: SafariURLHandler
init now take an OAuthSwift
object as parameter
access_token_url
defined but neededremoveCallbackNotificationObserver
to release the observer (which wait on callback url called by website provider)OAuthWebViewController
by choosing the good parent view controller, not only the root oneparameters
to OAuth1 callback #81(@quangbuule #152)credential, response in
by credential, response, parameters in
or credential, response, _ in
response
into callback could now be nilOAuth1Swift.handleOpenURL(url:)
& OAuth2Swift.handleOpenURL(url:)
are replaced by OAuthSwift.handleOpenURL(url:)
If you don't want to edit your code, do not update OAuthSwift. You can with carthage and cocoapod for instance use "~> 0.4.8"