if you search this list for wicket-auth-roles you will see that the
project is meant as an example, not as something for you to base your
project on. if some piece doesnt do what you want then roll your own
piece. the codebase is kept simple on purpose - it has to be easy to
read - because it is an example.

-igor

On Wed, May 6, 2009 at 7:02 AM, Khlystov Alexandr <a...@ovservice.org> 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: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to