Module: User::Authentication

Included in:
User
Defined in:
app/models/user/authentication.rb

Defined Under Namespace

Modules: ClassMethods, Ldap, Local

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object


2
3
4
5
6
7
8
# File 'app/models/user/authentication.rb', line 2

def self.included(base)
  base.class_eval do
    extend ClassMethods
    extend Ldap
    extend Local
  end
end

Instance Method Details

#authenticated?(password) ⇒ Boolean

Returns:

  • (Boolean)

10
11
12
# File 'app/models/user/authentication.rb', line 10

def authenticated?(password)
  crypted_password == encrypt(password)
end