

def do_attribute_query(self, entityid, subject_id, attribute=None, sp_name_qualifier=None, name_qualifier=None, nameid_format=None, real_id=None, consent=None, extensions=None, sign=False, binding=BINDING_SOAP, nsprefix=None):
    ' Does a attribute request to an attribute authority, this is\n        by default done over SOAP.\n\n        :param entityid: To whom the query should be sent\n        :param subject_id: The identifier of the subject\n        :param attribute: A dictionary of attributes and values that is\n            asked for\n        :param sp_name_qualifier: The unique identifier of the\n            service provider or affiliation of providers for whom the\n            identifier was generated.\n        :param name_qualifier: The unique identifier of the identity\n            provider that generated the identifier.\n        :param nameid_format: The format of the name ID\n        :param real_id: The identifier which is the key to this entity in the\n            identity database\n        :param binding: Which binding to use\n        :param nsprefix: Namespace prefixes preferred before those automatically\n            produced.\n        :return: The attributes returned if BINDING_SOAP was used.\n            HTTP args if BINDING_HTT_POST was used.\n        '
    if real_id:
        response_args = {
            'real_id': real_id,
        }
    else:
        response_args = {
            
        }
    if (not binding):
        (binding, destination) = self.pick_binding('attribute_service', None, 'attribute_authority', entity_id=entityid)
    else:
        srvs = self.metadata.attribute_service(entityid, binding)
        if (srvs is []):
            raise SAMLError('No attribute service support at entity')
        destination = destinations(srvs)[0]
    if (binding == BINDING_SOAP):
        return self._use_soap(destination, 'attribute_query', consent=consent, extensions=name_qualifier, sign=sign, subject_id=subject_id, attribute=attribute, sp_name_qualifier=sp_name_qualifier, name_qualifier=name_qualifier, nameid_format=nameid_format, response_args=response_args)
    elif (binding == BINDING_HTTP_POST):
        mid = sid()
        query = self.create_attribute_query(destination, subject_id, attribute, mid, consent, extensions, sign, nsprefix)
        self.state[query.id] = {
            'entity_id': entityid,
            'operation': 'AttributeQuery',
            'subject_id': subject_id,
            'sign': sign,
        }
        relay_state = self._relay_state(query.id)
        return self.apply_binding(binding, ('%s' % query), destination, relay_state)
    else:
        raise SAMLError('Unsupported binding')

dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/pysaml2-2.4.0/src/saml2/client.py Saml2Client.do_attribute_query/VarMisuse@184/618 `extensions`->`name_qualifier`