| Crates.io | cf-access |
| lib.rs | cf-access |
| version | 0.2.0 |
| created_at | 2025-03-30 00:44:18.512137+00 |
| updated_at | 2025-03-30 23:47:50.939663+00 |
| description | Super simple library for validating Cloudflare Access JWTs |
| homepage | https://github.com/j-tai/cf-access |
| repository | https://github.com/j-tai/cf-access |
| max_upload_size | |
| id | 1611888 |
| size | 64,561 |
Simple Cloudflare Access JWT validator.
You will need:
# #[tokio::main]
# async fn main() {
use cf_access::Validator;
let validator = Validator::new("team_name", "aud_tag");
# let mut headers = std::collections::HashMap::new();
# headers.insert("cf-access-jwt-assertion", "...");
if let Some(jwt) = headers.get("cf-access-jwt-assertion") {
if let Ok(claims) = validator.validate(jwt).await {
println!("{claims:?}");
}
}
# }
MIT