Sessions in a Microservice architecture for an E-Commerce system Sessions in a Microservice architecture for an E-Commerce system php php

Sessions in a Microservice architecture for an E-Commerce system


I suggest that you look at token based authentication.

In addition, JSON Web tokens could also be of interest to you.


You can maintain user states into table.

When users login create one unique id and store it into table with current time stamp and client IP, In client side create key value pair and store it into cookies. Use it as a session.

You have many things now to check user existence.


if u are using jvoid which is a project of schgoni (magento's owner) it create session id and stores it inside mysql and it has already builtin spring security module

For microservice authentication i oauth2 based security architecture would be better i think.Using oauth tokens at rest calls would solve auth problem