class Devise::Strategies::CustomAuthenticatable
Strategy for delegating authentication logic to custom model's method
Public Instance Methods
authenticate!()
click to toggle source
# File lib/devise/strategies/custom_authenticatable.rb, line 7 def authenticate! resource = valid_password? && mapping.to.find_for_authentication(authentication_hash) return pass unless resource.respond_to?(:valid_for_custom_authentication?) catch(:skip_custom_strategies) do if validate(resource){ resource.valid_for_custom_authentication?(password) } resource.after_custom_authentication success!(resource) end end end