dimanche 22 avril 2018

Which code connects Laravel Auth with TokenGuard of Passport?

I just started learning Laravel and I'm having a hard time setting up authentication. I'm using Passport for providing authentication for API. And I'm using the same API for my Javascript based web interface. This \Laravel\Passport\Http\Middleware\CreateFreshApiToken middleware doesn't seem to work really well for a web app. Thus I decided to develop my own guard for authentication and dug deep into Laravel code and found that AuthManager does the authentication.

But in the AuthManager, I couldn't find any section which connects Passport with the Manager. There is no 'createPassportDriver' method and I don't think any code in Passport sets the customCreator property of AuthManager. Then how does the 'auth:api' resolve to TokenGuard in Passport.

Is there anything I am missing?

Thanks



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2qS2bJA
via IFTTT

Aucun commentaire:

Enregistrer un commentaire