ShieldClient
evaluateLogin and evaluateAction use the existing API contracts. failureMode: fail-closed separates technical failures from normal decisions.
PRISMATECH SHIELD / Developers
The existing server-side client for login and action decisions.
evaluateLogin and evaluateAction use the existing API contracts. failureMode: fail-closed separates technical failures from normal decisions.
Reuse Idempotency-Key only for the same logical operation. Different content with the same key is rejected.
import { ShieldClient } from "@prismatech/shield-sdk";
const shield = new ShieldClient({
baseUrl: process.env.SHIELD_API_URL!,
apiKey: process.env.SHIELD_API_KEY!,
failureMode: "fail-closed"
});
const result = await shield.evaluateLogin({
subject: { id: "synthetic-user" },
idempotencyKey: "synthetic-login-0001"
});
if (result.degraded || result.decision !== "ALLOW") {
throw new Error("ACCESS_REQUIRES_REVIEW");
}Public registration and email verification are not yet approved. Existing customers use the customer portal. No accounts or keys are created here.