I had what I thought might be a good idea for session handling and wanted to get a response and see what people thought and how it might be best implemented.
1.) User logs in, this contacts the server, creates a session object on the server, and the server sends back a session ID and timeout-time.
2.) Ext.JS stores the session id and timeout(CookieProvider?). Every time a click on done on the page it checks against the timeout and every time a server call happens it always returns a new timeout time.
Then, you set a threshold time. If it's within that threshold time you pop open a window asking if they want to stay connected and it updates the server/client time. If it's past the time a modal login box asks them to re-login granting them a new session ID and updated session window.
Now, what i'm really asking is what would be the best way to do this? It seems like it would involve an override to the ajax calls and store loading calls (with a param like checkSession: true that will then always look in the return for a sessionTimeout value), and then attaching an event to the click.
Am I way off base or does this sound like a good way of dealing with the Session Handling problem? I'm not entirely new with Ext.JS but knowing the proper way to start on a project should help me get to the end faster.