Re: [Catalyst] Check session expiry without extending it

2010-03-04 Thread Peter Karman
Bill Moseley wrote on 03/04/2010 08:39 AM: The developer explained that the AJAX session check was needed to prevent a user from making a lot of changes in the client that could not be saved due to a an expires session. Not sure I see the logic there. I've been solving that

Re: [Catalyst] Check session expiry without extending it

2010-03-04 Thread Bill Moseley
On Thu, Mar 4, 2010 at 7:05 AM, Peter Karman pe...@peknet.com wrote: // make sure we are logged in before every xhr request Ext.Ajax.on('beforerequest', function(conn, opts) { if (!AIR.Auth.isAuthenticated()) { AIR.Auth.login(); return false; } return true; }); I

Re: [Catalyst] Check session expiry without extending it

2010-03-04 Thread Ben van Staveren
The way I got around this was by sticking all ajax stuff in a separate controller hierarchy that would return special content based on the request and whether or not the session lived. for json it'd just return a specific flag in the object it'd throw out (which was parsed by a global callback

Re: [Catalyst] Check session expiry without extending it

2010-03-04 Thread Alexander Hartmaier
My solution is to return an error message which includes the link to the login form with Catalyst::Controller::DBIC::API. My ExtJS store class has an exception handler that shows a MessageBox with the error text: exception:function(sender, type, action, options, response, arg) { switch (type)

Re: [Catalyst] Check session expiry without extending it

2010-03-03 Thread Alexander Hartmaier
Why not return the datetime when the session expires with every page and have a client-side js that does the redirect without hammering the server? -- Best regards, Alex Am Dienstag, den 02.03.2010, 21:43 +0100 schrieb Steve Kleiman: Using Catalyst::Plugin::Session with Session::State::Cookie.

RE: [Catalyst] Check session expiry without extending it

2010-03-03 Thread John Karr
AM To: The elegant MVC web framework Subject: Re: [Catalyst] Check session expiry without extending it Why not return the datetime when the session expires with every page and have a client-side js that does the redirect without hammering the server? -- Best regards, Alex Am Dienstag, den

RE: [Catalyst] Check session expiry without extending it

2010-03-03 Thread John Karr
Subject: Re: [Catalyst] Check session expiry without extending it Why not return the datetime when the session expires with every page and have a client-side js that does the redirect without hammering the server? -- Best regards, Alex Am Dienstag, den 02.03.2010, 21:43 +0100 schrieb Steve Kleiman

RE: [Catalyst] Check session expiry without extending it

2010-03-03 Thread John Karr
Subject: Re: [Catalyst] Check session expiry without extending it Why not return the datetime when the session expires with every page and have a client-side js that does the redirect without hammering the server? -- Best regards, Alex Am Dienstag, den 02.03.2010, 21:43 +0100 schrieb Steve Kleiman

Re: [Catalyst] Check session expiry without extending it

2010-03-03 Thread Steve Kleiman
Message- From: Alexander Hartmaier [mailto:alexander.hartma...@t-systems.at] Sent: Wednesday, March 03, 2010 10:03 AM To: The elegant MVC web framework Subject: Re: [Catalyst] Check session expiry without extending it Why not return the datetime when the session expires with every page

[Catalyst] Check session expiry without extending it

2010-03-02 Thread Steve Kleiman
Using Catalyst::Plugin::Session with Session::State::Cookie. Would like to be able to poll server if the user's session has expired WITHOUT extending the session itself. The objective is to have a javascript periodical executor check if a session is expired and redirect user to a Your session