Package expedient :: Package common :: Package middleware :: Module basicauth :: Class HTTPBasicAuthMiddleware
[hide private]
[frames] | no frames]

Class HTTPBasicAuthMiddleware

source code


Middleware that logs in users using HTTP Basic Authnetication. The list of protected paths is specified as regular expressions in the settings.BASIC_AUTH_URLS tuple. All URLs there will require basic HTTP authentication.

The middleware checks if the request has the HTTP_AUTHORIZATION header and that there is no "REMOTE_USER" already set in the request by an external web server. It then authenticates the user and logs her in or redirects to an "Authorization Required" page.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
process_request(self, request) source code

Inherited from utils.RegexMatcher: matches

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)