You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by kshitiz <k....@gmail.com> on 2012/04/01 09:29:47 UTC

Re: Wicket cookie timeout example?

Ok...thank you for replying...I wanted to ask one more thing? I am thinking
to add wicket authentication in my app. But as there would be only one type
of user only....should I use wicket authentication? I mean this can be
achieved by simple checking session existence also. Will there be any effect
in application performance in terms of speed if I use wicket authentication?
Please suggest me what will be best for me...

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-cookie-timeout-example-tp4521200p4522929.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Wicket cookie timeout example?

Posted by kshitiz <k....@gmail.com>.
It worked...thanks :)

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-cookie-timeout-example-tp4521200p4523670.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Wicket cookie timeout example?

Posted by Martin Grigorov <mg...@apache.org>.
Make sure that you bind the session in the first page with
getSession().bind(). This way you will get the same session in all
following requests until the session expire.
The session is being bound automatically for you if your page is
stateful. But for stateless page you need to do this explicitly.

On Sun, Apr 1, 2012 at 4:14 PM, kshitiz <k....@gmail.com> wrote:
> It turned out that object is getting stored in session but is not getting
> retrieved in other page. I have tried to use wicketsessionfilter but it is
> not helping...how to access session object in another page..?? The session
> object is being retrieved in same page.
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-cookie-timeout-example-tp4521200p4523463.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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


Re: Wicket cookie timeout example?

Posted by kshitiz <k....@gmail.com>.
It turned out that object is getting stored in session but is not getting
retrieved in other page. I have tried to use wicketsessionfilter but it is
not helping...how to access session object in another page..?? The session
object is being retrieved in same page.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-cookie-timeout-example-tp4521200p4523463.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Wicket cookie timeout example?

Posted by kshitiz <k....@gmail.com>.
Okk...but as given in my code...why object in not getting stored in 
session??

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-cookie-timeout-example-tp4521200p4523322.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Wicket cookie timeout example?

Posted by Martin Grigorov <mg...@apache.org>.
There wont be a http session at all if this is an unauthorized user.

Wicket API: Session.get().isTemporary()
Servlet API: httpServletRequets.getHttpSession(false) != null

On Sun, Apr 1, 2012 at 1:39 PM, kshitiz <k....@gmail.com> wrote:
> How to check session's validity? If after logging out we invalidate session,
> how to check its validity to avoid any unknown user to access restricted
> pages...??
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-cookie-timeout-example-tp4521200p4523218.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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


Re: Wicket cookie timeout example?

Posted by kshitiz <k....@gmail.com>.
How to check session's validity? If after logging out we invalidate session,
how to check its validity to avoid any unknown user to access restricted
pages...??

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-cookie-timeout-example-tp4521200p4523218.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Wicket cookie timeout example?

Posted by Martin Grigorov <mg...@apache.org>.
Use wicket-auth-roles project as a demo.

On Sun, Apr 1, 2012 at 12:04 PM, kshitiz <k....@gmail.com> wrote:
> Okkk.....I am learning wicket authorization from
> http://wicket.wordpress.com/2010/01/08/template-for-building-authenticated-webapplication/
> http://wicket.wordpress.com/2010/01/08/template-for-building-authenticated-webapplication/
> . Here, it is using wicket own signinpanel. If I want to use mine own login
> panel, how can I call authenticate method of Session class??
>
> I am not able to find good tutorial on wicket authorization? Can u recommend
> me one...
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-cookie-timeout-example-tp4521200p4523121.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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


Re: Wicket cookie timeout example?

Posted by kshitiz <k....@gmail.com>.
Okkk.....I am learning wicket authorization from 
http://wicket.wordpress.com/2010/01/08/template-for-building-authenticated-webapplication/
http://wicket.wordpress.com/2010/01/08/template-for-building-authenticated-webapplication/
. Here, it is using wicket own signinpanel. If I want to use mine own login
panel, how can I call authenticate method of Session class?? 

I am not able to find good tutorial on wicket authorization? Can u recommend
me one...

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-cookie-timeout-example-tp4521200p4523121.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Wicket cookie timeout example?

Posted by Martin Grigorov <mg...@apache.org>.
It will be the same.
If you don't provide your own authentication strategy then no-op one
is used that always returns "allowed".
I.e. the calls to the authen strategy are executed always. You just
need to replace it with your cookie checking one.
But see org.apache.wicket.authentication.strategy.DefaultAuthenticationStrategy,
it also works with cookie.

On Sun, Apr 1, 2012 at 9:29 AM, kshitiz <k....@gmail.com> wrote:
> Ok...thank you for replying...I wanted to ask one more thing? I am thinking
> to add wicket authentication in my app. But as there would be only one type
> of user only....should I use wicket authentication? I mean this can be
> achieved by simple checking session existence also. Will there be any effect
> in application performance in terms of speed if I use wicket authentication?
> Please suggest me what will be best for me...
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-cookie-timeout-example-tp4521200p4522929.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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