Module: Clearance::PasswordStrategies::SHA1

Defined in:
lib/clearance/password_strategies/sha1.rb

Instance Method Summary collapse

Instance Method Details

#authenticated?(password) ⇒ true, false

Am I authenticated with given password?

Examples:

user.authenticated?('password')

Parameters:

  • plain-text (String)

    password

Returns:

  • (true, false)


12
13
14
# File 'lib/clearance/password_strategies/sha1.rb', line 12

def authenticated?(password)
  encrypted_password == encrypt(password)
end