summaryrefslogtreecommitdiff
path: root/docs/oauth2
diff options
context:
space:
mode:
authorYohan Boniface <yb@enix.org>2015-10-26 19:12:36 +0100
committerYohan Boniface <yb@enix.org>2015-10-26 19:12:36 +0100
commite84bd3e859bbc34bcad6591da9faf1cfb16a954f (patch)
tree6c4c5c138930ea06787135a40495a45cc56544d8 /docs/oauth2
parentcb93e78e14663cf78827512928c3ffccdf9d34ed (diff)
downloadoauthlib-e84bd3e859bbc34bcad6591da9faf1cfb16a954f.tar.gz
Code ident in server doc
Diffstat (limited to 'docs/oauth2')
-rw-r--r--docs/oauth2/server.rst16
1 files changed, 8 insertions, 8 deletions
diff --git a/docs/oauth2/server.rst b/docs/oauth2/server.rst
index 87f7e7d..182e174 100644
--- a/docs/oauth2/server.rst
+++ b/docs/oauth2/server.rst
@@ -405,14 +405,14 @@ The example using Django but should be transferable to any framework.
# All requests to /token will return a json response, no redirection.
return response_from_return(headers, body, status)
- def response_from_return(headers, body, status):
- response = HttpResponse(content=body, status=status)
- for k, v in headers.items():
- response[k] = v
- return response
-
- def response_from_error(e)
- return HttpResponseBadRequest('Evil client is unable to send a proper request. Error is: ' + e.description)
+ def response_from_return(headers, body, status):
+ response = HttpResponse(content=body, status=status)
+ for k, v in headers.items():
+ response[k] = v
+ return response
+
+ def response_from_error(e)
+ return HttpResponseBadRequest('Evil client is unable to send a proper request. Error is: ' + e.description)
5. Protect your APIs using scopes