Module: Clearance::PasswordStrategies::BCryptMigrationFromSHA1

Defined in:
lib/clearance/password_strategies/deprecated/bcrypt_migration_from_sha1.rb

Defined Under Namespace

Classes: BCryptUser, SHA1User

Instance Method Summary collapse

Instance Method Details

#authenticated?(password) ⇒ Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/clearance/password_strategies/deprecated/bcrypt_migration_from_sha1.rb', line 24

def authenticated?(password)
  authenticated_with_sha1?(password) || authenticated_with_bcrypt?(password)
end

#password=(new_password) ⇒ Object



28
29
30
31
# File 'lib/clearance/password_strategies/deprecated/bcrypt_migration_from_sha1.rb', line 28

def password=(new_password)
  @password = new_password
  BCryptUser.new(self).password = new_password
end