Jump to content

Sharing session state across apps


Allen

Recommended Posts

Hi;

Seeking some advice on best way to allow a user to move between my legacy app and potentially multiple UniGUI apps without a login requirement.

I am contemplating that my login application save a SessionID to a cookie, and save it to my DB (my legacy app already does this).  Then when the user moves between apps I am thinking to use the login forms onBeforeShow event to retrieve the the SessionID from the cookie, retrieve it from the DB, then if the session is still valid and current restore that session context and close the login form.

This all sounds simple enough to me, however am I missing something that could cause an issue later on?

Two additional questions:

Is it possible to manually assign a sessionID in UniGui, or will I need to update my DB and cookie values with the new UniGui sessionID?

Is the a convenient event I can utilize to update my DB stored session data (minimally time to expiration type data), or will I need to do this explicitly throughout the application?

Thanks for any guidance or suggestions;

-Allen

 

Link to comment
Share on other sites

I think you want to create something complicated, into something that can be quite simple to solve.

when you call your helper apps, pass the url, the login parameters, and also add a datetime parameter.

when the helper app is loaded, you test if the datetime parameter, is greater than the current time, and accept a 1 minute interval.

from this the url will only be valid at that moment.
Of course, pass this information in the url in an encrypted way.

unigui itself uses this technique, for url redirection in hyperserver

 

even if your idea is possible

as you suggested, it is very likely that your client will not be able to open 2 different auxiliary programs at the same time, as it is not possible to use the same session for 2 different programs.

ex:
Login
   run app1
   run app2

the user cannot have app1 and app2 open at the same time.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...