Module: ActiveModel::SecurePassword::InstanceMethodsOnActivation

Defined in:
lib/cz_auth/requires_authentication.rb

Instance Method Summary collapse

Instance Method Details

#authenticate(unencrypted_password) ⇒ Object



37
38
39
40
41
# File 'lib/cz_auth/requires_authentication.rb', line 37

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