Class: LdapQuery::Connection
- Inherits:
-
Object
- Object
- LdapQuery::Connection
- Defined in:
- lib/ldap_query/connection.rb
Overview
For establishing an LDAP connection (binding LDAP connection)
Constant Summary collapse
- REQUIRED_KEYS =
%i[host port base auth].freeze
Instance Attribute Summary collapse
-
#link ⇒ Object
Returns the value of attribute link.
Instance Method Summary collapse
-
#initialize(credentials, type: :basic) ⇒ Interface <Net::Ldap>
constructor
Used for creating the initial Ldap connection for querying with supplied parameters.
Constructor Details
#initialize(credentials, type: :basic) ⇒ Interface <Net::Ldap>
Used for creating the initial Ldap connection for querying with supplied parameters
16 17 18 19 20 21 22 23 |
# File 'lib/ldap_query/connection.rb', line 16 def initialize(credentials, type: :basic) if type == :auth credentials = filter_auth_credentials(credentials) else valid_credentials?(credentials) end @link = bind_connection(credentials) end |
Instance Attribute Details
#link ⇒ Object
Returns the value of attribute link.
8 9 10 |
# File 'lib/ldap_query/connection.rb', line 8 def link @link end |