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

Function bearerChallengeFor

apps/cloud/src/mcp/auth.ts:140–148  ·  view source on GitHub ↗
(
  result: McpUnauthorizedResult,
  organizationId: string | null = null,
  toolkitSlug: string | null = null,
)

Source from the content-addressed store, hash-verified

138 * an org in the URL (`/org_xxx/mcp`), else the bare document.
139 */
140export const bearerChallengeFor = (
141 result: McpUnauthorizedResult,
142 organizationId: string | null = null,
143 toolkitSlug: string | null = null,
144): string =>
145 bearerChallenge(
146 { reason: result.reason, description: result.description },
147 protectedResourceMetadataUrlFor(organizationId, toolkitSlug),
148 );
149
150// ---------------------------------------------------------------------------
151// Auth tags + Live layers

Callers 1

toOutcomeFunction · 0.90

Calls 2

bearerChallengeFunction · 0.90

Tested by

no test coverage detected