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

Function unauthorized

packages/core/test-servers/src/worker.ts:76–87  ·  view source on GitHub ↗
(request: Request)

Source from the content-addressed store, hash-verified

74};
75
76const unauthorized = (request: Request) => {
77 const url = new URL(request.url);
78 return json(
79 { error: "invalid_token" },
80 {
81 status: 401,
82 headers: {
83 "www-authenticate": `Bearer resource_metadata="${url.origin}/.well-known/oauth-protected-resource${url.pathname}", error="invalid_token"`,
84 },
85 },
86 );
87};
88
89const oauthMetadata = (request: Request) => {
90 const url = new URL(request.url);

Callers 3

handleOpenApiFunction · 0.70
handleGraphqlFunction · 0.70
handleMcpFunction · 0.70

Calls 1

jsonFunction · 0.70

Tested by

no test coverage detected