Closed dpbuzz closed 6 years ago
Having two different kind of authentications for one route is not a good idea. Better would be to separate the public website and api. For example put the api into /api/
folder and use JWT only there.
So you say to have two entry points?
/mobile/api for mobile access using jwt /web/api for web application using session
In this way I can share all routes because the only difference is the autentication method.
Sorry but I do not really understand what you are trying to do. You could check on of the example applications for inspiration.
https://github.com/tuupola/slim-api-skeleton https://github.com/akrabat/slim-bookshelf https://github.com/akrabat/slim-bookshelf-api
Hi, Can you provide if possible a 'https://github.com/tuupola/slim-api-skeleton' with the slim-jwt-auth so we know what is the best way to do it? Thanks
Even though it has not been updated for a while, the skeleton uses tuupola/slim-jwt-auth.
https://github.com/tuupola/slim-api-skeleton/blob/master/config/middleware.php#L44-L59
Hi Mika, first of all thanks for developing the middleware and supporting us!. I added to my web application a slim api for providing some basic mobile services. But now I need to add a new module, and I planning to use the slim api to do the update in database, etc... The web application use session variables that i will use in the new endpoints. How is the way to integrate in the same api the need for the jwt-auth for mobile access, and session variables handling for the web app acces? Thanks