Clearance keys
Fetch the public keys that verify a site’s clearance tokens.
GET
Clearance keys
Public. No secret is required. Verify a clearance against these keys on your server or edge.
Python with PyJWT and
PHP with
For Cloudflare Workers, use the tested WebCrypto verifier and complete gate from the server examples. It checks signatures, issuer, audience, expiry, issue time, version and site key, bounds key requests and refuses malformed tokens. Configuration is in
kid matches the token header. x is the raw Ed25519 public key. The response carries cache-control: public, max-age=300. Cache keys by kid.
Status codes
Rotation
Rotate signing key on the site’s dashboard panel increments the key version. New tokens carry the newkid. The response lists the current and previous version. Rotating again removes older versions from the JWKS. Wait at least 30 days between routine rotations to preserve the maximum lifetime of outstanding tokens. Cached keys may remain usable for five minutes; rotation is not immediate revocation.
Verify
Node withjose:
cryptography:
firebase/php-jwt. The library checks exp; check iss and aud yourself.
examples/cloudflare-worker/README.md.
Then apply your rule. A valid signature is not an admission decision.