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

Function sign

apps/cloud/src/mcp/mcp-auth.node.test.ts:22–29  ·  view source on GitHub ↗
(claims: Record<string, unknown>)

Source from the content-addressed store, hash-verified

20 const jwk = await exportJWK(publicKey);
21 const jwks = createLocalJWKSet({ keys: [{ ...jwk, kid: "test-key" }] });
22 const sign = (claims: Record<string, unknown>) =>
23 new SignJWT({ org_id: "org_test", ...claims })
24 .setProtectedHeader({ alg: "RS256", kid: "test-key" })
25 .setIssuer(issuer)
26 .setSubject("user_test")
27 .setIssuedAt()
28 .setExpirationTime("5m")
29 .sign(privateKey);
30
31 return { jwks, sign };
32};

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected