How to get client id from a request in laravel passport?
— Laravel — 1 min read
It’s a claim in JWT(RFC), just following to do
It’s good, but there are some problems with it 1. It’s optional in JWT. 2. You need to get it in middleware you making or controller.
As upon above, you can get it from jti, and validate it in the model.
The problems are the same as above, optional, and we got another problem, more query to the database.
Check client Credential
I think it the best way I’m knowing for now, overwrite
, when the request is coming, set the client_id and passing next.
The PSR includes ServerRequest:
Next, Changing Kernel.php using instance, For per request, you can get client_id