class GitHub::Ldap::ReferralChaser::Referral
Represents a referral entry from an LDAP search result. Constructs a corresponding GitHub::Ldap
object from the paramaters on the referral_url and provides a search
method to continue the search on the referred domain.
Attributes
connection[R]
search_base[R]
Public Class Methods
new(referral_url, admin_user, admin_password, port=nil)
click to toggle source
# File lib/github/ldap/referral_chaser.rb, line 73 def initialize(referral_url, admin_user, admin_password, port=nil) url = GitHub::Ldap::URL.new(referral_url) @search_base = url.dn connection_options = { host: url.host, port: port || url.port, scope: url.scope, admin_user: admin_user, admin_password: admin_password } @connection = GitHub::Ldap::ConnectionCache.get_connection(connection_options) end
Public Instance Methods
search(options)
click to toggle source
Search the referred domain controller with options, merging in the referred search base DN onto options.
# File lib/github/ldap/referral_chaser.rb, line 90 def search(options) connection.search(options.merge(base: search_base)) end