Class: SparkApi::Authentication::OAuth2Impl::GrantTypeRefresh
- Inherits:
-
GrantTypeBase
- Object
- GrantTypeBase
- SparkApi::Authentication::OAuth2Impl::GrantTypeRefresh
- Defined in:
- lib/spark_api/authentication/oauth2_impl/grant_type_refresh.rb
Constant Summary
Constants inherited from GrantTypeBase
SparkApi::Authentication::OAuth2Impl::GrantTypeBase::GRANT_TYPES
Instance Attribute Summary collapse
-
#params ⇒ Object
Returns the value of attribute params.
Attributes inherited from GrantTypeBase
Instance Method Summary collapse
- #authenticate ⇒ Object
-
#initialize(client, provider, session) ⇒ GrantTypeRefresh
constructor
A new instance of GrantTypeRefresh.
Methods inherited from GrantTypeBase
Constructor Details
#initialize(client, provider, session) ⇒ GrantTypeRefresh
Returns a new instance of GrantTypeRefresh.
7 8 9 10 |
# File 'lib/spark_api/authentication/oauth2_impl/grant_type_refresh.rb', line 7 def initialize(client, provider, session) super(client, provider, session) @params = {} end |
Instance Attribute Details
#params ⇒ Object
Returns the value of attribute params.
6 7 8 |
# File 'lib/spark_api/authentication/oauth2_impl/grant_type_refresh.rb', line 6 def params @params end |
Instance Method Details
#authenticate ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/spark_api/authentication/oauth2_impl/grant_type_refresh.rb', line 12 def authenticate new_session = nil unless @session.refresh_token.nil? SparkApi.logger.debug { "[oauth2] Refreshing authentication to #{provider.access_uri} using [#{session.refresh_token}]" } new_session = create_session(token_params) end new_session end |