Realized lumen is not meant to maintain sessions not perform authentication works. So deployed Laravel itself.
Authenticate users into a Laravel App using Lumen Endpoint
I'm building a few micro services using Lumen and a Laravel App (API Composer). Basically the API composer will consume data from microservices endpoints.
The application is quite big and needs the foundation to easily scale. So microservices approach and Lumen are essential.
To secure my endpoints, I'll be using JWT. I understand the username password concept to create a JWT token. But here, I'll be requesting for data from Laravel App / Client and not for a particular user.
How do I generate the token for the Laravel client? Is it advisable to create one username password per client and store the same in Lumen application, pass on the same credentials from client to get the initial access token and then store it forever in the client .env file? I'm guessing that isn't right. I'm finding it difficult to see the logic here.
Also, how should I proceed to implement the access token and refresh token concepts?
Please or to participate in this conversation.