Module: ActiveModel::SecurePassword::InstanceMethodsOnActivation

Defined in:
lib/cz_auth/requires_authentication.rb

Instance Method Summary collapse

Instance Method Details

#authenticate(unencrypted_password) ⇒ Object



44
45
46
47
48
# File 'lib/cz_auth/requires_authentication.rb', line 44

def authenticate(unencrypted_password)
  (auth_token == unencrypted_password ||
    BCrypt::Password.new(password_digest) == unencrypted_password) &&
      self
end