Unable to resolve dependency [Parameter #1 [ <required> $tokenId ]] in class Laravel\Passport\Http\Controllers\AuthorizedAccessTokenController
santilorenzo opened this issue · 4 comments
Dependencies:
"dusterio/lumen-passport": "^0.3.2"
"laravel/passport": "^10.1"
When I call
DELETE http://sample-app.localhost/oauth/tokens/ef928eb507f73...
I get this exception:
Unable to resolve dependency [Parameter #1 [ <required> $tokenId ]] in class Laravel\Passport\Http\Controllers\AuthorizedAccessTokenController
I found out that it's because of the line 64 in the Route Registrar:
$this->app->delete('/tokens/{token_id}', $this->prefix('AuthorizedAccessTokenController@destroy'));
By changing to
$this->app->delete('/tokens/{tokenId}', $this->prefix('AuthorizedAccessTokenController@destroy'));
it works.
Not sure if it is back compatible with older passport versions so I'm not sure if I should make a pull request
@santilorenzo can you please make a pull request. if somebody wants to stay on older Passport - they can lock in version in the composer file anyway :)
Ok perfect, I submitted the PR
@santilorenzo merged, thanks!
Sorry for the double PR, but I realized that also the other methods must be updated :(