https://github.com/yevtyushkin/id_token_verifier
A feature-rich, highly configurable OpenID Connect ID token verifier in Rust
https://github.com/yevtyushkin/id_token_verifier
async cache config idtoken jwt openidconnect retry rust tokio
Last synced: 4 months ago
JSON representation
A feature-rich, highly configurable OpenID Connect ID token verifier in Rust
- Host: GitHub
- URL: https://github.com/yevtyushkin/id_token_verifier
- Owner: yevtyushkin
- License: mit
- Created: 2025-05-24T21:35:33.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2026-02-03T08:35:41.000Z (4 months ago)
- Last Synced: 2026-02-03T10:57:55.041Z (4 months ago)
- Topics: async, cache, config, idtoken, jwt, openidconnect, retry, rust, tokio
- Language: Rust
- Homepage: https://crates.io/crates/id_token_verifier
- Size: 322 KB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# 🔎 id_token_verifier ✅
[](https://crates.io/crates/id_token_verifier)
[](https://codecov.io/gh/yevtyushkin/id_token_verifier)
A feature-rich, highly configurable OpenID Connect ID token verifier in Rust — empowering you to validate ID tokens as
easily as this, while handling retries, caching, and more under the hood:
```rust
use id_token_verifier::*;
use id_token_verifier::client::*;
#[derive(serde::Deserialize)]
struct MyClaims {
sub: String,
email: Option,
email_verified: Option,
}
async fn verify(
token: &str,
id_token_verifier: &IdTokenVerifierDefault
) -> Result {
id_token_verifier.verify(token).await
}
```
### ✨ Features
- 🔁 Configurable JWKS caching, including background refresh.
- 🛠 Pluggable retry logic via [backoff_config](https://github.com/yevtyushkin/backoff_config)
and [backon](https://github.com/Xuanwo/backon).
- ⚙️ Flexible validation settings.
- 🧩 [serde](https://github.com/serde-rs/serde)-friendly configuration — load from config files or environment variables,
or use the provided config `Builder`s.
- 📈 [tracing](https://github.com/tokio-rs/tracing) support via the optional tracing `feature` flag.
## 📚 Examples
- ✅ [Validating Google ID tokens](examples/google.rs)
Includes full setup for retries, JWKS caching, and validation settings.