What is keyfunc and when to use it
mainThe keyfunc package provides a jwt.Keyfunc implementation for the github.com/golang-jwt/jwt/v5 package. It is specifically designed to consume a JSON Web Key Set (JWK Set) from an HTTPS endpoint (common in OAuth 2.0 or OpenID Connect providers like Keycloak or AWS Cognito) and use those keys to parse and verify JSON Web Tokens (JWTs).
Note: Always ensure the JWK Set endpoint uses HTTPS to guarantee keys are retrieved from a trusted source.