MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / signature

Function signature

apps/cloud/src/auth/workos-events-sync.node.test.ts:1244–1245  ·  view source on GitHub ↗
(body: string, secret: string, timestamp = Date.now())

Source from the content-addressed store, hash-verified

1242
1243 /** The `WorkOS-Signature` header WorkOS sends: `t=<ms>, v1=<hmac-sha256 hex>`. */
1244 const signature = (body: string, secret: string, timestamp = Date.now()) =>
1245 `t=${timestamp}, v1=${createHmac("sha256", secret).update(`${timestamp}.${body}`).digest("hex")}`;
1246
1247 const post = (body: string, headers: Record<string, string>) =>
1248 new Request(`http://test.local${WORKOS_WEBHOOK_PATH}`, {

Callers 1

Calls 1

updateMethod · 0.65

Tested by

no test coverage detected