Class: Devise::Strategies::DatabaseAuthenticatable
- Inherits:
-
Authenticatable
- Object
- Warden::Strategies::Base
- Base
- Authenticatable
- Devise::Strategies::DatabaseAuthenticatable
- Defined in:
- lib/devise/strategies/database_authenticatable.rb
Overview
Default strategy for signing in a user, based on his email and password in the database.
Instance Attribute Summary
Attributes inherited from Authenticatable
#authentication_hash, #password
Instance Method Summary collapse
Methods inherited from Authenticatable
Methods inherited from Base
Instance Method Details
#authenticate! ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/devise/strategies/database_authenticatable.rb', line 7 def authenticate! resource = valid_password? && mapping.to.find_for_database_authentication(authentication_hash) if validate(resource){ resource.valid_password?(password) } resource.after_database_authentication success!(resource) elsif !halted? fail(:invalid) end end |