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

Function unauthorized

apps/cloud/src/mcp/responses.ts:39–49  ·  view source on GitHub ↗
(auth: UnauthorizedAuth, protectedResourceMetadataUrl: string)

Source from the content-addressed store, hash-verified

37 jsonRpcErrorBody(status, code, message);
38
39export const unauthorized = (auth: UnauthorizedAuth, protectedResourceMetadataUrl: string) =>
40 HttpServerResponse.jsonUnsafe(
41 { error: "unauthorized" },
42 {
43 status: 401,
44 headers: {
45 ...CORS_ALLOW_ORIGIN,
46 "www-authenticate": bearerChallenge(auth, protectedResourceMetadataUrl),
47 },
48 },
49 );

Callers 4

toOutcomeFunction · 0.70
cloudflareAccessMcpAuthFunction · 0.50
authenticateFunction · 0.50
test-app.tsFile · 0.50

Calls 1

bearerChallengeFunction · 0.85

Tested by

no test coverage detected