Handling session timeout properly

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Handling session timeout properly

Sandor Feher
This post was updated on .
Hi,

My application has some AjaxSelfUpdatingTimerBehavior in its header panel so my session never expires due to ajax requests. Somehow I would like to get rid of it.
How is it possible to fence ajax request from the real request ? (As I realized there is no way.)
I need an advice how to handle this screnario.

Wicket 6.24.0

TIA, Sandor
Reply | Threaded
Open this post in threaded view
|

Re: Handling session timeout properly

Ernesto Reinaldo Barreiro-4
https://github.com/reiern70/antilia-bits/tree/master/client-sign-out-parent

There was some logic in here to trigger a signout from client side.

On Thu, Sep 22, 2016 at 12:38 PM, Sandor Feher <[hidden email]> wrote:

> Hi,
>
> My application have some AjaxSelfUpdatingTimerBehavior in its header panel
> so my session never expires due to ajax requests. Somehow I would like to
> get rid of it.
> How is it possible to fence ajax request from the real request ? (As I
> realized there is no way.)
> I need an advice how to handle this screnario.
>
> Wicket 6.24.0
>
> TIA, Sandor
>
> --
> View this message in context: http://apache-wicket.1842946.
> n4.nabble.com/Handling-session-timeout-properly-tp4675541.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
Regards - Ernesto Reinaldo Barreiro
Reply | Threaded
Open this post in threaded view
|

Re: Handling session timeout properly

Sandor Feher
Thanks, looks very useful!
Reply | Threaded
Open this post in threaded view
|

Re: Handling session timeout properly

Martin Spielmann
In reply to this post by Sandor Feher
You could extend your existing AjaxSelfUpdatingTimerBehavior so it has
an information about your desired timeout with very little overhead.

On every update, you could decrement your remaining session time a
little bit.

I created the following gist. I think the code is more explanatory than
an email:
https://gist.github.com/pingunaut/feb5611afa910465f0c05f8a903af8b3

Hope that helps,
regards,
Martin


On Thu, 2016-09-22 at 03:38 -0700, Sandor Feher wrote:

> Hi,
>
> My application have some AjaxSelfUpdatingTimerBehavior in its header
> panel
> so my session never expires due to ajax requests. Somehow I would
> like to
> get rid of it.
> How is it possible to fence ajax request from the real request ? (As
> I
> realized there is no way.)
> I need an advice how to handle this screnario.
>
> Wicket 6.24.0
>
> TIA, Sandor
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.
> com/Handling-session-timeout-properly-tp4675541.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Handling session timeout properly

Sandor Feher
Hi Martin,

I checked up your code. I'm afraid this will not solve my problem because does not detect "normal" user activity. Ie. when user click on some page then the session timeout must be reset.
I'm pretty sure that I must change my approach how my notification panel handled.