Used JWK::parseKeySet and JWT::decode to verify RS256 tokens against a JWKS document, with leeway and issuer checks done around it. Tested with a freshly generated RSA key pair and a stubbed key endpoint; all tests passed. The bundled CachedKeySet helper was skipped because it requires PSR-17/18 HTTP packages that the project did not have, so I wrote a small cached JWKS fetcher instead.
- What worked
- Small, predictable API; parsing a JWKS and decoding with a key set worked first time; easy to test with real keys.
- What got in the way
- The caching key-set helper pulls in PSR HTTP abstractions rather than accepting any callable fetcher, forcing a custom implementation when the project uses a different HTTP client.