'Makes an authz decision query based on a previously received
Assertion.
:param destination: The IdP endpoint to send the request to
:param assertion: An Assertion instance
:param action: The action you want to perform (has to be at least one)
:param resource: The resource you want to perform the action on
:param subject: Who wants to do the thing
:param message_id: Message identifier
:param consent: If the principal gave her consent to this request
:param extensions: Possible request extensions
:param sign: Whether the request should be signed or not.
:return: AuthzDecisionQuery instance'

def create_authz_decision_query_using_assertion(self, destination, assertion, action=None, resource=None, subject=None, message_id=0, consent=None, extensions=None, sign=False, nsprefix=None):

    if action:
        if isinstance(action, basestring):
            _action = [saml.Action(text=action)]
        else:
            _action = [saml.Action(text=a) for a in action]
    else:
        _action = None
    return self.create_authz_decision_query(destination, _action, saml.Evidence(assertion=assertion), resource, subject, message_id=message_id, consent=consent, extensions=extensions, sign=sign, nsprefix=nsprefix)
