Cees, thanks for the super-fast response!

After reading your email, I thought that maybe it might be an
interaction with CGI::Debug -- it is.   If I comment-out 'use
CGI::Debug' from my application, it works as expected.
With CGI::Debug, I get the following in my browser after logging in:

Empty body!

--- Here is the header --------------------------
Status: 302 Moved
Set-Cookie: CGISESSID=e0697fee843d5d91a375bb0b55a819ef; path=/cgi-bin;
expires=Mon, 29-Jan-2007 06:55:17 GMT Date: Fri, 29 Dec 2006 06:55:17
GMT Location: http://www.someplace.com/cgi-bin/user.cgi


I like CGI::Debug because sometimes it shows errors that CGI::Carp
qw(fatalsToBrowser) doesn't.  But in this case, I guess it's trying to
be too smart (or maybe too dumb?!)

-- Mark

On 12/29/06, Cees Hek <[EMAIL PROTECTED]> wrote:
On 12/29/06, Mark Rajcok <[EMAIL PROTECTED]> wrote:
> I'm using CGI::Application::Plugin::Authentication and I'd like to
> have the application remember what runmode a user was trying to access
> if authentication is needed.
>
> For example, a user clicks on a link to 'page7' (or page6), but
> page7/page6 requires authentication, so the login page displays, but
> after the user logs in, I want page7/page6 to display.

Hi Mark,

By default, that is what should be happening.  The provided login page
includes a hidden field called 'destination' which is set to the
original URL that was called.  On successful authentication, an
external redirect is called with that URL, which should bring the user
to the correct page that they were originally trying to access.

If you provided the POST_LOGIN_RUNMODE or POST_LOGIN_URL config
options, then those would take presidence.

If you have provided your own login box, then make sure that you
manually set the 'destination' parameter in the login form.  The rest
should happen automatically.

Cheers,

Cees

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
             http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to