Docs
On-site authorizations
Make people confirm an operation where it happens. Two or three people approve at the same display, or one named person approves in person. You get a signed proof that says who, where, at what presence level, and for exactly which operation.
Concepts
- Two-person rule (dual): the display switches to "Authorization required" and counts approvals. Different people on different phones, all within the time window (default 60 s). One reject denies.
- In-person approval (approve): you get an approval link to send to one person. They sign in, scan the named display, pass the presence check and approve.
- Strict evidence: a flagged presence result counts as a fail. Identity must be a passkey or a signed-in account.
- Isolated: scans made for an authorization never run the channel's normal actions. You may link one physical or HTTP action that runs once on approval and is never retried.
- Plans: Assurance and Enterprise. Professional may run up to 2 console-created two-person requests at a time.
Create with the API
Use an API key with scope attest:write (and attest:read to read back).
OP=$(printf '%s' '{"change":"CHG-1042","action":"open rack 7"}' | sha256sum | cut -d' ' -f1)
curl -X POST https://qrchannels.io/api/public/v1/authorizations/dual \
-H "Authorization: Bearer $QRC_KEY" -H "Idempotency-Key: chg-1042" \
-H "content-type: application/json" \
-d '{"purpose":"Open rack 7","op_digest":"'$OP'","beacon_ids":["<display id>"],"min_pal":2,"metadata":{"ticket":"CHG-1042"}}'
curl -X POST https://qrchannels.io/api/public/v1/authorizations/approve \
-H "Authorization: Bearer $QRC_KEY" -H "content-type: application/json" \
-d '{"target_email":"ops@example.com","purpose":"Release payment","summary":"CHF 48,000 to Alpine AG","op_digest":"'$OP'","beacon_ids":["<display id>"],"min_pal":2}'
curl https://qrchannels.io/api/public/v1/authorizations/<id> -H "Authorization: Bearer $QRC_KEY"Listen for authorization.approved (it carries the JWS), .denied, .expired, .canceled and .revoked. Subscriptions can filter on metadata keys.
Verify the attestation
Compact JWS, alg: EdDSA, typ: qrc-authorization+jwt, signed with your organization key published at /o/<slug>/.well-known/jwks.json. Always compare op with the digest of the operation you are about to run.
// Node (jose)
import { createRemoteJWKSet, jwtVerify } from "jose";
const jwks = createRemoteJWKSet(new URL("https://qrchannels.io/o/acme/.well-known/jwks.json"));
const { payload } = await jwtVerify(jws, jwks, { issuer: "https://qrchannels.io/o/acme", typ: "qrc-authorization+jwt" });
if (payload.op !== expectedDigest) throw new Error("Different operation");# Python (PyJWT)
import jwt
jwk_client = jwt.PyJWKClient("https://qrchannels.io/o/acme/.well-known/jwks.json")
key = jwk_client.get_signing_key_from_jwt(token).key
claims = jwt.decode(token, key, algorithms=["EdDSA"], issuer="https://qrchannels.io/o/acme", options={"verify_aud": False})
assert claims["op"] == expected_digestClaims: iss, aud, kind, purpose, op, loc, pal, subs, names?, txn, meta, ev, iat, exp. ev is the sha256 of the participations' scan-event hashes, so the proof is tied to your tamper-evident scan log. If a review later rejects a participation, the attestation is revoked.