I am trying to develop an application using Backbonejs and SLIM framework. Now I would like to develop User Login/Log out functionality. In this case I would like to keep SESSION alive in server while user navigating from one page to another. Previously I worked one other PHP framework and core PHP and successfully implement User Authentication. SLIM framework works as API. Actually my problem is "How to know the current SESSION is alive using HTTP request to an API from Backbonejs??"
It looks messy to me. I read several stackoverflow post like below but could not come to a solution.
How to do authentication with a REST API right? (Browser + Native clients)
If REST applications are supposed to be stateless, how do you manage sessions?
How to use PHP sessions with REST client application ?
I hope anyone of you implement User Authentication using Backbonejs and SLIM Framework as API.If he/she share his/her experience with some sample code, that will be a BIG help me.
Thanks