Skip to content

Commit

Permalink
add token_type_hint to the list of default Request params
Browse files Browse the repository at this point in the history
  • Loading branch information
masci committed Jul 20, 2015
1 parent cb74fd7 commit 1ee0003
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions oauthlib/common.py
Expand Up @@ -397,6 +397,7 @@ def __init__(self, uri, http_method='GET', body=None, headers=None,
"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 []))
Expand Down
8 changes: 8 additions & 0 deletions tests/oauth2/rfc6749/endpoints/test_revocation_endpoint.py
Expand Up @@ -32,6 +32,14 @@ def test_revoke_token(self):
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
Expand Down

0 comments on commit 1ee0003

Please sign in to comment.