Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use jwt.MapClaims instead of jwt.RegisteredClaims #3

Merged
merged 1 commit into from
Oct 10, 2024
Merged

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 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
Collaborator

@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.

3 participants