[mod_python] callable __auth__

Graham Dumpleton grahamd at dscpl.com.au
Wed Feb 22 05:17:02 EST 2006

On 22/02/2006, at 6:47 AM, Robert Thomas Davis wrote:

> Hello Graham
> Thanks; in my investigation I had already come across
> that problem description...and tried it to no avail.
> this was how I was trying to do it...
> def foo(req):
>    def __auth__(req, user, pass):
>       #do session and auth stuff
>    # code to protect

Did you at least change the auth realm when you moved the function?
The browser will remember the username/password for the prior
realm until the browser is quit. This can often be a trap when testing
authentication stuff.

Have you added logging into your auth function to check whether it
is being called or not?

Can you create the most minimal example you think demonstrates the
problem and post it on the list? You keep posting snippets and without
it all, hard to tell if there are things that might have been missed.


More information about the Mod_python mailing list