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

Function negotiateAuthMethod

packages/core/sdk/src/oauth-discovery.ts:750–756  ·  view source on GitHub ↗
(advertised: readonly string[] | undefined)

Source from the content-addressed store, hash-verified

748type DcrAuthMethod = (typeof SUPPORTED_DCR_AUTH_METHODS)[number];
749
750const negotiateAuthMethod = (advertised: readonly string[] | undefined): DcrAuthMethod | null => {
751 if (!advertised || advertised.length === 0) return "none";
752 for (const candidate of SUPPORTED_DCR_AUTH_METHODS) {
753 if (advertised.includes(candidate)) return candidate;
754 }
755 return null;
756};
757
758// ---------------------------------------------------------------------------
759// Convenience: begin the full dynamic flow in one call

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected