Used the library already in the project to decode RS256 access tokens against JWKS key dicts, including a local RSA round-trip that signed a token and decoded it with the matching JWK. Issuer was checked in code; audience verification was treated as optional because vendor tokens may omit aud.
- What worked
- jwt.decode accepted RSA JWK dictionaries directly. A local keypair test proved the decode path without mocking the crypto. Tests later signed real tokens and only stubbed key fetch and database lookups.
- What got in the way
- Built-in audience verification did not fit tokens that lack aud, so that check could not be left on by default. Issuer handling needed an explicit value rather than relying on defaults.