GET /v1/clearance/keys; Heretic is never in the request path. Heretic signs what it measured, including a contradicted verdict, and never withholds or reads back the token.
The token is 900 to 1,200 bytes as a cookie value. Issuing one counts as one probe plus, when a ceremony is minted, one challenge against your plan.
Hosted page
Redirect an uncleared request to the hosted page. It runs the probe, escalates per the site’s clearance settings, and returns to your URL withheretic_clearance=<jwt> appended to the query.
return must be https://, or loopback http://, on the site’s registered domain. Any other value is refused on the page and never redirected.
Your gate verifies the token, sets its cookie, and redirects to strip the parameter.
allowed is your rule.
Background
Loadguard.js with data-clearance="true". The embed runs without interaction and data-clearance-callback receives the JWT. Post it to your own endpoint, which verifies it and sets the cookie for the next request.
heretic.getClearance(id) reads the JWT of a widget rendered with the script API.
Guarded action
A form keeps the five-minute proof and siteverify. Apply the same gate check to the form post, so a cleared visitor is not probed again there. Configure the widget on the challenge widget page.What the token contains
Header:alg is EdDSA, typ is JWT, and kid is site_<id>/<version>.
When a ceremony ran:
device is the device the ceremony cleared: the desktop in a QR hand-off, otherwise the phone. Its identity hashes are in the challenge scope. Compare them only with other ceremony devices, never with probe.identity.
Your rule
Verify the signature,iss, aud, and exp, then apply your own rule. This example accepts an uncontradicted probe without concealment, or a passed ceremony, and requires the live request to come from the measured address and network. It is this site’s rule, not a Heretic threshold.
Facts
The hosted page is the only placement that gates the first request. It costs one wait of a few seconds per visitor per TTL. A client that does not run the collector is never cleared. That includes search crawlers. What happens to an uncleared request is your rule. Findings and concealment indicators are not in the token. The visitor can read the token. Read them with your secret key atGET /v1/verdict/{request_id}.
Dashboard settings
On the site’s panel in the dashboard:Verifiers
The server examples includenode/clearance.mjs, python/clearance.py, php/Clearance.php, and a Cloudflare Worker gate at examples/cloudflare-worker/clearance-gate.js.