Sha256: 32987f6bdad9862e9ad2091bfeb61aa706b2439631d904011836ee6586513d6a

Contents?: true

Size: 1.05 KB

Versions: 17

Compression:

Stored size: 1.05 KB

Contents

module Clearance
  # Control how users are authenticated and how passwords are stored.
  #
  # The default password strategy is {Clearance::PasswordStrategies::BCrypt},
  # but this can be overridden in {Clearance::Configuration}.
  #
  # You can supply your own password strategy by implementing a module that
  # responds to the proper interface methods. Once this module is configured as
  # your password strategy, Clearance will mix it into your Clearance User
  # class. Thus, your module can access any methods or attributes on User.
  #
  # Password strategies need to respond to `authenticated?(password)` and
  # `password=(new_password)`. For an example of how to implement these methods,
  # see {Clearance::PasswordStrategies::BCrypt}.
  module PasswordStrategies
    autoload :BCrypt, 'clearance/password_strategies/bcrypt'
    autoload :BCryptMigrationFromSHA1,
      'clearance/password_strategies/bcrypt_migration_from_sha1'
    autoload :Blowfish, 'clearance/password_strategies/blowfish'
    autoload :SHA1, 'clearance/password_strategies/sha1'
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
clearance-2.1.0 lib/clearance/password_strategies.rb
clearance-2.0.0 lib/clearance/password_strategies.rb
clearance-2.0.0.beta2 lib/clearance/password_strategies.rb
clearance-2.0.0.beta1 lib/clearance/password_strategies.rb
clearance-1.17.0 lib/clearance/password_strategies.rb
clearance-1.16.2 lib/clearance/password_strategies.rb
clearance-1.16.1 lib/clearance/password_strategies.rb
clearance-1.16.0 lib/clearance/password_strategies.rb
clearance-1.15.1 lib/clearance/password_strategies.rb
clearance-1.15.0 lib/clearance/password_strategies.rb
clearance-1.14.2 lib/clearance/password_strategies.rb
clearance-1.14.1 lib/clearance/password_strategies.rb
clearance-1.14.0 lib/clearance/password_strategies.rb
clearance-1.13.0 lib/clearance/password_strategies.rb
clearance-1.12.1 lib/clearance/password_strategies.rb
clearance-1.12.0 lib/clearance/password_strategies.rb
clearance-1.11.0 lib/clearance/password_strategies.rb