Remove LDAP options
This commit is contained in:
parent
22c2c6f6f5
commit
975c37afe4
1 changed files with 0 additions and 7 deletions
|
@ -25,16 +25,9 @@ class LDAP:
|
|||
def __init__(self):
|
||||
""" Initialize the LDAP object """
|
||||
|
||||
ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_NEVER)
|
||||
self.ldap_obj = ldap.initialize(
|
||||
"{PROTOCOL}://{URL}:{PORT}".format(**self.LDAP_SERVER)
|
||||
)
|
||||
self.ldap_obj.set_option(ldap.OPT_REFERRALS, 0)
|
||||
self.ldap_obj.set_option(ldap.OPT_PROTOCOL_VERSION, 3)
|
||||
self.ldap_obj.set_option(ldap.OPT_X_TLS, ldap.OPT_X_TLS_DEMAND)
|
||||
self.ldap_obj.set_option(ldap.OPT_X_TLS_DEMAND, True)
|
||||
self.ldap_obj.set_option(ldap.OPT_NETWORK_TIMEOUT, 10)
|
||||
self.ldap_obj.set_option(ldap.OPT_TIMEOUT, 10)
|
||||
|
||||
def search(self, filters="(objectClass=*)"):
|
||||
"""Do a ldap.search_s with the given filters, as specified for
|
||||
|
|
Loading…
Reference in a new issue