-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
I'm not sure if this is a flaw in JWT specification or if I don't understand something. In JWT, the order of JSON key, value pairs matters when encoding and decoding tokens. Having {"alg": "HS256", "typ": "JWT"} headers produces different token compared to {"typ": "JWT", "alg": "HS256"}.
This seems weird to me because JSON specification states that the key, value pairs do not have an order: An object is an unordered set of name/value pairs. An object begins with { (left brace) and ends with } (right brace). Each name is followed by : (colon) and the name/value pairs are separated by , (comma). source.
Do you have an explanation for this?
Metadata
Metadata
Assignees
Labels
No labels
