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