Pass Session value between different applications

Pass Session value between different applications

  

Hello everyone

I have a Login application, which I must use in many other applications.

In MyFirstApp and MySecondApp applications I have UserToken session variable.

In Login application I need to check UserToken is empty or not. If it empty - stay in login page, if it does not empty redirect another page.

In actually my general problem is that after login process I don't want to allow user to go back in login page.


Hi Stepan,

You can have an action that returns a session variable. Is that possible in your scenario?

Regards,

Marcelo

Marcelo Ferreira wrote:

Hi Stepan,

You can have an action that returns a session variable. Is that possible in your scenario?

Regards,

Marcelo


Thanks for attention.

Yes, it is possible, but I don't want to import some actions from MyFirstApp or from MySecondApp  to Login application, because in that case I will always have "Outdated consumer warning".

Hi,


You can also use a session cookie to store the user token. You can set the session cookie on login and empty it on logoff.  


IG

If you do not want to use cookies (for security reasons), other options are:

1. Use an entity to store the information or a session variable with the proper public wrappers (set and get) in a third application (that both applications consume);

2. If you are in version 11, you can use a Service Action in a Service application to expose the session variable through public Service Actions as wrappers, as this will be a soft couple (not a hard one), allowing your applications life cycle to keep separated;

Cheers.