@@ -194,6 +194,24 @@ You *may* also override the `.authentication_header(self, request)` method. If
...
@@ -194,6 +194,24 @@ You *may* also override the `.authentication_header(self, request)` method. If
If the `.authentication_header()` method is not overridden, the authentication scheme will return `HTTP 403 Forbidden` responses when an unauthenticated request is denied access.
If the `.authentication_header()` method is not overridden, the authentication scheme will return `HTTP 403 Forbidden` responses when an unauthenticated request is denied access.
## Example
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):