Class: SignIn::SessionRefresher
- Inherits:
-
Object
- Object
- SignIn::SessionRefresher
- Defined in:
- app/services/sign_in/session_refresher.rb
Instance Attribute Summary collapse
-
#anti_csrf_token ⇒ Object
readonly
Returns the value of attribute anti_csrf_token.
-
#refresh_token ⇒ Object
readonly
Returns the value of attribute refresh_token.
-
#session ⇒ Object
readonly
Returns the value of attribute session.
Instance Method Summary collapse
-
#initialize(refresh_token:, anti_csrf_token:) ⇒ SessionRefresher
constructor
A new instance of SessionRefresher.
- #perform ⇒ Object
Constructor Details
#initialize(refresh_token:, anti_csrf_token:) ⇒ SessionRefresher
Returns a new instance of SessionRefresher.
7 8 9 10 |
# File 'app/services/sign_in/session_refresher.rb', line 7 def initialize(refresh_token:, anti_csrf_token:) @refresh_token = refresh_token @anti_csrf_token = anti_csrf_token end |
Instance Attribute Details
#anti_csrf_token ⇒ Object (readonly)
Returns the value of attribute anti_csrf_token.
5 6 7 |
# File 'app/services/sign_in/session_refresher.rb', line 5 def anti_csrf_token @anti_csrf_token end |
#refresh_token ⇒ Object (readonly)
Returns the value of attribute refresh_token.
5 6 7 |
# File 'app/services/sign_in/session_refresher.rb', line 5 def refresh_token @refresh_token end |
#session ⇒ Object (readonly)
Returns the value of attribute session.
5 6 7 |
# File 'app/services/sign_in/session_refresher.rb', line 5 def session @session end |
Instance Method Details
#perform ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'app/services/sign_in/session_refresher.rb', line 12 def perform find_valid_oauth_session validate_credential_lock validate_terms_of_use if client_config.enforced_terms.present? anti_csrf_check if anti_csrf_enabled_client? detect_token_theft update_session! if parent_refresh_token_in_session? create_new_tokens end |