diff options
| author | Seth Davis <seth@curiasolutions.com> | 2018-06-30 18:09:26 -0400 |
|---|---|---|
| committer | Pieter Ennes <pieter@ennes.nl> | 2018-06-30 23:09:26 +0100 |
| commit | 3eaf962311dfbc566dbfa66a988e0331b91184be (patch) | |
| tree | 3bf200230f1cba4dcd4170762f7b0535b1f2f138 /oauthlib | |
| parent | 481a4ec2e29530541ff8985cce938ece7a661562 (diff) | |
| download | oauthlib-3eaf962311dfbc566dbfa66a988e0331b91184be.tar.gz | |
Remove handling of nonstandard parameter "expires" (#506)
Diffstat (limited to 'oauthlib')
| -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']) |
