Page 1 of 1

Session ID and Session Variable

PostPosted: Wed Aug 11, 2010 10:42 am
by proware
What do I need to do to get a unique server side session ID for a smart client session?

This needs to be different for each client instance.

I would rather use a server generated unique ID rather than using a random number generator and storing this to a variable.

Cheers
David Younger
TSM

Re: Session ID and Session Variable

PostPosted: Wed Aug 11, 2010 11:18 am
by jcompagner
security.getClientID() is a unique serverside id.

Re: Session ID and Session Variable

PostPosted: Thu Aug 12, 2010 1:54 am
by proware
Thank you ;-]

Re: Session ID and Session Variable

PostPosted: Mon Aug 22, 2022 9:29 am
by vlad_chiru
jcompagner wrote:security.getClientID() is a unique serverside id.

I know about this, but it's not in sync with the browser session. If the user closes the window and opens it again, it will be a different ID. I cannot store a auth session with it.

Re: Session ID and Session Variable

PostPosted: Thu Aug 25, 2022 9:59 am
by jcompagner
we don't have a stable id for something like that, that is mostly a username that you need to provide to the system, what you can do is create a uuid string
and after login do a setUserProperty() this stores it on the clients browser and as long as the client doesn't flush all the local storage the next time you can ask for that uuid with getUserProperty()