aerogear-ios-oauth2 是基于 aerogear-ios-http 的 OAuth2 客户端。
示例:
var Http = Http() // [1] let facebookConfig = FacebookConfig( // [2] clientId: "YYY", clientSecret: "XXX", scopes:["photo_upload, publish_actions"]) var oauth2Module = AccountManager.addFacebookAccount(facebookConfig) // [3] http.authzModule = oauth2Module // [4] http.GET("/get", completionHandler: {(response, error) in // [5] // handle response })