Skip to content

jdrevet/OAuthSwift-Alamofire

 
 

Repository files navigation

OAuthSwift-Alamofire

OAuthSwiftAlamofires

Utility methods to use `OAuthSwift` and `Alamofire`.







How to use

OAuth 2 & Manager

With OAuth version 2 you can get a new Alamofire Manager after authorization process. This manager will use as default headers the one computed by OAuthSwift.

let request = oauth2swift.manager()

NSMutableRequest / URLRequestConvertible

On any NSMutableRequest use addOAuthHeader or addOAuthHeaderWithCredential to add Authorization HTTP header.

You can for instance use it in your URLRequestConvertible object before returning the NSMutableURLRequest.

Alamofire Manager request methods

You can also use one of the new methods request on Alamofire Manager passing OAuthSwiftCredential as last parameters.

TODO

  • tests
  • sample project
  • cocoapod installation

About

Utility method to sign Alamofire request

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 45.7%
  • Ruby 30.3%
  • Objective-C 24.0%