You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thanks for creating and maintaining this library!
The current PyJWKSet API is pretty thin: it wraps a list of PyJWK and provides basic deserialization, but nothing else.
I'd like to propose adding PyJWKSet.__getitem__, which would allow a user to index the PyJWKSet by key ID and return the corresponding PyJWK (or KeyError if not present). This saves users from having to write their own search over the PyJWKSet, and doesn't significantly complicate the current API.
With __getitem__, the use pattern would be:
jwks=PyJWKSet(keys)
jwk=jwks["somelonghexkeyid"]
Would this functionality be welcome? If so, I am happy to contribute it.
The text was updated successfully, but these errors were encountered:
woodruffw
added a commit
to woodruffw-forks/pyjwt
that referenced
this issue
Jan 21, 2022
First of all, thanks for creating and maintaining this library!
The current
PyJWKSet
API is pretty thin: it wraps a list ofPyJWK
and provides basic deserialization, but nothing else.I'd like to propose adding
PyJWKSet.__getitem__
, which would allow a user to index thePyJWKSet
by key ID and return the correspondingPyJWK
(orKeyError
if not present). This saves users from having to write their own search over thePyJWKSet
, and doesn't significantly complicate the current API.With
__getitem__
, the use pattern would be:Would this functionality be welcome? If so, I am happy to contribute it.
The text was updated successfully, but these errors were encountered: