1
我试图验证用户获取read, write
对Trello API的访问权限。我正在使用OAuth1Swift
进行身份验证,但无法添加参数以添加许可权和app name
。如何使用OAuth1Swift读取,写入权限验证Trello API用户
我们如何添加这些paramateers?这是我的代码如下。
func doOAuthTrello() {
let oauthswift = OAuth1Swift(
consumerKey: "consumerKey",
consumerSecret: "consumerSecret",
requestTokenUrl: "https://trello.com/1/OAuthGetRequestToken",
authorizeUrl: "https://trello.com/1/OAuthAuthorizeToken",
accessTokenUrl: "https://trello.com/1/OAuthGetAccessToken"
)
self.oauthswift = oauthswift
oauthswift.authorizeURLHandler = getURLHandler()
let _ = oauthswift.authorize(
withCallbackURL: URL(string: "oauth-swift://oauth-callback/trello")!,
success: { credential, response, parameters in
self.showTokenAlert(name: serviceParameters["name"], credential: credential)
self.testTrello(oauthswift)
},
failure: { error in
print(error.localizedDescription, terminator: "")
}
)
}