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

Function authenticateWith

apps/cloud/src/mcp/auth-provider.test.ts:84–93  ·  view source on GitHub ↗
(
  orgAuth: Layer.Layer<McpOrganizationAuth>,
  auth: Layer.Layer<McpAuth> = stubAuth,
)

Source from the content-addressed store, hash-verified

82}> {}
83
84const authenticateWith = (
85 orgAuth: Layer.Layer<McpOrganizationAuth>,
86 auth: Layer.Layer<McpAuth> = stubAuth,
87) =>
88 Effect.gen(function* () {
89 const provider = yield* McpAuthProvider;
90 return yield* provider.authenticate(request());
91 }).pipe(
92 Effect.provide(cloudMcpAuthProviderLayer.pipe(Layer.provide(Layer.mergeAll(auth, orgAuth)))),
93 );
94
95describe("cloud MCP org-authorization classification", () => {
96 it.effect("WorkOS 5xx -> Unavailable (retryable 503, session preserved)", () =>

Callers 1

Calls 1

requestFunction · 0.70

Tested by

no test coverage detected