def validate_consumer(consumer):
    if not hasattr(consumer, "key"):
        raise ValueError("Invalid consumer.")
    return consumer
validate a consumer agains oauth2.Consumer object
dataset/ETHPy150Open benoitc/restkit/restkit/filters.py/validate_consumer