Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to resolve dependency [Parameter #1 [ <required> $tokenId ]] in class Laravel\Passport\Http\Controllers\AuthorizedAccessTokenController #154

Closed
santilorenzo opened this issue Feb 11, 2021 · 4 comments

Comments

@santilorenzo
Copy link
Contributor

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

@dusterio
Copy link
Owner

@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 :)

santilorenzo added a commit to santilorenzo/lumen-passport that referenced this issue Feb 11, 2021
@santilorenzo
Copy link
Contributor Author

Ok perfect, I submitted the PR 👍

dusterio added a commit that referenced this issue Feb 11, 2021
@dusterio
Copy link
Owner

@santilorenzo merged, thanks!

santilorenzo added a commit to santilorenzo/lumen-passport that referenced this issue Feb 11, 2021
@santilorenzo
Copy link
Contributor Author

Sorry for the double PR, but I realized that also the other methods must be updated :(

dusterio added a commit that referenced this issue Feb 17, 2021
Fix #154 - add compatibility to Passport 10.x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants