class GitHub::Ldap::UserSearch::Default
The default user search strategy, mainly for allowing Domain#user?
to search for a user on the configured domain controller, or use the Global Catalog to search across the entire Active Directory forest.
Attributes
ldap[R]
options[R]
Public Class Methods
new(ldap)
click to toggle source
# File lib/github/ldap/user_search/default.rb, line 10 def initialize(ldap) @ldap = ldap @options = { :attributes => [], :paged_searches_supported => true, :size => 1 } end
Public Instance Methods
perform(login, base_name, uid, search_options)
click to toggle source
Performs a normal search on the configured domain controller using the default base DN, uid, search_options
# File lib/github/ldap/user_search/default.rb, line 21 def perform(login, base_name, uid, search_options) search_options[:filter] = login_filter(uid, login) search_options[:base] = base_name search(options.merge(search_options)) end
search(options)
click to toggle source
The default search. This can be overridden by a child class like GitHub::Ldap::UserSearch::ActiveDirectory
to change the scope of the search.
# File lib/github/ldap/user_search/default.rb, line 30 def search(options) ldap.search(options) end