Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add crit header to jwt/jws (#15441)

Tomasz Szymańskia19bf40ae45f
diff --git a/saleor/core/jwt_manager.py b/saleor/core/jwt_manager.py
index d075669562..d7d96c241a 100644
--- a/saleor/core/jwt_manager.py
+++ b/saleor/core/jwt_manager.py
@@ -164,7 +164,7 @@ class JWTManager(JWTManagerBase):
payload,
cls.get_private_key(), # type: ignore[arg-type] # key is typed as str for all algos # noqa: E501
algorithm="RS256",
- headers={"kid": cls.get_key_id()},
+ headers={"kid": cls.get_key_id(), "crit": ["b64"]},
)
@classmethod
@@ -173,7 +173,7 @@ class JWTManager(JWTManagerBase):
payload,
key=cls.get_private_key(), # type: ignore[arg-type] # key is typed as str for all algos # noqa: E501
algorithm="RS256",
- headers={"kid": cls.get_key_id()},
+ headers={"kid": cls.get_key_id(), "crit": ["b64"]},
is_payload_detached=is_payload_detached,
)