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

Feature: Auth Interceptor: Add support for partial per service AuthFunc override #707

Open
seinshah opened this issue Apr 25, 2024 · 2 comments

Comments

@seinshah
Copy link

Sometimes, there is a possibility that some of the methods in a service are publicly available and some need authentication.
The current ServiceAuthFuncOverride allows each service to override the global AuthFunc. However, if a service needs to override the global AuthFunc for some methods, it needs to duplicate AuthFunc logic.
It would be nice to allow services to override AuthFunc, but also allow them to fallback to the global AuthFunc if they want to only override it for certain methods and not all of them.

@johanbrandhorst
Copy link
Collaborator

Thanks for your issue. For this sort of thing I usually recommend just forking the repo and implementing what you need. I'm opposed to functionality bloat because it can spiral out of control quickly. Even just copy pasting the handler logic you need (preserving the license, of course) is not that big of a deal.

@seinshah
Copy link
Author

@johanbrandhorst, that's kind of what I did and diverged from this repo to address the need. However, as you mentioned, if this is not something people face very often, it might not worth being added to the source code.
Thanks for your comment.

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

Successfully merging a pull request may close this issue.

2 participants