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

Method resolveManagedAuth

packages/node-sdk/src/auth.ts:281–295  ·  view source on GitHub ↗
(providerName?: string | undefined)

Source from the content-addressed store, hash-verified

279 };
280
281 private resolveManagedAuth(providerName?: string | undefined): {
282 readonly oauthRef?: OAuthRef | undefined;
283 readonly baseUrl?: string | undefined;
284 } {
285 const name = providerName ?? KIMI_CODE_PROVIDER_NAME;
286 // Read path: token/status resolution must work off a degraded config
287 // instead of failing the session when an unrelated section is broken.
288 // Write paths (the toolkit's configAdapter.read) stay strict.
289 const config = loadRuntimeConfigSafe(this.options.configPath).config;
290 const provider = config.providers[name];
291 return {
292 oauthRef: provider?.oauth,
293 baseUrl: provider?.baseUrl,
294 };
295 }
296
297 private resolveRuntimeManagedAuth(providerName?: string | undefined): {
298 readonly oauthRef: OAuthRef;

Callers 3

loginMethod · 0.95
runtimeOAuthRefMethod · 0.95

Calls 1

loadRuntimeConfigSafeFunction · 0.90

Tested by

no test coverage detected