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

Function bearerChallengeFor

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

Source from the content-addressed store, hash-verified

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

Callers 1

toOutcomeFunction · 0.90

Calls 2

bearerChallengeFunction · 0.90

Tested by

no test coverage detected