Used the already-installed library to verify RS256 tokens against a remote JWKS endpoint with its cached key set class, backed by the PSR-18 client and PSR-6 cache already present. Had to read the source to get the cached key set constructor signature and the leeway/decode API right. Unit tests with a real RSA key pair and a mocked JWKS response passed for both accept and reject paths.
- What worked
- The cached key set integrates cleanly with PSR interfaces and handles key rotation; decode with a key set is a single call.
- What got in the way
- Constructor argument order and optional parameters for the cached key set were not obvious without reading the code.