diff options
author | Jonathan Huot <jonathan.huot@thomsonreuters.com> | 2018-08-02 10:29:22 +0200 |
---|---|---|
committer | Jonathan Huot <jonathan.huot@thomsonreuters.com> | 2018-08-02 10:29:22 +0200 |
commit | 1d07167210297cd9691e5397f09477fea5df5279 (patch) | |
tree | f7e9b97dc966161b11c21945b58922f50441f187 /oauthlib/oauth2/rfc6749/parameters.py | |
parent | c9ead44e9c3bef100a6434ffbe56a002d54f0475 (diff) | |
parent | fbacd77b602e4c60f8da2413c150fa7f20b2f83c (diff) | |
download | oauthlib-431-customerrors.tar.gz |
Merge branch 'master' into 431-customerrors431-customerrors
Diffstat (limited to 'oauthlib/oauth2/rfc6749/parameters.py')
-rw-r--r-- | oauthlib/oauth2/rfc6749/parameters.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/oauthlib/oauth2/rfc6749/parameters.py b/oauthlib/oauth2/rfc6749/parameters.py index 0107933..9ea8c44 100644 --- a/oauthlib/oauth2/rfc6749/parameters.py +++ b/oauthlib/oauth2/rfc6749/parameters.py @@ -362,16 +362,13 @@ def parse_token_response(body, scope=None): # https://github.com/oauthlib/oauthlib/issues/267 params = dict(urlparse.parse_qsl(body)) - for key in ('expires_in', 'expires'): - if key in params: # cast a couple things to int + for key in ('expires_in',): + if key in params: # cast things to int params[key] = int(params[key]) if 'scope' in params: params['scope'] = scope_to_list(params['scope']) - if 'expires' in params: - params['expires_in'] = params.pop('expires') - if 'expires_in' in params: params['expires_at'] = time.time() + int(params['expires_in']) |