From 894539ec9c5345ab1d9c06f3b9492754819a411a Mon Sep 17 00:00:00 2001 From: kadabusha <47604788+kadabusha@users.noreply.github.com> Date: Wed, 29 Dec 2021 22:48:27 +0200 Subject: [PATCH] Fix for headers disorder issue Related issue #715 --- jwt/api_jws.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jwt/api_jws.py b/jwt/api_jws.py index 9e8e1787..a3b5de9d 100644 --- a/jwt/api_jws.py +++ b/jwt/api_jws.py @@ -100,7 +100,7 @@ def encode( del header["typ"] json_header = json.dumps( - header, separators=(",", ":"), cls=json_encoder + header, separators=(",", ":"), cls=json_encoder, sort_keys=True ).encode() segments.append(base64url_encode(json_header))