Sha256: bf20660b6aa73762a0b3ba4c0a44d53c20ad5623e46e9472913ed96f8958b4b0
Contents?: true
Size: 802 Bytes
Versions: 4
Compression:
Stored size: 802 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 login url. config.login_url = proc { login_path } # Logged users will be redirect to this url # when +redirect_logged_user+ helper is used. config.logged_url = proc { root_path } end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
simple_auth-1.2.0 | templates/initializer.rb |
simple_auth-1.1.0 | templates/initializer.rb |
simple_auth-1.0.2 | templates/initializer.rb |
simple_auth-1.0.1 | templates/initializer.rb |