Skip to content

Conversation

@shmsr
Copy link
Member

@shmsr shmsr commented Oct 7, 2024

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.

@shmsr shmsr added the bugfix label Oct 7, 2024
@shmsr shmsr self-assigned this Oct 7, 2024
@shmsr shmsr requested a review from kush-elastic October 7, 2024 13:23
@shmsr shmsr changed the title Do not use RegisteredClaims Use jwt.MapClaims instead of jwt.RegisteredClaims Oct 7, 2024
@shmsr shmsr marked this pull request as ready for review October 7, 2024 13:29
Copy link

@kush-elastic kush-elastic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants