jtai-access (0.5.0)

Published 2025-12-25 10:00:54 -08:00 by jtai

Installation

[registry]
default = "forgejo"

[registries.forgejo]
index = "sparse+" # Sparse index
# index = "" # Git

[net]
git-fetch-with-cli = true
cargo add jtai-access@0.5.0

About this package

Super simple library for validating Cloudflare Access JWTs

jtai-access

Simple Cloudflare Access JWT validator.

Usage

You will need:

  • Your team name
  • Your application's AUD tag
# #[tokio::main]
# async fn main() {
use jtai_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:?}");
    }
}
# }

Dependencies

ID Version
js-sys ^0.3.83
jsonwebtoken ^10.2.0
reqwest ^0.12.15
serde ^1.0.219
thiserror ^2.0.12
tokio ^1.44.1
uuid ^1.16.0
worker ^0.7.0
axum ^0.8.3
serde_json ^1.0.140
tokio ^1.44.1
Details
Cargo
2025-12-25 10:00:54 -08:00
12
Jasmine Tai <jtai@jtai.ca>
UNLICENSED
18 KiB
Assets (1)
Versions (9) View all
0.5.0 2025-12-25
0.4.6 2025-12-24
0.4.5 2025-12-24
0.4.4 2025-12-24
0.4.3 2025-11-28