Esempio n. 1
0
 def attribute_query_response(self, response, **kwargs):
     try:
         # synchronous operation
         aresp = attribute_response(self.config, self.config.entityid)
     except Exception, exc:
         logger.error("%s", (exc,))
         return None
Esempio n. 2
0
 def attribute_query_response(self, response, **kwargs):
     try:
         # synchronous operation
         aresp = attribute_response(self.config, self.config.entityid)
     except Exception, exc:
         logger.error("%s", (exc, ))
         return None
Esempio n. 3
0
                log.info("SoapClient exception: %s" % (exc,))
            return None

        if log:
            log.info("SOAP request sent and got response: %s" % response)
        #            fil = open("response.xml", "w")
        #            fil.write(response)
        #            fil.close()

        if response:
            if log:
                log.info("Verifying response")

            try:
                # synchronous operation
                aresp = attribute_response(self.config, issuer, log=log)
            except Exception, exc:
                if log:
                    log.error("%s", (exc,))
                return None

            _resp = aresp.loads(response, False, soapclient.response).verify()
            if _resp is None:
                if log:
                    log.error("Didn't like the response")
                return None

            session_info = _resp.session_info()

            if session_info:
                if real_id is not None:
Esempio n. 4
0
    try:
        if sign:
            response = HTTP.send(request, path=destination, sign=True,
                                 sec=cls.sec)
        else:
            response = HTTP.send(request, path=destination)
    except Exception, exc:
        exception_trace("SoapClient exception", exc, log)
        return None

    if response:
        try:
            # synchronous operation
            return_addr = cls.config.endpoint('assertion_consumer_service')[0]
            aresp = attribute_response(cls.config, return_addr, log=log)
            aresp.allow_unsolicited = True
            aresp.asynchop = False
            #aresp.debug = True
        except Exception, exc:
            exception_trace("response error", exc, log)
            return None

        try:
            _resp = aresp.loads(response, False, HTTP.response).verify()
        except Exception, exc:
            exception_trace("response parsing error", exc, log)
            return None
        if _resp is None:
            if log:
                log.error("Didn't like the response")
Esempio n. 5
0
            response = soapclient.send(request)
        except Exception, exc:
            logger.info("SoapClient exception: %s" % (exc, ))
            return None

        logger.info("SOAP request sent and got response: %s" % response)
        #            fil = open("response.xml", "w")
        #            fil.write(response)
        #            fil.close()

        if response:
            logger.info("Verifying response")

            try:
                # synchronous operation
                aresp = attribute_response(self.config, issuer)
            except Exception, exc:
                logger.error("%s", (exc, ))
                return None

            _resp = aresp.loads(response, False, soapclient.response).verify()
            if _resp is None:
                logger.error("Didn't like the response")
                return None

            session_info = _resp.session_info()

            if session_info:
                if real_id is not None:
                    session_info["name_id"] = real_id
                self.users.add_information_about_person(session_info)