my mistake. one intercept is enough. i tried to call redirectToInterceptPage() in Sign In and in WhatEver.

Tks again.

----- Original Message ----- From: "Cristi Manole" <[EMAIL PROTECTED]>
To: <users@wicket.apache.org>
Sent: Friday, October 19, 2007 10:58 PM
Subject: Re: Double "intercept"


I think you didn't understand, but tks a lot for your idea.

What i need is:

1. i have a page which is annotated to be created only if authenticated.
2. if the user is not autheticated and wants to go to that page, he will be redirected to sign in page. 3. on the sign in page, after the user logges in, i want the user to be redirected to another page, where by pressing a button he will end up in the original page (now being authenticated).

My problem is if i put setResponsePage(WhatEverPage.class) in SignIn class, when i'm on WhatEver class, i cannot say continueToOriginalDestination cause the original page will no longer be on PageMap (i think) -> it will return false always.

So , again, how can i do this? :-?

Tks in advance.
----- Original Message ----- From: "Maurice Marrink" <[EMAIL PROTECTED]>
To: <users@wicket.apache.org>
Sent: Friday, October 19, 2007 9:48 PM
Subject: Re: Double "intercept"


Not sure why you would want the double redirect ..... but here goes.
Use either Swarm, Auth-roles or a custom security implementation to
redirect you to a login page. After sign-in use setResponsePage to
redirect the user to your other page. In that page you can then return
the user to the original page by calling
continueToOriginalDestination() followed by a return in the
constructor. However keep in mind that there is not always an original
destination (see return value of continueToOriginalDestination()).

The above is just as easily accomplished with just one intercept. By
using this little construct in your sign-in page after signing in.

if (!getPage().continueToOriginalDestination())
{
setResponsePage(WhatEverPage.class); //or new WhatEverPage(complex
constructor);
}

Maurice

On 10/19/07, Cristi Manole <[EMAIL PROTECTED]> wrote:
Hello,

I was wondering if the following use case can be implemented in wicket:

-> a page requires authentification (@AuthorizeInstantiation())
-> if it's not authentif, it will be intercepted by a SignIn.class
-> based on a rule, i want to send the user to another page.
-> that page will redirect the user to the original page.

How could I accomplish this?

Thanks in advance.


---------------------------------------------------------------------
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]

Reply via email to