From 620c954b509768bcbf417e1fe2ae041a4dcedf08 Mon Sep 17 00:00:00 2001 From: George J Padayatti Date: Fri, 2 Aug 2024 15:49:42 +0530 Subject: [PATCH] Fix: Add kid from the JWK in the header instead of did:key 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 eb6734a..30b8295 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": kid, "jwk": key.export(private_key=False, as_dict=True)} + header = {"typ": "JWT", "alg": get_alg_for_key(key), "kid": key.key_id, "jwk": key.export(private_key=False, as_dict=True)} iat = iat or int(time.time()) nbf = iat