Class: Devise::Strategies::LdapNorm
- Inherits:
-
Authenticatable
- Object
- Authenticatable
- Devise::Strategies::LdapNorm
- Defined in:
- lib/devise_ldap_norm/strategy.rb
Instance Method Summary collapse
Instance Method Details
#authenticate! ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/devise_ldap_norm/strategy.rb', line 6 def authenticate! resource = mapping.to.find_for_ldap_authentication(authentication_hash.merge(password: password, remote_ip: request.remote_ip)) if resource && validate(resource) { resource.valid_ldap_authentication?(password) } remember_me(resource) resource.after_ldap_authentication success!(resource) else return fail(:invalid) end end |