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

Function sign

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

Source from the content-addressed store, hash-verified

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

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected