[mod_python] getting username when using publisher auth

Adrien Plisson rien at yeepa.org
Sun May 12 10:29:27 EST 2002


From: "Hugo van der Merwe" <s13361562 at bach.sun.ac.za>
> def test(req):
>     def __auth__(req, user, passwd):
>         if user == "eggs" and passwd == "spam":
>             return 1
>         else:
>             return 0
> 
>     return "Hello "+str(req.connection.user)
> 
> returns "Hello None"... adding a call to req.get_basic_auth_pw() does 
> not help.

try calling "req.get_basic_auth_pw()" BEFORE calling "req.connection.user"

-- 
rien






More information about the Mod_python mailing list