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

If the JWS payload is not JSON, just return the raw bytes. #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MentalPower
Copy link

Some JWS payloads are not encoded as JSON and are still perfectly legal[1][2]. This change
makes it so that non JSON-encoded payloads are just passed back inside the __rawPayload
key of the map. The type is still map[string]interface{} so as not to confuse any consumers.

[1] https://tools.ietf.org/html/rfc7515#section-4.1.9
[2] https://tools.ietf.org/html/rfc7515#section-2 (JWS Payload)

Some JWS payloads are not encoded as JSON and are still perfectly legal[1][2]. This change
makes it so that non JSON-encoded payloads are just passed back inside the `__rawPayload`
key of the map. The type is still `map[string]interface{}` so as not to confuse any consumers.

[1] https://tools.ietf.org/html/rfc7515#section-4.1.9
[2] https://tools.ietf.org/html/rfc7515#section-2 (JWS Payload)
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.

1 participant