We are using a Lumen/Dingo implementation based on the following repo lumen-dingo. We are building this on top of an existing framework and this brings some minor problems with it.
Our framework usses its own session object, all throughout the application, it is no option to change this. What we ideally want is to change the Lumen + Dingo + JWT setup so it usses our session.
I do not know what the best thing is to do here. I can think of three possible solutions:
Use the Lumen session next to the normal session, so they are both active at the same time, but I do not know if this will work.
/*
|--------------------------------------------------------------------------
| Authentication Guards
|--------------------------------------------------------------------------
|
| Next, you may define every authentication guard for your application.
| Of course, a great default configuration has been defined for you
| here which uses session storage and the Eloquent user provider.
|
| All authentication drivers have a user provider. This defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
|
| Supported: "session"
|
| NOTE: "token" driver is not supported in JWT Auth
|
*/
'guards' => [
'api' => [
'driver' => 'session',
'provider' => 'users'
],
],
I am trying to edit these details, but I keep running into errors. I do not know if I am just doing something wrong, or may be even completely on the wrong path.
Why are you using sessions with Lumen?
Lumen is used to just build API's and as such should be stateless!
With Lumen 5.2 they have completely removed support for sessions.
Lumen 5.2 represents a shift on slimming Lumen to focus solely focusing serving stateless, JSON APIs. As such, sessions and views are no longer included with the framework.