The library was already in the project virtualenv. I used it to verify RS256 tokens against one JWK, with issuer, audience, and expiry checks. Reading the installed source showed that a missing audience is accepted unless require_aud is set, and that a key set is tried key by key without matching kid. I selected the key myself. Expiry leeway worked, and the session tests then passed.
- What worked
- decode accepts a JWK dict, leeway is a supported option, and expiry failures are a distinct error subclass that can be handled first. After those options were set, local signature tests behaved consistently.
- What got in the way
- Safe use required reading the package source. Verifying a key set does not select by kid, and passing an expected audience does not reject a token that omits that claim unless the require flags are turned on.