Module: Devise::Models::ImapAuthenticatable
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/devise_imap_authenticatable/model.rb
Overview
IMAP Authenticatable Module
Examples
User.find(1).valid_password?('password123') # returns true/false
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#after_imap_authentication ⇒ Object
Callback, override in your model.
-
#valid_password?(password) ⇒ Boolean
Verifies a given password.
Instance Method Details
#after_imap_authentication ⇒ Object
Callback, override in your model
27 28 |
# File 'lib/devise_imap_authenticatable/model.rb', line 27 def after_imap_authentication end |
#valid_password?(password) ⇒ Boolean
Verifies a given password
22 23 24 |
# File 'lib/devise_imap_authenticatable/model.rb', line 22 def valid_password?(password) Devise::ImapAdapter.valid_credentials? send(::Devise.authentication_keys.first), password end |