Class: SolidusJwt::DeviseStrategies::Password

Inherits:
Base
  • Object
show all
Defined in:
lib/solidus_jwt/devise_strategies/password.rb

Instance Method Summary collapse

Methods inherited from Base

#valid?

Instance Method Details

#authenticate!Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/solidus_jwt/devise_strategies/password.rb', line 6

def authenticate!
  block = proc { resource.valid_password?(password) }

  if resource&.valid_for_authentication?(&block)
    resource.after_database_authentication
    return success!(resource)
  end

  fail!(:invalid)
end