Allow custom http Client to be used by the JWKS Provider
CBrather opened this issue · 2 comments
Checklist
- I agree to the terms within the Auth0 Code of Conduct.
Describe the problem you'd like to have solved
We are currently adding distributed tracing across our whole system and wanted to include spans for any calls to external systems as well. One of these is auth0, but using this middleware doesn't seem to allow us to add spans for the calls made by the jwks provider.
Describe the ideal solution
My idea would be to create an interface for http.Client and have the provider take that one. This way we could pass a custom client implementing the tracing logic via the WithCustomClient() option while maintaining backward compatibility with the existing implementation.
Alternatives and current workarounds
We don't build any workarounds as it's not a major issue for us, but rather a small improvement. If you don't want to have this in the official middleware, we'd possibly use a fork of our own where we make this change.
Additional context
No response
Hi @ewanharris,
no there is no reason for that, I must have been looking at the wrong (version?) documentation. Thank you for the link and the quick response, and sorry for wasting your time...