def token_response(**kwargs):
    _areq = kwargs["areq"]
    _scode = kwargs["scode"]
    _sdb = kwargs["sdb"]
    _dic = _sdb.upgrade_to_token(_scode, issue_refresh=False)

    aresp = AccessTokenResponse(**by_schema(AccessTokenResponse, **_dic))

    try:
        aresp["state"] = _areq["state"]
    except __HOLE__:
        pass

    add_non_standard(_areq, aresp)
    return aresp


# noinspection PyUnusedLocal
dataset/ETHPy150Open rohe/pyoidc/src/oic/oauth2/provider.py/token_response