code: def do(self, response, binding, relay_state="", mtype="response"):
          
          # tmp_outstanding_queries = dict(self.outstanding_queries)
          if not response:
              logger.info("Missing Response")
              resp = Unauthorized("Unknown user")
              return resp(self.environ, self.start_response)
  
          try:
              conv_info = {
                  "remote_addr": self.environ["REMOTE_ADDR"],
                  "request_uri": self.environ["REQUEST_URI"],
                  "entity_id": self.sp.config.entityid,
                  "endpoints": self.sp.config.getattr("endpoints", "sp"),
              }
  
              self.response = self.sp.parse_authn_request_response(
                  response,
                  binding,
                  self.outstanding_queries,
                  self.cache.outstanding_certs,
                  conv_info=conv_info,
              )
          except UnknownPrincipal as excp:
              logger.error("UnknownPrincipal: %s", excp)
              resp = ServiceError("UnknownPrincipal: %s" % (excp,))
              return resp(self.environ, self.start_response)
          except UnsupportedBinding as excp:
              logger.error("UnsupportedBinding: %s", excp)
              resp = ServiceError("UnsupportedBinding: %s" % (excp,))
              return resp(self.environ, self.start_response)
          except VerificationError as err:
              resp = ServiceError("Verification error: %s" % (err,))
              return resp(self.environ, self.start_response)
          except SignatureError as err:
              resp = ServiceError("Signature error: %s" % (err,))
              return resp(self.environ, self.start_response)
          except Exception as err:
              resp = ServiceError("Other error: %s" % (err,))
              return resp(self.environ, self.start_response)
  
          logger.info("AVA: %s", self.response.ava)
  
          user = User(self.response.name_id, self.response.ava, self.response)
          cookie = self.cache.set_cookie(user)
  
          resp = Redirect("/", headers=[cookie])
          return resp(self.environ, self.start_response)
docs: :param response: The SAML response, transport encoded
          :param binding: Which binding the query came in over