-Igor
On 8/30/06, Stefan Arentz <[EMAIL PROTECTED]> wrote:
On 8/30/06, [EMAIL PROTECTED] Imam <[EMAIL PROTECTED]> wrote:
> Why dont you forward all these requests to a dummy page where
> you can take your decision making rather than depending on the
> authorization strategy solely.
>
> Inside the page you can handle requests such that the user is forwarded to a
> sign in page and after successful sign in he is taken to the original page
> he wanted to see.
>
> I had a similar problem I solved using a sign in form inside whose on-submit
> i did the validation and forwarded to the requested page
Thanks for the hints Shams. I ended up with something like this:
public abstract class MyAbstractAuthenticatedPage extends MyAbstractPage
{
protected MyAbstractAuthenticatedPage()
{
super();
if (getBeepSession() == null || getBeepSession().getUser() == null) {
throw new RestartResponseAtInterceptPageException(new LogInPage());
}
}
}
public class MyProfilePage extends MyAbstractAuthenticatedPage
{
public MyProfilePage()
{
super();
... do usual work here ...
}
}
and then in LogInPage:
onSubmit()
{
// Go back to where we came from or to the user's home page
if (continueToOriginalDestination() == false) {
setResponsePage(MyHomePage.class);
}
}
Works excellent. I simply got rid of the whole IAuthorizationStrategy
code since that is not needed anymore for simple page protection like
this.
S.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user