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

there probably shouldn't be a token validation #9

Open
corbosman opened this issue Nov 2, 2018 · 3 comments
Open

there probably shouldn't be a token validation #9

corbosman opened this issue Nov 2, 2018 · 3 comments

Comments

@corbosman
Copy link

Heya, as the first line in your controller you do:

$this->resourceServer->validateAuthenticatedRequest($request);

This checks if there is a bearer token with a valid access token in the Authorization header. But that is probably not how you should implement that afaik. The token you are presenting for introspection as the token body parameter, should not be the one used for authentication. (and it can be now if it's a valid token).

I think the specs mention either basic auth or some other mechanism. Maybe simply leave it up to the consumer of your package to decide how to implement authentication for the introspection client. Although im not sure how, i dont think they could assign a middleware to your routes easily.

im interested in how you see this.

@rokde
Copy link
Member

rokde commented Nov 4, 2018

Good advice. Let me check the implementation next week. Or do you want to make a pull request?

@MattApril
Copy link

Calling validateAuthenticatedRequest does not impose a requirement of using the token to be introspected as the token for validation. You can (and should) use another token, such as one from a client credentials grant.

@MattApril
Copy link

With that being said, I also disagree the with implementation of this. It should be setup so that any guard(s) can be configured for the route. i.e. basic auth, passport, or even no auth if the server is on a private network. If I have time I can create a pull request, but for now this is suitable for me.

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

3 participants