Domanda

What is the best way to keep the same session when you open the same java webapp in another tab in the browser with passing parameters like username/password in most secured way.
The purpose behind is to navigate the webapp to next navigation page after doing some request to some service.
I am doing it at the client side.

This is a thought coming to my mind right now:

  1. To add the parameters in the URL (not secure)
  2. .....
È stato utile?

Soluzione

In your server you can check if the incoming request has a valid session or not, if it has a valid session, retrieve the username or similar identifier from the session.

Depending upon the user you can show him/her the home page which they will enter if they had actually logged in the system.

If you want to show response based on the last action, then you can have the last action as part of your session and rules on your server which should fetch the correct page depending upon the last action.

For e.g. gmail will always show you the inbox if you have a valid session in one tab and you again open gmail in another tab.

If this is handled at the server level it is highly secure as you there is no need to append, send user credentials.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top