def get_token_audience(token):
    """Retrieve the token's intended audience

    According to the openid-connect spec `aud` may be a string or a list:
        http://openid.net/specs/openid-connect-basic-1_0.html#IDToken

    Args:
        token (dict): The user's decoded bearer token

    Returns:
        list[str]: The list of token audiences
    """

    aud = token.get("aud", [])
    return [aud] if isinstance(aud, str) else aud