Module: Devise::Models::AdUser

Extended by:
ActiveSupport::Concern
Includes:
AdObject
Defined in:
lib/devise_active_directory_authenticatable/models/ad_user.rb

Overview

Active Directory Module, responsible for validating the user credentials via Active Directory

Defined Under Namespace

Modules: ClassMethods

Constant Summary collapse

Logger =
DeviseActiveDirectoryAuthenticatable::Logger

Instance Method Summary collapse

Methods included from AdObject

#ad_obj, #attr_map, #copy_from_activedirectory!, #klass, #update_children, #update_membership, #update_memberships, #update_parents

Instance Method Details

#authenticate_with_activedirectory(params = {}) ⇒ Object



27
28
29
30
31
# File 'lib/devise_active_directory_authenticatable/models/ad_user.rb', line 27

def authenticate_with_activedirectory params = {}
  params[:username] ||= 
  self.class.set_activedirectory_credentials params
  self.class.activedirectory_connect
end

#loginObject

Login event handler. Triggered after authentication. Maybe



22
23
24
25
# File 'lib/devise_active_directory_authenticatable/models/ad_user.rb', line 22

def 
  update_parents
  super if defined? super
end

#login_withObject

Devise key



16
17
18
# File 'lib/devise_active_directory_authenticatable/models/ad_user.rb', line 16

def 
  self[::Devise.authentication_keys.first]
end