corbosman / laravel-passport-claims

Add claims to Laravel Passport JWT Tokens
MIT License
81 stars 12 forks source link

Claim middleware value not being read correctly #12

Closed causingh closed 2 years ago

causingh commented 2 years ago
Route::middleware(['client', 'claim:my-claim,foobar'])->get('my-protected-route', function () {
    return 'protected by claim with foobar as its value';
});

In the code snippet above, claim middleware is accepting all values which should not be.

corbosman commented 2 years ago

Hi, thanks for reporting this. You're right, i think somewhere along the lines the way the parameter is passed to the middleware changed. Can you try 3.0.1 and see if that fixes it for you?

causingh commented 2 years ago

Hi @corbosman this works fine now. Thank you.