Skip to content

Commit

Permalink
Merge pull request #362 from masci/token_type_hint_missing
Browse files Browse the repository at this point in the history
Add token_type_hint to the list of default Request params
  • Loading branch information
lepture committed Jul 23, 2015
2 parents cb74fd7 + 1ee0003 commit c7ddf2d
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 c7ddf2d

Please sign in to comment.