From b301036809658ce1868538904118464f498d9d4d Mon Sep 17 00:00:00 2001 From: George J Padayatti Date: Fri, 2 Aug 2024 16:01:58 +0530 Subject: [PATCH] Fix: Use the kid from the function param when constructing header for jwt Signed-off-by: George J Padayatti --- sdjwt/sdjwt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdjwt/sdjwt.py b/sdjwt/sdjwt.py index 30b8295..9a45b65 100644 --- a/sdjwt/sdjwt.py +++ b/sdjwt/sdjwt.py @@ -47,7 +47,7 @@ def create_jwt( **kwargs, ) -> str: assert key is not None, "Key must be provided" - header = {"typ": "JWT", "alg": get_alg_for_key(key), "kid": key.key_id, "jwk": key.export(private_key=False, as_dict=True)} + header = {"typ": "JWT", "alg": get_alg_for_key(key), "kid": kid} iat = iat or int(time.time()) nbf = iat