OAuthSwift Versions Save

Swift based OAuth library for iOS

1.1.0

7 years ago

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

1.0.0

7 years ago

Update to swift 3

  • functions renamed (ex: authorizeWithCallbackURL( -> authorize(withCallbackURL:)
  • error in callback is typed OAuthSwiftError
  • variable with _ renamed (ex: oauthSwift.client.credential.oauth_token-> oauthSwift.client.credential.oauthToken)
  • add some type alias (ex: OAuthSwift.Headers , OAuthSwift.Parameters)
  • ...

Take a look to also updated project OAuthSwiftAlamofire if you want to use Alamofire to make request

0.6.0

7 years ago
  • See Milestone for bug fix
  • many change from @FGoessler PR #219
    • fix memory leak
    • allow to cancel request
    • ..
  • Fix and customisation on provided web view controller presentation and dismissal
  • Demo app have now a form to choose url handler and fill key and secret
  • add SoundCloud to OAuthSwiftDemo @satoshin2071

:warning: If you update and use SafariURLHandler, you will have a compilation issue: SafariURLHandlerinit now take an OAuthSwiftobject as parameter

v0.5.2

8 years ago

Fix

  • on oauth1 signature (@danielbmarques)
  • use of oauthswift into app extension
  • request that start with &

Change

  • swift 2.2 warnings (@lyptt)
  • allow to refresh token for oauth2 (@fabiomassimo )
  • add an enum OAuthSwiftErrorCode (@fabiomassimo )
  • added a method to OAuthSwiftClient to perform requests via NSURLRequest objects (@FGoessler)
  • allow to cancel OAuthSwiftHTTPRequest (@FGoessler)

Other

  • added to demo Goodreads, Typetalk, Buffer, Trello

0.5.1

8 years ago

Fix

  • fix fatal error if no access_token_url defined but needed
  • do not silently do nothing if failed to create authorize url
  • encode authorize url (fix scope with space)
  • remove percent encoding from oauth_token

Change

  • Add method removeCallbackNotificationObserver to release the observer (which wait on callback url called by website provider)
  • Add "Response-Body" when request failed (@lyptt)
  • oauth_verifier now public (@itchingpixels)
  • Add 'state' check when receiving code #182
  • Allow to send oauth parameter in URL instead of header (Withings, @jdrevet)

Other

  • add to demo 500px, hatena
  • document and use in demo iOS9 UIApplicationDelegate new method to handle url

0.5.0

8 years ago

Fix

  • JSON parsing to get access token when there is one parameter with only number
  • Presentation of OAuthWebViewController by choosing the good parent view controller, not only the root one

Change

  • Add parameters to OAuth1 callback #81(@quangbuule #152)
  • Add WatchOS support #135 (as proof of concept, you must do find a way to handle authorisation URL, maybe open on iOS)
  • Allow to change dispatch queue used by HTTP request (default: main queue)
  • Factorise code between OAuth1Swift & OAuthSwift2 :

After updating you must edit your code:

  • For OAuth1 you must change the callback credential, response in by credential, response, parameters in or credential, response, _ in
  • :warning: response into callback could now be nil
  • OAuth1Swift.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"

0.4.8

8 years ago

New

  • Add TVOS support (as proof of concept, webview not allowed on TVOS)
  • Add SafariURLHandler to handle URL into a SFSafariViewController (iOS9)
  • Add Gitter & Facebook service into demo

Fix

  • initialisation from stored token by setting OAuth version at object init
  • #129 Allow to use in application extension
  • #142 error on signature if url contains query parameters (@pculligan)
  • #140 some errors if service return no data or no token (@pculligan, @srna, @mikeMTOL)
  • #139 header with basic password (for instance for FitBit OAuth2)
  • #80 allow to specify header to POST Json data and fix OAuth1 signature
  • No OAuth2 Authorization header if no token (#151 @gufo)

Internal

  • Add unit tests
  • Add contributing guide
  • Merge OSX and iOS demo code
  • Change the way to configure demo app consumer key and secret Demo-application