When the jwks_client.get_jwk_set function finds the keys in the cache, it gets a PyJWKSet object, if not, it performs a fech and gets a JSON object. In both cases it checks if the data is a Dictionary, causing the check to fail when the data was retrieved from the cache.
|
def get_jwk_set(self, refresh: bool = False) -> PyJWKSet: |
The right code would return the object found in the cache.