[mod_python] Forcing a confirmation page after authentication

David Fraser davidf at sjsoft.com
Thu Oct 7 13:29:09 EDT 2004


I would recommend trying a cookies-based authentication (e.g. 
mod_python's builtin session support) rather, as HTTP authentication is 
done once per request and so its difficult to establish when the login 
occurs...

David

Todd Boland wrote:

> What I would recommend is an internal redirect after authentication. 
> Only redirect if they have not seen the message. in the handler that 
> displays the message which you internally redirected to, you could set 
> a cookie to indicate they've seen the message and add the link "<a 
> href=%s>continue</a>" % req.prev.unparsed_uri so they don't have to 
> re-navigate to the page they originally requested.
>
> I hope I helped more than I confused you.
>
> Todd
>
>
>
> On Oct 6, 2004, at 1:53 PM, Thomas Andrews wrote:
>
>> I'm sorry if this is a totally obvious one - I'm new to Apache & 
>> mod_python.
>>
>> How do I make a page come up *every* time a visitor has been
>> authenticated, irrespective of what page they request ? I want to force
>> them to confirm some data just after they have authenticated. After that
>> I want them to browse the existing html pages unhindered.
>>
>> I'm already using PythonAuthenHandler so that I can do the
>> authentication myself and that's working, but I just don't know how to
>> feed into my next page from there because that handler doesn't expect me
>> to print anything out to the browser - it just wants to see a
>> return-code (as I understand it.)
>>
>> There are these other handlers:
>>
>> * PythonPostReadRequestHandler
>> * PythonTransHandler
>> * PythonHeaderParserHandler
>> * PythonAccessHandler
>> * PythonTypeHandler
>> * PythonFixupHandler
>> * PythonHandler
>> * PythonInitHandler
>> * PythonLogHandler
>> * PythonCleanupHandler
>>
>> ... but none of them seem to do what I need. (or did I miss something?)
>>
>> Thanks for the help,
>> Thomas 
>



More information about the Mod_python mailing list