summaryrefslogtreecommitdiff
path: root/oauthlib/oauth2/rfc6749/parameters.py
diff options
context:
space:
mode:
authorJonathan Huot <jonathan.huot@thomsonreuters.com>2018-08-02 10:29:22 +0200
committerJonathan Huot <jonathan.huot@thomsonreuters.com>2018-08-02 10:29:22 +0200
commit1d07167210297cd9691e5397f09477fea5df5279 (patch)
treef7e9b97dc966161b11c21945b58922f50441f187 /oauthlib/oauth2/rfc6749/parameters.py
parentc9ead44e9c3bef100a6434ffbe56a002d54f0475 (diff)
parentfbacd77b602e4c60f8da2413c150fa7f20b2f83c (diff)
downloadoauthlib-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.py7
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'])