Class: LeveretAuth::Strategies::DeviseStrategy
- Inherits:
-
BaseStrategy
- Object
- BaseStrategy
- LeveretAuth::Strategies::DeviseStrategy
- Defined in:
- lib/leveret_auth/strategies/devise_strategy.rb
Instance Method Summary collapse
Methods inherited from BaseStrategy
config, configure, #initialize
Constructor Details
This class inherits a constructor from LeveretAuth::Strategies::BaseStrategy
Instance Method Details
#authenticate! ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/leveret_auth/strategies/devise_strategy.rb', line 6 def authenticate! user = user_model.find_for_authentication(email: @email) raise Errors::InvalidCredential if user.nil? raise Errors::InvalidCredential unless user.valid_for_authentication? { user.valid_password?(@password) } user end |