Class: Devise::Strategies::ImapAuthenticatable
- Inherits:
-
Authenticatable
- Object
- Authenticatable
- Devise::Strategies::ImapAuthenticatable
- Defined in:
- lib/devise_imap_authenticatable/strategy.rb
Overview
Strategy for signing in a user based on his login and password using IMAP. Redirects to sign_in page if it’s not authenticated
Instance Method Summary collapse
Instance Method Details
#authenticate! ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/devise_imap_authenticatable/strategy.rb', line 10 def authenticate! resource = valid_password? && (find_resource || build_resource) if validate(resource){ resource.valid_password?(password) } resource.after_imap_authentication success!(resource) elsif !halted? fail(:invalid) end end |