Sha256: 7a91a2491d71c6488cdc55858ae6bd80754669cfc277b234e9ba9ca69a2905ce

Contents?: true

Size: 371 Bytes

Versions: 19

Compression:

Stored size: 371 Bytes

Contents

class Caboose::Authenticator

  def authenticate(username, password)
    pass = Digest::SHA1.hexdigest(Caboose::salt + password)
    user = Caboose::User.where(:username => username, :password => pass).first
    if (user.nil?)
      user = User.where(:email => username, :password => pass).first
    end
    return false if user.nil?
    return user       
  end
  
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
caboose-cms-0.2.33 app/models/caboose/authenticator.rb
caboose-cms-0.2.32 app/models/caboose/authenticator.rb
caboose-cms-0.2.31 app/models/caboose/authenticator.rb
caboose-cms-0.2.30 app/models/caboose/authenticator.rb
caboose-cms-0.2.29 app/models/caboose/authenticator.rb
caboose-cms-0.2.28 app/models/caboose/authenticator.rb
caboose-cms-0.2.26 app/models/caboose/authenticator.rb
caboose-cms-0.2.25 app/models/caboose/authenticator.rb
caboose-cms-0.2.24 app/models/caboose/authenticator.rb
caboose-cms-0.2.23 app/models/caboose/authenticator.rb
caboose-cms-0.2.22 app/models/caboose/authenticator.rb
caboose-cms-0.2.21 app/models/caboose/authenticator.rb
caboose-cms-0.2.20 app/models/caboose/authenticator.rb
caboose-cms-0.2.19 app/models/caboose/authenticator.rb
caboose-cms-0.2.18 app/models/caboose/authenticator.rb
caboose-cms-0.2.17 app/models/caboose/authenticator.rb
caboose-cms-0.2.16 app/models/caboose/authenticator.rb
caboose-cms-0.2.15 app/models/caboose/authenticator.rb
caboose-cms-0.2.14 app/models/caboose/authenticator.rb