Check if the user has an active session in another web application

I have the following scenario: A user logs in to web application A. As soon as he logs in, he can click on the link that will lead him to web application B. To add security, if the user arrives directly to webapp B, a webapp call is made A to check if the user has a valid session, and only then is he allowed access to webapp B.

Both websites use servlets in the weblog.

Any suggestions on how this can be customized?

+4
source share
1 answer

Approach No. 1

REST A, B , :

A URL: https://www.myappA.com/public/isSessionActive.do?user=userId

B URL-.

A JSON : {"user":"userId", "isSessionActive":"Y"}

A REST.

# 2

, A B. ACTIVE . , INACTIVE. B .

, № 1 .

0

Source: https://habr.com/ru/post/1547573/


All Articles