Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The goal of this PR is to expand the support for users of this library to fully customize the underlying request, while simplifying the default request options.
Adds
options.fetcher
- this is a promise returning function that fetches the jwks data. We want to make sure that users can fully customize how data is fetched, this option will allow for a user to replace the underlying request logic and supply their own data fetching logic.options.requestAgent
- previously we gated the options that could be passed into a requestAgent, which required we have some type of frankenstein solution for supporting proxies. This will allow the user supply their own agent in the request and thus allowing them to support the proxy at this level.Removes
options.requestAgentOptions
- now withrequestAgent
this will no longer be neededoptions.proxy
- now withrequestAgent
a user can control their proxy flow, and with thefetcher
option a user can completely control the request flowaxios
- we have had a lot of issues pop up after moving from the EOLrequest
library toaxios
. With thefetcher
option, a user can now use their own request library, and this PR introduces using the node internals to make the requests.