summaryrefslogtreecommitdiff
path: root/oauthlib/oauth2/rfc6749
diff options
context:
space:
mode:
authorIb Lundgren <ib.lundgren@gmail.com>2013-10-10 13:53:29 -0700
committerIb Lundgren <ib.lundgren@gmail.com>2013-10-10 13:53:29 -0700
commitf66c1e33eedc71e2ff75ea924cd4cbdbf10d4086 (patch)
tree5b6ba6df7653f549f49a14f5d349fd5fb69ae9a9 /oauthlib/oauth2/rfc6749
parent90c70eefd39cdde705c1b741cdb5acdf35cf9d5a (diff)
parent5a85227295dbd7e23138acd921cc058206bb062c (diff)
downloadoauthlib-f66c1e33eedc71e2ff75ea924cd4cbdbf10d4086.tar.gz
Merge pull request #216 from ButchershopCreative/master
Set headers on client credentials access token response
Diffstat (limited to 'oauthlib/oauth2/rfc6749')
-rw-r--r--oauthlib/oauth2/rfc6749/grant_types/client_credentials.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/oauthlib/oauth2/rfc6749/grant_types/client_credentials.py b/oauthlib/oauth2/rfc6749/grant_types/client_credentials.py
index 6641f1f..e69e29d 100644
--- a/oauthlib/oauth2/rfc6749/grant_types/client_credentials.py
+++ b/oauthlib/oauth2/rfc6749/grant_types/client_credentials.py
@@ -61,6 +61,11 @@ class ClientCredentialsGrant(GrantTypeBase):
.. _`Section 5.1`: http://tools.ietf.org/html/rfc6749#section-5.1
.. _`Section 5.2`: http://tools.ietf.org/html/rfc6749#section-5.2
"""
+ headers = {
+ 'Content-Type': 'application/json;charset=UTF-8',
+ 'Cache-Control': 'no-store',
+ 'Pragma': 'no-cache',
+ }
try:
log.debug('Validating access token request, %r.', request)
self.validate_token_request(request)
@@ -71,7 +76,7 @@ class ClientCredentialsGrant(GrantTypeBase):
token = token_handler.create_token(request, refresh_token=False)
log.debug('Issuing token to client id %r (%r), %r.',
request.client_id, request.client, token)
- return {}, json.dumps(token), 200
+ return headers, json.dumps(token), 200
def validate_token_request(self, request):
if not getattr(request, 'grant_type'):