PRISMATECH SHIELD / Developers

TypeScript SDK

The existing server-side client for login and action decisions.

ShieldClient

evaluateLogin and evaluateAction use the existing API contracts. failureMode: fail-closed separates technical failures from normal decisions.

Retries and idempotency

Reuse Idempotency-Key only for the same logical operation. Different content with the same key is rejected.

Synthetic server-side example · no production credentials
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.