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

Function authenticate

apps/local/src/identity.test.ts:10–13  ·  view source on GitHub ↗
(path: string, headers: Record<string, string> = {})

Source from the content-addressed store, hash-verified

8const TOKEN = "boot-token";
9
10const authenticate = (path: string, headers: Record<string, string> = {}) =>
11 Effect.flatMap(IdentityProvider.asEffect(), (provider) =>
12 provider.authenticate(new Request(`http://127.0.0.1${path}`, { headers })),
13 ).pipe(Effect.provide(makeLocalIdentityLayer(TOKEN)), Effect.exit, Effect.runPromise);
14
15describe("makeLocalIdentityLayer", () => {
16 it("resolves the local principal for a matching bearer token", async () => {

Callers 1

identity.test.tsFile · 0.70

Calls 1

makeLocalIdentityLayerFunction · 0.90

Tested by

no test coverage detected