Skip to content

Commit a2d4a7e

Browse files
committed
Added import from file method to KeyJar
1 parent 1a9a07b commit a2d4a7e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/cryptojwt/key_jar.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,10 @@ def import_jwks_as_json(self, jwks, issuer):
427427
"""
428428
return self.import_jwks(json.loads(jwks), issuer)
429429

430+
def import_jwks_from_file(self, filename, issuer):
431+
with open(filename) as jwks_file:
432+
self.import_jwks_as_json(jwks_file.read(), issuer)
433+
430434
def __eq__(self, other):
431435
if not isinstance(other, KeyJar):
432436
return False

0 commit comments

Comments
 (0)