Rust Server
Run the server and understand the API endpoints.
The Rust server exposes a small HTTP API for collecting server-side fingerprints.
Endpoints
GET /healthreturns204 No Content.GET /fingerprintreturns the server fingerprint only.POST /fingerprintreturns the server fingerprint and a combined composite.
Example request
curl -X POST https://localhost:8443/fingerprint \
-H "content-type: application/json" \
-d '{"client_composite":"client-composite-string","delimiter":"-","metadata":{"userId":"user_123"}}'Client integration
The client library can call this endpoint directly:
import { OpenClientIdClient } from "openclientid";
const client = new OpenClientIdClient({
endpoint: "https://localhost:8443/fingerprint",
});
const combined = await client.getFingerprintWithServer({
hashComposite: true,
metadata: {
userId: "user_123",
source: "checkout",
},
});
console.log(combined.server.server.hash);