Skip to content

Request factory and raw JWKS copy

Compare
Choose a tag to compare
@MicahParks MicahParks released this 20 Jul 14:56

This release contains two new features.

The first is a new field on keyfunc.Options for a request factory. This allows the package user to create the *http.Request used to get the JWKS from the remote resource. This serves multiple use cases, such as attaching a User-Agent via an HTTP header. This is thanks to a new contributor @mgsh!

The second is a new method to get the latest raw JWKS []byte returned from the remote resource.

A few other updates:

  • Tests updated to use Fatalf instead of a combination of Errorf and FailNow.
  • Removed usage of err.Error() when using string formatting.
  • Using logFmt string formatting constant for log statements in tests.