laravel / passport

Laravel Passport provides OAuth2 server support to Laravel.
https://laravel.com/docs/passport
MIT License
3.3k stars 781 forks source link

[11.x] Allow using custom authorization validator #1654

Closed hafezdivandari closed 1 year ago

hafezdivandari commented 1 year ago

Oauth2 Server allows passing a custom authorization validator (instance of AuthorizationValidatorInterface) to the constructor of ResourceServer class or pass null to use the default BearerTokenValidator.

Devs usually override BearerTokenValidator class to add additional params to the request when validating the token with custom claims, e.g. as this PR intends to make this easier:

Or as mentioned here:

This PR allows using custom authorization validator.

taylorotwell commented 1 year ago

I'm getting a bit weary of all the Passport deep customization PRs.

parallels999 commented 1 year ago

I really need this 😢