Commit 42aaa9cc by Tom Christie

Merge pull request #674 from ryanrdetzel/master

Fix for example in authentication.html
parents 4599cd97 cd9a1920
......@@ -202,7 +202,7 @@ If the `.authenticate_header()` method is not overridden, the authentication sch
The following example will authenticate any incoming request as the user given by the username in a custom request header named 'X_USERNAME'.
class ExampleAuthentication(authentication.BaseAuthentication):
def has_permission(self, request, view, obj=None):
def authenticate(self, request):
username = request.META.get('X_USERNAME')
if not username:
return None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment