[Vtigercrm-developers] Ideas and suggestions please?
Alan Lord (News)
alanslists at gmail.com
Tue May 18 00:45:25 PDT 2010
One of the most annoying bugs in the Thunderbird extension for me and my
customers is how, if the session times out, you have to re-save the
vtiger configuration settings to trigger a fresh login attempt.
I'd really like to fix this so that, as with all my email accounts, I do
not have to repeatedly login.
I've been thinking about how to achieve this and am not sure of the
"right" approach.
When we login using the REST API, we get a token. This token has a
lifetime, which I believe we can capture and store. When any new
transaction occurs (within the lifetime of the current token) across the
REST API, I believe the lifetime of the token is then extended.
The TB extension is written in javascript and I am not sure that we can
spawn a thread to run a timer so that we can trigger an event before the
token expires if nothing else has happened.
Could I just check to see if the token has expired (time elapsed) and if
so, go through the login process again? This means I have to add a test
before *every* API call (seems like a lot of overhead to me?).
I'm not really a professional programmer and am unsure of the best way
to deal with this.
Ideas and suggestions most welcome.
Cheers
Al
PS: What is the session lifetime BTW?
--
The Open Learning Centre
http://www.theopenlearningcentre.com
More information about the vtigercrm-developers
mailing list