Crate cf_access

Source
Expand description

§cf-access

Simple Cloudflare Access JWT validator.

§Usage

You will need:

  • Your team name
  • Your application’s AUD tag
use cf_access::Validator;

let validator = Validator::new("team_name", "aud_tag");

if let Some(jwt) = headers.get("cf-access-jwt-assertion") {
    if let Ok(claims) = validator.validate(jwt).await {
        println!("{claims:?}");
    }
}

§License

MIT

Re-exports§

pub use jwtk;
pub use reqwest;
pub use uuid;

Structs§

IdentityClaims
The information in the JWT when authenticating with an identity provider.
ServiceClaims
The information in the JWT when authenticating with a service token.
Validator
A validator for Cloudflare Access JWTs.

Enums§

Claims
The user information found in the JWT.
Error
An error that can occur when validating a JWT or constructing a Validator.
TokenType
The type of token.