Use jwt.MapClaims instead of jwt.RegisteredClaims #3
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.
There seems to have been confusion about how RegisteredClaims works as a replacement for StandardClaims when we upgraded the library. The migration guide appears to be unclear on this matter (see the removed comment in the file itself). As a result, we are moving away from RegisteredClaims and using jwt.MapClaims directly instead. We initially introduced the RegisteredClaims change to replace the deprecated github.com/dgrijalva/jwt-go with github.com/golang-jwt/jwt/v5. The latter doesn't have StandardClaims, which was previously used with github.com/dgrijalva/jwt-go.
Ideally jwt.RegisteredClaims should have worked but somehow it doesn't. Going with simple jwt.MapClaims for now.
Validated that it is working fine with Salesforce instance.