Edit: This release has been retracted due to a bug in ResponseExtractorStatusOK not closing the response body. Please upgrade to v1.4.0.
The purpose of this release is to allow for custom HTTP response extractors. A response extractor is responsible for consuming an *http.Response and producing the raw JWK Set JSON. It is also responsible for closing the body of the *http.Response.
I plan on following up this release with v1.3.1 soon. This upcoming release will change the default behavior of how the package handles HTTP response codes, returning a non-nil error in cases such as a 500 HTTP response code.
New additions:
keyfunc.Optionshas a new field namedResponseExtractorthat, when provided, is responsible for the behavior described above.keyfunc.ResponseExtractorStatusOKis a helper function to fit into theResponseExtractorfield inkeyfunc.Options.
Relevant pull requests:
Relevant issues: