Class: Devise::Strategies::Authenticatable
- Defined in:
- lib/devise/strategies/authenticatable.rb
Overview
This strategy should be used as basis for authentication strategies. It retrieves parameters both from params or from http authorization headers. See database_authenticatable for an example.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#authentication_hash ⇒ Object
Returns the value of attribute authentication_hash.
-
#authentication_type ⇒ Object
Returns the value of attribute authentication_type.
-
#password ⇒ Object
Returns the value of attribute password.
Instance Method Summary collapse
-
#clean_up_csrf? ⇒ Boolean
Override and set to false for things like OmniAuth that technically run through Authentication (user_set) very often, which would normally reset CSRF data in the session.
- #store? ⇒ Boolean
- #valid? ⇒ Boolean
Methods inherited from Base
Instance Attribute Details
#authentication_hash ⇒ Object
Returns the value of attribute authentication_hash.
11 12 13 |
# File 'lib/devise/strategies/authenticatable.rb', line 11 def authentication_hash @authentication_hash end |
#authentication_type ⇒ Object
Returns the value of attribute authentication_type.
11 12 13 |
# File 'lib/devise/strategies/authenticatable.rb', line 11 def authentication_type @authentication_type end |
#password ⇒ Object
Returns the value of attribute password.
11 12 13 |
# File 'lib/devise/strategies/authenticatable.rb', line 11 def password @password end |
Instance Method Details
#clean_up_csrf? ⇒ Boolean
Override and set to false for things like OmniAuth that technically run through Authentication (user_set) very often, which would normally reset CSRF data in the session
24 25 26 |
# File 'lib/devise/strategies/authenticatable.rb', line 24 def clean_up_csrf? true end |
#store? ⇒ Boolean
13 14 15 |
# File 'lib/devise/strategies/authenticatable.rb', line 13 def store? super && !mapping.to.skip_session_storage.include?(authentication_type) end |
#valid? ⇒ Boolean
17 18 19 |
# File 'lib/devise/strategies/authenticatable.rb', line 17 def valid? valid_for_params_auth? || valid_for_http_auth? end |