Module: User::Authentication

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

Overview

rubocop:todo Style/Documentation

Defined Under Namespace

Modules: ClassMethods, Ldap, Local

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object


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

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

Instance Method Details

#authenticated?(password) ⇒ Boolean

Returns:

  • (Boolean)

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

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