Jwtk - a JWT library with first class JWK and JWK Set support

Well, yet another JWT library.

I built this because I need to verify tokens generated by keycloak or other OIDC providers, which expose their public keys in JWKS format, and I need to support various algorithms, and find it not really feasible or convenient with existing JWT libraries.

This library supports most if not all JWS algorithms, and makes it really easy to work with generic JWK/JWKS/PEM public/private keys. There is also a RemoteJwksVerifier where you just need to set the JWKS url to verify tokens: it fetches and caches the JWKS automatically.

I also tried to make the API straightforward, easy to use, flexible and close to the spec.

Doc: jwtk - Rust

Examples: jwtk/examples at main · sopium/jwtk · GitHub