Statelessness in REST - Not keeping sessions on the server

Posted 2 years ago by ashishsanjayrao


I was just reading about how Roy Fielding says that the server must not store the client's state on the server. This means that the user sessions we store are not to be stored on the server.

In Laravel, since all its requests are RESTful, should it or should it not store and access user sessions from the server? Currently Laravel creates a session for every logged in user. But does it follow the statelessness constraint of REST?

I am also aware of the HTPP Basic Authentication, which is used for stateless authentication. But then isn't every request in Laravel RESTful? All the routes we create is by keeping RESTfullness in mind.

I'm a bit confused here as to how Laravel functions in terms of RESTfullness.

You can also link me to any resources that'll answer my question.

Thanks in advance.

Please sign in or create an account to participate in this conversation.