Phase 1: Presigned Intent & Live Capture Enforcement
In vehicle inspections, roadside claims, and high-trust field audits, coordinates alone do not prove visual state. Standard multipart uploads allow modified gallery images to masquerade as live captures.
With POST /v1/sessions/verify-intent, the client receives a short-lived presigned storage target immediately prior to shutter capture. When POST /v1/sessions/verify arrives, any capture timestamp older than 10 seconds is deterministically rejected with 400 ERR_STALE_VISUAL_PROOF.
// Phase 1: Acquire short-lived presigned upload targetconst intent = await setsig.sessions.verifyIntent({ venueId: "ven_workshop_ist_01", clientToken: "clm_workshop_4409", contentType: "image/webp",}); // Phase 2: Seal live snapshot digest (< 10s window) into presence sessionconst verified = await setsig.sessions.verify({ qrPayload: scannedQrPayload, clientBinding: { clientToken: "clm_workshop_4409", userRef: "inspector_18" }, telemetry: { latitude: 41.00824, longitude: 28.97836, accuracyMeters: 3.4 }, visualProof: { storageKey: intent.storageKey, imageHashSha256: computedSha256Hex, capturedAt: new Date().toISOString(), livenessScore: 0.98, },});Phase 2: Storage Hash Verification & Session HMAC Binding
Before sealing the session, the backend verifies the uploaded cloud object directly against the 64-character SHA-256 hex digest submitted by the client, rejecting tampered uploads with ERR_INVALID_IMAGE_HASH.
Finally, the verified image_hash_sha256 is concatenated directly into the canonical session message alongside coordinates, NTP nanosecond timestamp, and hardware enclave verdict before signing with HMAC-SHA256.
proofMessage := fmt.Sprintf("%s:%s:%s:%f:%f:%s:%s:%s", sessionID.String(), tenant.ID.String(), req.ClientBinding.ClientToken, deviceCoord.Latitude, deviceCoord.Longitude, visualProofHash, nowUTC.Format(time.RFC3339Nano), attestVerdict,)proofSignature := engine.SignHMACSHA256(proofMessage, h.secretKey)