'Connect to an LDAP server specified by an ldap
configuration dictionary.
:param dict conf: LDAP configuration
:return: an LDAP object'

def connect(self, conf):

    uri = ('ldap://%s:%d' % (conf['ldap_server'], conf['ldap_server_port']))
    connection = ldap.initialize(uri)
    if conf['ldap_tls']:
        connection.start_tls_s()
    return connection
