def _verify(self, pwd, user):
        """
        Verifies the username and password agains a LDAP server
        :param pwd: The password
        :param user: The username
        :return: AssertionError if the LDAP verification failed.
        """
        _dn = self.dn_pattern % user
        try:
            self.ldap.simple_bind_s(_dn, pwd)
        except Exception:
            raise AssertionError()
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/pysaml2-2.4.0/src/saml2/authn.py/LDAPAuthn._verify/original