Maintain sessionID throughout the application

0
I need to have access to a session token which comes from the server. I can access system.sessionid, but its not the same as what we have on  server side. It is generated on the server side after user logs in. In response to login request I am able to get the sessiontoken. But I need accedss to it all the time inside the application for various rest api calls. How do I achieve it in Mendix?
asked
1 answers
0

Hi Manish,

If you need to access the session in a microflow, you can retrieve it using the current user token. In a microflow, use the retrieve activity by association and expand "currentUser". From here, you can retrieve the list of sessions.

 

You can also use an inheritance split to cast the current session. 

Here is an example that does that. 

https://modelshare.mendix.com/models/36b56eec-7e0b-4b6f-87f6-3bed98ba062e/cast-current-session

 

Hope this helps!

answered