def matches(event, token_values):
    """See if the token matches the revocation event.

    A brute force approach to checking.
    Compare each attribute from the event with the corresponding
    value from the token.  If the event does not have a value for
    the attribute, a match is still possible.  If the event has a
    value for the attribute, and it does not match the token, no match
    is possible, so skip the remaining checks.

    :param event: a RevokeEvent instance
    :param token_values: dictionary with set of values taken from the
                         token
    :returns: True if the token matches the revocation event, indicating the
              token has been revoked
    """
    if event.domain_id is not None and event.domain_id not in (token_values
        ['identity_domain_id'], token_values['assignment_domain_id']):
        return False
    if event.domain_scope_id is not None and event.domain_scope_id not in (
        token_values['assignment_domain_id'],):
        return False
    if event.expires_at is not None and event.expires_at not in (token_values
        ['expires_at'],):
        return False
    if event.trust_id is not None and event.trust_id not in (token_values[
        'trust_id'],):
        return False
    if event.consumer_id is not None and event.consumer_id not in (token_values
        ['consumer_id'],):
        return False
    if event.audit_chain_id is not None and event.audit_chain_id not in (
        token_values['audit_chain_id'],):
        return False
    if event.role_id is not None and event.role_id not in token_values['roles'
        ]:
        return False
    return True
