This can be simplified to:

    return "openid" in allowed_types