Files

Merb::Authentication::Mixins::BCryptUser::InstanceMethods

Public Instance Methods

authenticated?(password) click to toggle source
# File lib/merb-auth-more/mixins/bcrypt_user.rb, line 49
def authenticated?(password)
  bcrypt_password == password
end
bcrypt_password() click to toggle source
# File lib/merb-auth-more/mixins/bcrypt_user.rb, line 53
def bcrypt_password
  @bcrypt_password ||=  BCrypt::Password.new(crypted_password)
end
encrypt_password() click to toggle source
# File lib/merb-auth-more/mixins/bcrypt_user.rb, line 61
def encrypt_password
  return if password.blank?
  cost =  Merb::Plugins.config[:"merb-auth"][:bcrypt_cost] || BCrypt::Engine::DEFAULT_COST
  self.crypted_password =  BCrypt::Password.create(password, :cost => cost)
end
password_required?() click to toggle source
# File lib/merb-auth-more/mixins/bcrypt_user.rb, line 57
def password_required?
  crypted_password.blank? || !password.blank?
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.