The typical Wicket Way (tm) of doing this is using the
RestartResponseAtInterceptPageException [1]

The wicket-auth-roles project and the new wicket-security projects
hosted at WicketStuff  also use it to guard authorized pages.

Using a framework as Acegi limits you to URL based
authorization/authentication. The component nature of Wicket allows
even finer grained access to data at the component level.

A typical way for applications to secure pages is to create a secure
and a non-secure hierarchy. The non-secure pages are viewable publicly
(for instance your login page) and the privacy/protected pages will
inherit from the secure base page. In its constructor you check if the
user credentials are set on the session, if not, throw
RestartResponseAtInterceptPageException and be done with it :)

Martijn

[1] 
http://wicket.sourceforge.net/apidocs/wicket/RestartResponseAtInterceptPageException.html

On 5/28/07, Luca Marrocco <[EMAIL PROTECTED]> wrote:
> I'm not sure that exist a better way to do anything in software but a
> better way for specific problem and people. For me, in a spring wicket
> web application, the better way to implement trasparent login aka
> autentication and autorization concern is using acegi framework. Luca
>
> 2007/5/28, Thomas Singer <[EMAIL PROTECTED]>:
> > What's the best way for a transparent login?
> >
> > Example: When the user opens a mounted page and he is not logged in, a login
> > page will be shown and after a successful login redirected to the originally
> > requested page.
> >
> > Tom
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > _______________________________________________
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-- 
Join the wicket community at irc.freenode.net: ##wicket
Wicket 1.2.6 contains a very important fix. Download Wicket now!
http://wicketframework.org

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to