mod_python, user missing

grahamd at dscpl.com.au grahamd at dscpl.com.au
Fri Mar 25 17:52:47 EST 2005


Okay, reason it doesn't work is that req.get_basic_auth_pw() only
applies when using Apache itself to perform the user authentication.
Ie., where in Apache configuration files you have something like:

  AuthType Basic
  AuthName "VIP"
  AuthUserFile /tmp/pwdb
  Require user noppa

It doesn't work when using mod_python.publisher style authentication
as that is done in mod_python and not by Apache. Thus, you would
need to assign to req.user in the __auth__ method as I described to
have it so it is accessible in the published method. You will not need
to call the req.get_basic_auth_pw() function.




More information about the Python-list mailing list