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

Allow Jwt payload to be the empty string. #2745

Merged
merged 1 commit into from
Jul 26, 2024
Merged

Conversation

brentschmaltz
Copy link
Member

Nothing in the jwt spec requires the payload to have any values.
This PR allows the payload to be empty.

Fixes #2656

@brentschmaltz brentschmaltz requested a review from a team as a code owner July 24, 2024 23:19
@brentschmaltz brentschmaltz force-pushed the brentsch/payloadEmpty branch 3 times, most recently from 5d0844b to ba2ac83 Compare July 25, 2024 00:28
Copy link
Contributor

@jmprieur jmprieur left a comment

Choose a reason for hiding this comment

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

Lgtm
I have not seen a. Round-trip test?
Empty payload - > token with header.. Signature - > parse to get 0 claims??

@brentschmaltz brentschmaltz force-pushed the brentsch/payloadEmpty branch from ba2ac83 to e50660f Compare July 25, 2024 16:01
@brentschmaltz brentschmaltz merged commit 66aa794 into dev Jul 26, 2024
4 checks passed
@brentschmaltz brentschmaltz deleted the brentsch/payloadEmpty branch July 26, 2024 00:42
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.

[Bug / Feature Request] Create JsonWebToken with empty Payload
6 participants