

def handle_logout_request(self, request, name_id, binding, sign=False, relay_state=''):
    '\n        Deal with a LogoutRequest\n\n        :param request: The request as text string\n        :param name_id: The id of the current user\n        :param binding: Which binding the message came in over\n        :param sign: Whether the response will be signed or not\n        :return: Keyword arguments which can be used to send the response\n            what\'s returned follow different patterns for different bindings.\n            If the binding is BINDIND_SOAP, what is returned looks like this::\n\n                {\n                    "data": <the SOAP enveloped response>\n                    "url": "",\n                    \'headers\': [(\'content-type\', \'application/soap+xml\')]\n                    \'method\': "POST\n                }\n        '
    logger.info(('logout request: %s' % request))
    _req = self._parse_request(request, LogoutRequest, 'single_logout_service', binding)
    if (_req.message.name_id == name_id):
        try:
            if self.local_logout(name_id):
                status = success_status_factory()
            else:
                status = status_message_factory('Server error', STATUS_REQUEST_DENIED)
        except KeyError:
            status = status_message_factory('Server error', STATUS_REQUEST_DENIED)
    else:
        status = status_message_factory('Wrong user', STATUS_UNKNOWN_PRINCIPAL)
    if (binding == BINDING_SOAP):
        response_bindings = [BINDING_SOAP]
    elif ((binding == BINDING_HTTP_POST) or BINDING_HTTP_REDIRECT):
        response_bindings = [BINDING_HTTP_POST, BINDING_HTTP_REDIRECT]
    else:
        response_bindings = self.config.preferred_binding['single_logout_service']
    response = self.create_logout_response(_req.message, response_bindings, status, sign)
    rinfo = self.response_args(_req.message, response_bindings)
    return self.apply_binding(rinfo['binding'], binding, rinfo['destination'], relay_state, response=True)

dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/pysaml2-2.4.0/src/saml2/client.py Saml2Client.handle_logout_request/VarMisuse@225/601 `response`->`binding`