Skip to content

yevtyushkin/id_token_verifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔎 id_token_verifier ✅

crates.io codecov

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:

use id_token_verifier::*;
use id_token_verifier::client::*;

#[derive(serde::Deserialize)]
struct MyClaims { 
  sub: String,
  email: Option<String>,
  email_verified: Option<bool>,
}

async fn verify(
  token: &str,
  id_token_verifier: &IdTokenVerifierDefault
) -> Result<MyClaims, IdTokenVerifierError> {
  id_token_verifier.verify(token).await
}

✨ Features

  • 🔁 Configurable JWKS caching, including background refresh.
  • 🛠 Pluggable retry logic via backoff_config and backon.
  • ⚙️ Flexible validation settings.
  • 🧩 serde-friendly configuration — load from config files or environment variables, or use the provided config Builders.
  • 📈 tracing support via the optional tracing feature flag.

📚 Examples

About

A feature-rich, highly configurable OpenID Connect ID token verifier in Rust

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages