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

[CLIENT-2623] Used base 64 url decoder for decoding the claims token #293

Merged
merged 1 commit into from
Oct 24, 2023

Conversation

ashishshinde
Copy link
Collaborator

No description provided.

Copy link
Member

@BrianNichols BrianNichols left a comment

Choose a reason for hiding this comment

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

Why do you want to use getUrlDecoder()?

If the token doesn't have extra unrelated bytes at the end, getDecoder() should work fine.

@ashishshinde
Copy link
Collaborator Author

Why do you want to use getUrlDecoder()?

If the token doesn't have extra unrelated bytes at the end, getDecoder() should work fine.

This is just to ensure we meet the JWT spec which actually encodes using BASE64 URL encoding and also to make sure we do not get into trouble if we add more claims in the future (/ and + are treated differently in Base 64 URL encoding and "=" padding is optional).
See here

@BrianNichols BrianNichols changed the base branch from master to stage October 24, 2023 17:52
@BrianNichols BrianNichols merged commit 4d2e9fb into stage Oct 24, 2023
1 check passed
@ashishshinde ashishshinde deleted the CLIENT-2623 branch October 25, 2023 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants