Skip to content

Commit 60e2b17

Browse files
committed
Issuer_id ar argument doesn't make sense.
Allow crv specification to be used when search for a key.
1 parent 169c73c commit 60e2b17

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/cryptojwt/key_issuer.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ def add(self, item, **kwargs):
137137
self.add_url(item, **kwargs)
138138
else:
139139
self.add_symmetric(item, **kwargs)
140+
return self
140141

141142
def all_keys(self):
142143
"""
@@ -236,19 +237,18 @@ def import_jwks(self, jwks):
236237
)
237238
)
238239

239-
def import_jwks_as_json(self, jwks, issuer_id):
240+
def import_jwks_as_json(self, jwks):
240241
"""
241242
Imports all the keys that are represented in a JWKS expressed as a
242243
JSON object
243244
244245
:param jwks: JSON representation of a JWKS
245-
:param issuer_id: Who 'owns' the JWKS
246246
"""
247247
return self.import_jwks(json.loads(jwks))
248248

249-
def import_jwks_from_file(self, filename, issuer_id):
249+
def import_jwks_from_file(self, filename):
250250
with open(filename) as jwks_file:
251-
self.import_jwks_as_json(jwks_file.read(), issuer_id)
251+
self.import_jwks_as_json(jwks_file.read())
252252

253253
def remove_outdated(self, when=0):
254254
"""
@@ -333,7 +333,7 @@ def get(self, key_use, key_type="", kid=None, alg="", **kwargs):
333333
_lst.append(key)
334334
lst = _lst
335335
else:
336-
_crv = kwargs.get('crv')
336+
_crv = kwargs.get("crv")
337337
if _crv:
338338
_lst = [k for k in lst if k.crv == _crv]
339339
lst = _lst

0 commit comments

Comments
 (0)