Class: Omniauth::Rails::AuthenticationDataStore
- Inherits:
-
Object
- Object
- Omniauth::Rails::AuthenticationDataStore
- Defined in:
- app/models/omniauth/rails/authentication_data_store.rb
Constant Summary collapse
- SCOPE =
"OmniauthRailsAuthData"
Instance Method Summary collapse
- #get(key) ⇒ Object
-
#initialize(session) ⇒ AuthenticationDataStore
constructor
A new instance of AuthenticationDataStore.
- #reset ⇒ Object
- #set(key, value) ⇒ Object
Constructor Details
#initialize(session) ⇒ AuthenticationDataStore
Returns a new instance of AuthenticationDataStore.
7 8 9 10 |
# File 'app/models/omniauth/rails/authentication_data_store.rb', line 7 def initialize(session) @session = session freeze end |
Instance Method Details
#get(key) ⇒ Object
12 13 14 15 |
# File 'app/models/omniauth/rails/authentication_data_store.rb', line 12 def get(key) return nil if session[SCOPE].nil? session[SCOPE][key] end |
#reset ⇒ Object
22 23 24 |
# File 'app/models/omniauth/rails/authentication_data_store.rb', line 22 def reset session[SCOPE] = {} end |