lib/backlog_kit/client/authorization.rb in backlog_kit-0.13.0 vs lib/backlog_kit/client/authorization.rb in backlog_kit-0.14.0
- old
+ new
@@ -1,13 +1,11 @@
module BacklogKit
class Client
-
# Methods for OAuth 2.0 authorization
#
# @see http://developer.nulab-inc.com/docs/backlog/auth
module Authorization
-
# Create a new access token
#
# @param oauth_code [String] Authorization code that you get from the authorization endpoint
# @return [BacklogKit::Response] The token information
def create_token(oauth_code)
@@ -15,10 +13,10 @@
client_id: client_id,
client_secret: client_secret,
grant_type: 'authorization_code',
code: oauth_code
}
- params.merge!(redirect_uri: redirect_uri) if redirect_uri
+ params[:redirect_uri] = redirect_uri if redirect_uri
request(:post, 'oauth2/token', params, true)
end
# Refresh an access token
#