On Tue, 2002-04-09 at 05:41, Joel Gwynn wrote:
> This is something I can figure out myself, but I thought you all might
> have a more elegant solution.  Basically I'm emailing a link saying,
> 'changes were made to this project.  to see them, please go to
> http://www.myproject.com/cgi-bin/myproject.cgi?action=viewchange
> <http://www.myproject.com/cgi-bin/myproject.cgi?action=viewchange&change
> _id=2&other_param=whatever.'> &change_id=2&other_param=whatever.'
>  
> Now, after they click on the link, if they're logged out, they have to
> log in again.  What's the best way to preserve that original target with
> all the parameters?  Will I be using a redirect?

If you are lucky enough to be using mod_perl, then I would recommend
using Apache::AuthCookie for this.  It will handle all of this for you
(automatic redirection to a login form and sending the user back to
where they were initially heading when they've logged in), and keep it
all outside of your application code.  Apache::AuthCookie actually ties
into the Apache Authentication and Authorization stages of the request
cycle.

Using Apache's Authentication and Authorization means your code will not
even be touched by an unauthorized user.  Also, when your code starts
you know the $REMOTE_USER environment variable will be set to the user
that is currently logged in.

It is very versatile and keeps your code clean.

Cees


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to