[Answer]-Login to spring webapp from external application

1👍

You got yourself thrown into the dead pit.

Django knows nothing of your spring MVC app.

In order to make this possible you need to have some sort of shared session storage between those 2 frameworks otherwise you wont be able to confirm that the user is the one actually accessing his account from the dashboard. Although it is considered a bad idea to share states
a simple solution is to use a redis-session backend
to save the sessions in redis.

Then on the Spring MVC you need:

1. To grab the Django session ID from the user’s cookie.
2. If the session ID is found in Redis, you return the session  matching that ID and display the users home page
3. If not, you redirect them to a login page.

I would recommend to carefully research this situation though as this introduces extra attack vectors.

Leave a comment