def METHOD_NAME(self, uri, bindName, password, params):
    conn = None
    try:
        conn = ldap.initialize(uri)
        conn.set_option(ldap.OPT_TIMEOUT, _CONNECT_TIMEOUT)
        conn.set_option(ldap.OPT_NETWORK_TIMEOUT, _CONNECT_TIMEOUT)
        conn.bind_s(bindName, password, ldap.AUTH_SIMPLE)
        return {'connected': True}
    except ldap.LDAPError as e:
        return {
            'connected': False,
            'error': 'LDAP connection error: ' + e.args[0].get('desc', 'failed to connect')
        }
    finally:
        if conn:
            conn.unbind_s()