- 授权协议: MIT
- 开发语言: Swift
- 操作系统: OS X
- 软件首页: https://github.com/crousselle/SwiftOAuth2
- 官方下载: https://github.com/crousselle/SwiftOAuth2
软件介绍
SwiftOAuth2 是 OAuth2 的 Swift 实现。
使用
首先要创建一个 CROAuth2Client 对象:
// From a UIViewController (used to present the authentication webview if necessary) CROAuth2Client.clientWithPresentingController(self)
简单的查询访问 token:
self.client!.retrieveAuthToken({ (authToken) -> Void in
if let optionnalAuthToken = authToken {
println("Received access token " + optionnalAuthToken)
}
})
