Class: OAuth2::Grant::RefreshToken
- Defined in:
- lib/oauth2/grant/refresh_token.rb
Instance Attribute Summary
Attributes inherited from Base
#authorize_path, #client_id, #client_secret, #connection, #device_path, #host, #token_path
Instance Method Summary collapse
-
#get_token(refresh_token, opts = {}) ⇒ Object
Retrieve an access token for a given refresh token.
- #grant_type ⇒ Object
Methods inherited from Base
Methods included from UrlHelper
#build_url, #generate_timestamp, #generate_urlsafe_key, http_basic_encode, #to_query
Constructor Details
This class inherits a constructor from OAuth2::Grant::Base
Instance Method Details
#get_token(refresh_token, opts = {}) ⇒ Object
Retrieve an access token for a given refresh token
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/oauth2/grant/refresh_token.rb', line 14 def get_token(refresh_token, opts={}) params = opts[:params] || {} opts[:params] = params.merge!({ :grant_type => grant_type, :refresh_token => refresh_token }) opts[:authenticate] ||= :headers method = opts.delete(:method) || :post make_request(method, @token_path, opts) end |
#grant_type ⇒ Object
5 6 7 |
# File 'lib/oauth2/grant/refresh_token.rb', line 5 def grant_type 'refresh_token' end |