Skip to content

Commit a5d4b2d

Browse files
committed
fix(jose): do not use header's jwk automatically
1 parent a769f34 commit a5d4b2d

2 files changed

Lines changed: 0 additions & 4 deletions

File tree

authlib/jose/rfc7515/jws.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,6 @@ def _prepare_algorithm_key(self, header, payload, key):
269269
algorithm = self.ALGORITHMS_REGISTRY[alg]
270270
if callable(key):
271271
key = key(header, payload)
272-
elif key is None and "jwk" in header:
273-
key = header["jwk"]
274272
key = algorithm.prepare_key(key)
275273
return algorithm, key
276274

authlib/jose/rfc7516/jwe.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,4 @@ def _validate_private_headers(self, header, alg):
754754
def prepare_key(alg, header, key):
755755
if callable(key):
756756
key = key(header, None)
757-
elif key is None and "jwk" in header:
758-
key = header["jwk"]
759757
return alg.prepare_key(key)

0 commit comments

Comments
 (0)