Module: BacklogKit::Client::Authorization
- Included in:
- BacklogKit::Client
- Defined in:
- lib/backlog_kit/client/authorization.rb
Instance Method Summary collapse
Instance Method Details
#create_token(oauth_code) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/backlog_kit/client/authorization.rb', line 4 def create_token(oauth_code) params = { client_id: client_id, client_secret: client_secret, grant_type: 'authorization_code', code: oauth_code } params.merge!(redirect_uri: redirect_uri) if redirect_uri request(:post, 'oauth2/token', params, true) end |
#update_token ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/backlog_kit/client/authorization.rb', line 15 def update_token params = { client_id: client_id, client_secret: client_secret, grant_type: 'refresh_token', refresh_token: refresh_token } request(:post, 'oauth2/token', params, true) end |