Class: FlexmlsApi::Authentication::OAuth2Impl::GrantTypeRefresh
- Inherits:
-
GrantTypeBase
- Object
- GrantTypeBase
- FlexmlsApi::Authentication::OAuth2Impl::GrantTypeRefresh
- Defined in:
- lib/flexmls_api/authentication/oauth2_impl/grant_type_refresh.rb
Constant Summary
Constants inherited from GrantTypeBase
FlexmlsApi::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.
8 9 10 11 |
# File 'lib/flexmls_api/authentication/oauth2_impl/grant_type_refresh.rb', line 8 def initialize(client, provider, session) super(client, provider, session) @params = {} end |
Instance Attribute Details
#params ⇒ Object
Returns the value of attribute params.
7 8 9 |
# File 'lib/flexmls_api/authentication/oauth2_impl/grant_type_refresh.rb', line 7 def params @params end |
Instance Method Details
#authenticate ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/flexmls_api/authentication/oauth2_impl/grant_type_refresh.rb', line 13 def authenticate new_session = nil unless @session.refresh_token.nil? FlexmlsApi.logger.debug("[oauth2] Refreshing authentication to #{provider.access_uri} using [#{session.refresh_token}]") new_session = create_session(token_params) end new_session end |