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

Function authenticateSession

apps/host-selfhost/src/mcp/auth.ts:237–243  ·  view source on GitHub ↗
(request: Request)

Source from the content-addressed store, hash-verified

235 /** (b) The existing cookie / bearer-session / x-api-key path. The fallback's
236 * api `Principal` shape is byte-identical to host-mcp's `Principal`. */
237 const authenticateSession = (request: Request): Effect.Effect<Principal | null> =>
238 fallback.authenticate(request).pipe(
239 Effect.catchTags({
240 Unauthorized: () => Effect.succeed(null),
241 NoOrganization: () => Effect.succeed(null),
242 }),
243 );
244
245 /**
246 * Try the OAuth bearer ONLY when a Bearer header is present (no

Callers 1

authenticateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected