Are you using acegi/spring-security? If so, have you looked into using their "remember me" filter:
http://static.springframework.org/spring-security/site/reference/html/remember-me.html On Wed, May 6, 2009 at 10:02 AM, Khlystov Alexandr <[email protected]> wrote: > > Guys? if really nobody has implemented the auto-login via cookie, basing on > AuthenticatedWebApplication ??? > > Khlystov Alexandr пишет: >> >> Hello all. >> >> Previous answers did not helped me much. Though thanks authors for their >> replies. >> >> I am going to provide more detailed question: >> >> My App extends AuthenticatedWebApplication { >> >> And I want to implement auto-login/remember me feature. >> More precisely - when user submits to browser URL for some Wicket page >> (and user is not yet logged in) he should be able to see this page without >> seeing SignInPage (if he set at previous session "remember me" check box at >> SignInPage). >> >> I can't understand how can I achive that with the >> AuthenticatedWebApplication. How can I handle redirecting user to the >> SignInPage at org.apache.wicket.authentication;AuthenticatedWebApplication >> final method: onUnauthorizedInstantiation: >> ... >> public final void onUnauthorizedInstantiation(final Component component) >> { >> // If there is a sign in page class declared, and the unauthorized >> // component is a page, but it's not the sign in page >> if (component instanceof Page) >> { >> if (!AuthenticatedWebSession.get().isSignedIn()) >> { >> // Redirect to intercept page to let the user sign in >> throw new >> RestartResponseAtInterceptPageException(getSignInPageClass()); >> } >> else >> { >> onUnauthorizedPage((Page)component); >> } >> } >> else >> { >> // The component was not a page, so throw an exception >> throw new >> UnauthorizedInstantiationException(component.getClass()); >> } >> } >> ... >> >> As it is final I can't override the line: >> ... >> throw new >> RestartResponseAtInterceptPageException(getSignInPageClass()); >> ... >> >> to make setting SignInPage optional, depending on the cookie, and if >> cookie is given from "remember me" checkbox - than to authenticate user just >> by login retrieved from the cookie. And do not show SignInPage and do not do >> any "redirectToInterceptPage". >> >> Thanks in advance! >> >> P.S. >> I think Wicket as a project requires more detailed and features-wide >> reference documentation. >> >> Khlystov Alexandr пишет: >>> >>> Good day. >>> >>> Can anyone, please, give an example, or direct wicket API description >>> about "remember me" at login page feature. >>> >>> Thanks in advance. >>> >> >> > > > -- > Khlystov Alexandr > > > --------------------------------------------------------------------- > 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]
