diff options
author | Massimiliano Pippi <mpippi@gmail.com> | 2015-07-20 11:38:10 +0200 |
---|---|---|
committer | Massimiliano Pippi <mpippi@gmail.com> | 2015-07-20 11:38:10 +0200 |
commit | 1ee0003814a5f89090f59802cbcccdb1e9f0938d (patch) | |
tree | 51b878a8f43168e44bf0cc991c19ed90d931c7e4 | |
parent | cb74fd7fd2b2d4c899b5c001539912cf1c852858 (diff) | |
download | oauthlib-1ee0003814a5f89090f59802cbcccdb1e9f0938d.tar.gz |
add token_type_hint to the list of default Request params
-rw-r--r-- | oauthlib/common.py | 1 | ||||
-rw-r--r-- | tests/oauth2/rfc6749/endpoints/test_revocation_endpoint.py | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/oauthlib/common.py b/oauthlib/common.py index 41ebc11..df8b8d9 100644 --- a/oauthlib/common.py +++ b/oauthlib/common.py @@ -397,6 +397,7 @@ class Request(object): "state": None, "token": None, "user": None, + "token_type_hint": None, } self._params.update(dict(urldecode(self.uri_query))) self._params.update(dict(self.decoded_body or [])) diff --git a/tests/oauth2/rfc6749/endpoints/test_revocation_endpoint.py b/tests/oauth2/rfc6749/endpoints/test_revocation_endpoint.py index 9ddcc1e..46203d6 100644 --- a/tests/oauth2/rfc6749/endpoints/test_revocation_endpoint.py +++ b/tests/oauth2/rfc6749/endpoints/test_revocation_endpoint.py @@ -32,6 +32,14 @@ class RevocationEndpointTest(TestCase): self.assertEqual(h, {}) self.assertEqual(b, '') self.assertEqual(s, 200) + + # don't specify token_type_hint + body = urlencode([('token', 'foo')]) + h, b, s = self.endpoint.create_revocation_response(self.uri, + headers=self.headers, body=body) + self.assertEqual(h, {}) + self.assertEqual(b, '') + self.assertEqual(s, 200) def test_revoke_token_without_client_authentication(self): self.validator.client_authentication_required.return_value = False |