-
Notifications
You must be signed in to change notification settings - Fork 58
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
one endpoint protected AND public #45
Comments
Hi @thedarkside , The current implementation does not allow to make an endpoint both public and protected. What you could do, is to make a separate user context specific endpoint that extends the current endpoint or only shows interesting cities for that user. Whatever your implementation, you will end up with two endpoints. If you really want one endpoint, your best start is you make an custom strategy in the There are some things to consider. I don't know if you are documenting the endpoint for public use. But there could be some issues with the current documentation tools that are around. They are mostly not context aware. The next thing are the responses. An dynamic response could lead to more implementation errors in parsing. Having two contexts for an endpoint could confuse the consumer of your API. This is an interesting issue. Please let me know what you are going to consider to do. |
closing due, inactivity. |
@antek-drzewiecki i ended up with this patch documented here: #58 (comment) This way winebouncer will always try to lookup a resource_owner if a token is present. Even if the endpoint is marked as public. |
Hi,
i want to realize a generic endpoint /cities to be public to everyone. The resultset would be [{id: 1, name: "xyz"}...]
But if a token was sent and is correct, the very same endpoint would additionaly return some user-context-specific attributes like {..., is_interesting: true}
Iam using winebouncers protected strategy and setting the endpoint to public by
oauth2 false
but that disables the token-check logic at all.resource_owner
isnil
even if the sent token is perfectly valid.What i want is to check if
resource_owner
is set and then enhance the resultsets in this case.Is it somehow possible?
The text was updated successfully, but these errors were encountered: