Class: SolidusBolt::Users::RefreshAccessTokenService
- Inherits:
-
BaseService
- Object
- BaseService
- SolidusBolt::Users::RefreshAccessTokenService
- Defined in:
- app/services/solidus_bolt/users/refresh_access_token_service.rb
Instance Attribute Summary collapse
-
#session ⇒ Object
readonly
Returns the value of attribute session.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(session:) ⇒ RefreshAccessTokenService
constructor
A new instance of RefreshAccessTokenService.
Methods inherited from BaseService
Constructor Details
#initialize(session:) ⇒ RefreshAccessTokenService
Returns a new instance of RefreshAccessTokenService.
8 9 10 11 |
# File 'app/services/solidus_bolt/users/refresh_access_token_service.rb', line 8 def initialize(session:) @session = session super end |
Instance Attribute Details
#session ⇒ Object (readonly)
Returns the value of attribute session.
6 7 8 |
# File 'app/services/solidus_bolt/users/refresh_access_token_service.rb', line 6 def session @session end |
Instance Method Details
#call ⇒ Object
13 14 15 16 17 18 |
# File 'app/services/solidus_bolt/users/refresh_access_token_service.rb', line 13 def call return if session[:bolt_access_token].nil? return session[:bolt_access_token] if session[:bolt_expiration_time] >= Time.now.utc refresh_access_token end |