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

Class InMemoryStorage

packages/oauth/test/oauth-manager-lock-failure.test.ts:22–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20}));
21
22class InMemoryStorage implements TokenStorage {
23 public token: TokenInfo | undefined;
24
25 async load(): Promise<TokenInfo | undefined> {
26 return this.token;
27 }
28
29 async save(_name: string, token: TokenInfo): Promise<void> {
30 this.token = token;
31 }
32
33 async remove(): Promise<void> {
34 this.token = undefined;
35 }
36
37 async list(): Promise<string[]> {
38 return this.token === undefined ? [] : ['kimi-code'];
39 }
40}
41
42const config: OAuthFlowConfig = {
43 name: 'kimi-code',

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected