The purpose of this release is to add a new method, .KeyfuncCtx
.
This new method accepts a context.Context
, then returns a jwt.Keyfunc
. This user provided context.Context
is used during JWK lookup in the github.com/MicahParks/jwkset
package when parsing JWTs. Passing a request scoped context allows the JWT parsing and JWK retrieval to cancel according to the given context.Context
behavior instead of the default context.Context
, which was provided at keyfunc.Keyfunc
initialization.
In practice, this is used to prevent situations where many JWTs with kid
not in a remote JWK Set are attempting to be parsed over a long period of time.
Relevant issues:
Relevant pull requests: