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

Function selectAuthMethod

packages/plugins/mcp/src/sdk/plugin.ts:526–536  ·  view source on GitHub ↗
(
  config: McpIntegrationConfigType,
  templateSlug: string | null,
)

Source from the content-addressed store, hash-verified

524 * config-driven), so existing connections keep working. Ambiguity across
525 * several methods renders no auth rather than guessing. */
526const selectAuthMethod = (
527 config: McpIntegrationConfigType,
528 templateSlug: string | null,
529): McpAuthMethod | undefined => {
530 const methods = config.authenticationTemplate ?? [];
531 if (templateSlug !== null) {
532 const match = methods.find((method: McpAuthMethod) => method.slug === templateSlug);
533 if (match) return match;
534 }
535 return methods.length === 1 ? methods[0] : undefined;
536};
537
538const buildConnectorInput = (
539 config: McpIntegrationConfigType,

Callers 2

buildConnectorInputFunction · 0.85
plugin.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected