Sha256: 69252c94fe7cbe31993e51323223cca835a2addec79fcee63ba7a9d672d5c89e

Contents?: true

Size: 734 Bytes

Versions: 9

Compression:

Stored size: 734 Bytes

Contents

# Use this file to setup SimpleAuth.
SimpleAuth.setup do |config|
  # Generate the password hash. The specified block should expected
  # the plain password and the password hash as block parameters.
  # config.crypter = proc {|password, salt| Digest::SHA256.hexdigest("#{password}--#{salt}") }

  # Generate the password salt. The specified block should expect
  # the ActiveRecord instance as block parameter.
  # config.salt = proc {|r| Digest::SHA256.hexdigest("#{Time.now.to_s}--#{r.email}")}

  # Set which attributes will be used for authentication.
  config.credentials = [:email, :login]

  # Set the User model that should be used
  config.model = :user

  # Set the login url
  config.redirect_to = proc { login_path }
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
simple_auth-0.1.8 generators/simple_auth/templates/simple_auth.rb
simple_auth-0.1.7 generators/simple_auth/templates/simple_auth.rb
simple_auth-0.1.6 generators/simple_auth/templates/simple_auth.rb
simple_auth-0.1.5 generators/simple_auth/templates/simple_auth.rb
simple_auth-0.1.4 generators/simple_auth/templates/simple_auth.rb
simple_auth-0.1.3 generators/simple_auth/templates/simple_auth.rb
simple_auth-0.1.2 generators/simple_auth/templates/simple_auth.rb
simple_auth-0.1.1 generators/simple_auth/templates/simple_auth.rb
simple_auth-0.1.0 generators/simple_auth/templates/simple_auth.rb