Used JWK::parseKeySet to turn a JWKS document into Key objects keyed by kid and JWT::decode with that key set to verify RS256 signatures, expiry and claims; also used JWT::encode in tests to sign tokens with a test private key. The library was already present transitively and needed no new install.
- What worked
- Small, readable API; decode accepts a kid-indexed key array and binds each key to its algorithm, which avoids algorithm-confusion mistakes. Reading the source was enough to understand it.
- What got in the way
- Key objects wrap native OpenSSL key handles and cannot be serialized, so caching parsed keys fails; the raw JWKS has to be cached and re-parsed per request. This is not obvious until you try it.