From cd9a192027bbbe231a25cca4b46d56f520b42de7 Mon Sep 17 00:00:00 2001 From: Ryan Detzel Date: Sat, 23 Feb 2013 23:32:47 +0100 Subject: [PATCH] method fix for custom authentication --- docs/api-guide/authentication.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api-guide/authentication.md b/docs/api-guide/authentication.md index 8c1d11852..342fabe7b 100644 --- a/docs/api-guide/authentication.md +++ b/docs/api-guide/authentication.md @@ -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