MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / isValid

Function isValid

packages/server/src/services/auth/tokenStore.ts:71–78  ·  view source on GitHub ↗
(candidate: string)

Source from the content-addressed store, hash-verified

69 tokenPath,
70 getToken: currentToken,
71 isValid(candidate: string): boolean {
72 const tokenBuf = Buffer.from(currentToken());
73 const candidateBuf = Buffer.from(candidate);
74 if (candidateBuf.length !== tokenBuf.length) {
75 return false;
76 }
77 return timingSafeEqual(candidateBuf, tokenBuf);
78 },
79 async dispose(): Promise<void> {
80 // Persistent token: intentionally left on disk so it survives restarts.
81 },

Callers 3

parseOrGenerateRequestIdFunction · 0.85
isUlidFunction · 0.85
readFunction · 0.85

Calls 1

currentTokenFunction · 0.85

Tested by

no test coverage detected