Module: BaseApi::Client::Authorizations
- Included in:
- BaseApi::Client
- Defined in:
- lib/base_api/client/authorizations.rb
Instance Method Summary collapse
Instance Method Details
#oauth_access_token(&block) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/base_api/client/authorizations.rb', line 4 def oauth_access_token(&block) call_post_api('/1/oauth/token', access_token_payload, &block) if response.success? @access_token = response['access_token'] @refresh_token = response['refresh_token'] end response end |
#oauth_refresh_token(&block) ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/base_api/client/authorizations.rb', line 14 def oauth_refresh_token(&block) call_post_api('/1/oauth/token', refresh_token_payload, &block) if response.success? @access_token = response['access_token'] @refresh_token = response['refresh_token'] end response end |