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
Hello! First of all thank you for your package, it implements just the solution I was looking for. Also sorry if this report does not have the standard structure but I found it to be easier to explain this way.
When I try jwks_client.get_signing_key_from_jwt I always end up with the following TypeError:
TypeError: the JSON object must be str, bytes or bytearray, not dict
I've done some debugging and this is what I've found out, fetching the data from the endpoint using urllib and doing json_loadson the response returns something like this:
The type of this is data is dict, then this is iterated and correctly transformed into a PyJWKSet, and during this construction the instances of PyJWK are initialized receiving each of these keys as the jwk_data in my case these will get:
And the type of this is dict too.
Later this data is meant to be read on self.Algorithm.from_jwk(self._jwk_data) and on algorithms.py line 429 tries to convert the expected json data, but for this particular case this is already a dict, and that's why it's rising the TypeError.
obj=json.loads(jwk)
I suppose the most straightforward one would be turning that line into:
I can think of some other ways of fixing this, but probably someone more experienced with this codebase can think of a better solution. In any case if you are interested on me giving a try let me know.
The text was updated successfully, but these errors were encountered:
Hello! First of all thank you for your package, it implements just the solution I was looking for. Also sorry if this report does not have the standard structure but I found it to be easier to explain this way.
When I try
jwks_client.get_signing_key_from_jwt
I always end up with the following TypeError:I've done some debugging and this is what I've found out, fetching the data from the endpoint using
urllib
and doingjson_loads
on the response returns something like this:The type of this is data is
dict
, then this is iterated and correctly transformed into aPyJWKSet
, and during this construction the instances ofPyJWK
are initialized receiving each of these keys as thejwk_data
in my case these will get:And the type of this is
dict
too.Later this data is meant to be read on
self.Algorithm.from_jwk(self._jwk_data)
and onalgorithms.py line 429
tries to convert the expected json data, but for this particular case this is already a dict, and that's why it's rising theTypeError
.I suppose the most straightforward one would be turning that line into:
I can think of some other ways of fixing this, but probably someone more experienced with this codebase can think of a better solution. In any case if you are interested on me giving a try let me know.
The text was updated successfully, but these errors were encountered: