[Catalyst] Check session expiry without extending it

Bill Moseley moseley at hank.org
Thu Mar 4 17:19:04 GMT 2010


On Thu, Mar 4, 2010 at 7:05 AM, Peter Karman <peter at 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 thought about this, but in our case the ajax was checking for a specific
session because the server-side session had state info need for the ajax
request.  So, just allowing the user to log in again was not possible.

That's probably bad design on top of bad design.  In our case probably
better to rethink  then entire process and just make request that can be
independent and either work or fail in some graceful way.  making
assumptions about expected state is problem the root cause.



-- =

Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20100304/5a977=
252/attachment.htm


More information about the Catalyst mailing list