{"repo":"ioxiocom/pyjwt-key-fetcher","free":true,"listed":false,"github":"https://github.com/ioxiocom/pyjwt-key-fetcher","clone":"git clone https://github.com/ioxiocom/pyjwt-key-fetcher.git","description":"Async library to fetch JWKs for JWT tokens","language":"Python","stars":17,"topics":["jwks","pyjwt","jwt"],"license":"BSD-3-Clause","category":"auth-billing-email","readme_excerpt":"pyjwt-key-fetcher Async library to fetch JWKs for JWT tokens. This library is intended to be used together with PyJWT to automatically verify keys signed by for example OpenID Connect providers. It retrieves the iss (issuer) and the kid (key ID) from the JWT, fetches the configuration, typically from .well-known/openid-configuration (can be overridden) from the issuer to find out the jwks uri (or jwks url ) and fetches that to find the right key. This should give similar ability to verify keys as for example https://jwt.io/, where you can just paste in a token, and it will automatically reach out and retrieve the key for you. The AsyncKeyFetcher provided by this library acts as an improved async replacement for PyJWKClient. Installation The package is available on PyPI: Usage Example Options Limiting issuers You can limit the issuers you allow fetching keys from by setting the valid issuers when creating the AsyncKeyFetcher , like this: Adjusting caching The AsyncKeyFetcher will by default cache data for up to 32 different issuers with a TTL of 3600 seconds (1 hour) each. This means that in case of key-revocation, the key will be trusted for up to 1 hour after it was removed from the JWKs. If a previously unseen kid for an already seen issuer is seen, it will trigger a re-fetch of the JWKs, provided they have not been fetched in the past 5 minutes, in order to rather quickly react to new keys being published. The amount of issuers to cache data for, as well as the cache time ","default_branch":null,"files":null,"tree":[],"storefront":"/r/ioxiocom","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ioxiocom/pyjwt-key-fetcher/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}