It's really late here and I'm not at a computer, so this is somewhat
pseudo-code, but try this:
// place where you caught that they weren't
// authenticated (before page construction)
String url =
getRequest().getServletResponse().getUrlOrSomethingICantRememberRightNow();
throw new RestartResponseAtInterceptPageException(new
RedirectPage("/perl-stuff/signin.pl?dest=" + url));
Of course, you could encrypt the destination or something if it was critical,
but typically that shouldn't be a problem.
Hope this helps.
Jeremy Thomerson
-- sent from a wireless device
-----Original Message-----
From: "Erik van Oosten" <[EMAIL PROTECTED]>
To: [email protected]
Sent: 1/4/08 2:23 AM
Subject: Re: external login pages
Hi Alex,
Normally you can throw a special exception, the
RestartResponseAtInterceptPageException. Unfortunately I do not think
this will work when the intercept page is external to Wicket.
So the only thing you can do, is put the original URL in a parameter to
the perl page, and let the perl page use that as second redirect. Makes
sense?
Regards,
Erik.
Alex Jacoby wrote:
> I am building a new wicket app that has to use an existing login
> page. The legacy login page is written in perl and sets a login
> cookie before redirecting the user back to a specified URL.
>
> I'm hoping to keep things simple and use role-based authorization for
> pages. In my authenticated app the login page is set to a
> RedirectPage which redirects to the external login page. My problem
> is that I can't figure out how to grab the original URL that sent me
> to the login page, so that I can pass that URL to the external login
> page, and thereby be sent to my original destination after login.
> (Currently I just send them back to the home page, which is annoying.)
>
> Has anyone tried this before? I've got a feeling there's a better way
> I could be doing this -- my current version using AuthenticatedWebApp
> is very kludgy.
>
> Thanks for any ideas,
> Alex
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]