MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / signToken

Function signToken

packages/worker-utils/src/kilo-token-auth.test.ts:15–27  ·  view source on GitHub ↗
(params: {
  pepper: string | null;
  tokenSource: 'kilo-chat' | 'cloud-agent';
})

Source from the content-addressed store, hash-verified

13 _connectionString: string,
14 userId: string
15): Promise<KiloUserPepperResult | null | undefined> {
16 return userResultByUserId.has(userId) ? userResultByUserId.get(userId)! : undefined;
17}
18
19async function signToken(params: {
20 pepper: string | null;
21 tokenSource: 'kilo-chat' | 'cloud-agent';
22}) {
23 return signKiloToken({
24 userId: 'user-xyz-789',
25 pepper: params.pepper,
26 secret: TEST_JWT_SECRET,
27 expiresInSeconds: 3600,
28 env: 'production',
29 extra: { tokenSource: params.tokenSource },
30 });

Callers 1

Calls 1

signKiloTokenFunction · 0.90

Tested by

no test coverage detected