Module: AD::ConnectionFactory
- Defined in:
- lib/ad/connection_factory.rb
Constant Summary collapse
- ServiceUserBindError =
Class.new(StandardError)
Class Method Summary collapse
Class Method Details
.service_user_connection ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/ad/connection_factory.rb', line 15 def service_user_connection connection = unauthenticated_connection connection.auth( Net::LDAP::DN.new(AD.service_user_dn).to_s, AD.service_user_password ) unless connection.bind raise ServiceUserBindError, connection.get_operation_result end connection end |