this is the problem descirbed in first letter:

I can't
change this behavior, because this check:
...
if
(!AuthenticatedWebSession.get().isSignedIn()
...

Is place
in final method of AuthenticatedWebSession.
:)

> Well..
darn ... then do not call and check the cookie :)
> 
>  if
(!AuthenticatedWebSession.get().isSignedIn() &&
(!myOwnCookieCheck()))
> {
> :...
> }
>

> **
> Martin
> 
> 2009/5/6 Khlystov
Alexandr <a...@ovservice.org>:
>>
>>
>>
>>
>>  Thanks for reply, Martin.
>>
>>
>>
AuthenticatedWebSession#isSignedIn() is final too :). And according to
>> design I think it is not the proper place to do the auto-login
logic.
>>
>>
>>
http://people.apache.org/~tobrien/wicket/apidocs/org/apache/wicket/authentication/AuthenticatedWebSession.html#isSignedIn()
>>
>>
>>> All you need to do is evaluate
the cookie here:
>>>
>>> if
(!AuthenticatedWebSession.get().isSignedIn())
>>>
>>> Meaning that this should return TRUE if cookie is
>> found.
>>>
>>> **
>>>
Martin
>>>
>>>
>> 2009/5/5 Khlystov
Alexandr <a...@ovservice.org>:
>>>> 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
>>>
>>>
>>>
>>
>>
>>
--
>> ___________________
>> Best regards, Khlystov
Alexandr.
>> mailto:
>> a...@ovservice.org
>>
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> 


-- 
___________________
Best regards, Khlystov Alexandr.
mailto:
a...@ovservice.org

Reply via email to