Class: Trestle::Auth::NullUser

Inherits:
Object
  • Object
show all
Defined in:
lib/trestle/auth/null_user.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.passwordObject



8
9
10
# File 'lib/trestle/auth/null_user.rb', line 8

def self.password
  @password ||= BCrypt::Password.create("password", cost: BCrypt::Engine.cost)
end

Instance Method Details

#authenticateObject



4
5
6
# File 'lib/trestle/auth/null_user.rb', line 4

def authenticate(*)
  BCrypt::Password.new(self.class.password).is_password?("incorrect")
end