def get_token_details(token, tenant_id=None):
    try:
        token_id_driver = identity.token_id_driver()
        token_details = token_id_driver.token_from_id(token)
    except (TypeError, ValueError):
        raise exceptions.Unauthorized('Invalid Key')

    if token_details['expires'] > time.time():
        raise exceptions.Unauthorized('Expired Key')

    if tenant_id and str(token_details['tenant_id']) != tenant_id:
        raise exceptions.Unauthorized('Tenant/token Mismatch')

    return token_details
dataset/ETHPy150Open softlayer/jumpgate/jumpgate/common/sl/auth.py/get_token_details/swapped operands of `>`