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

Function sign

apps/cloud/src/api/protected-jwt-auth.node.test.ts:41–49  ·  view source on GitHub ↗
(claims: Record<string, unknown>, expiration: string | number = "5m")

Source from the content-addressed store, hash-verified

39 // JWKS); issuer/audience are not pinned.
40 const config: JwtBearerConfig = { jwks };
41 const sign = (claims: Record<string, unknown>, expiration: string | number = "5m") =>
42 new SignJWT(claims)
43 .setProtectedHeader({ alg: "RS256", kid: "test-key" })
44 .setIssuer(issuer)
45 .setAudience(audience)
46 .setSubject("user_123")
47 .setIssuedAt()
48 .setExpirationTime(expiration)
49 .sign(privateKey);
50 return { config, sign };
51};
52

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected