jeremy379 / laravel-openid-connect

Implement OpenID Connect inside Laravel
MIT License
26 stars 13 forks source link

getClaims() for requested scopes only #22

Closed alecpl closed 2 months ago

alecpl commented 2 months ago

I'm using some custom claims that may take some time to get.

If I get your code right getClaims() is expected to return all possible claims, but I'd like to return only those requested by current token scopes. Different access tokens have different set of scopes.

Is there a way I can get the requested scopes from inside my getClaims() implementation? If not, I suggest to pass the list of requested scopes to this method.