mardi 3 mars 2020

How to force a client to authenticate and save his session in a multiservice architechture?

I made an authentication service using spring boot. The user enters credentials and if it matches with what is writen in mysql database he opens a session. I developped a streaming micro service, tottaly independent from the authentication service. i want to make sure that th user authenticate and achieve to acces th streaming service whith th session opened while authenticating. I have an i dea which i am not sure it is correct: i will connect every micro service to a redis server for cashing sessions, so that the streaming service will interact with the redis server and not with the database. If the user's session exists it gives him acces if not than he is redirected to the auth service, when autehnticated th auth service will write the session on the redis server so tha th streaming service will find it. Is my approach correct? any other suggestion will be welcomed.




Aucun commentaire:

Enregistrer un commentaire