MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / buildDefaultAuthenticator

Function buildDefaultAuthenticator

server/src/training-agent/index.ts:174–178  ·  view source on GitHub ↗

* Default `/mcp` route: presence-gated signature composition. Callers with no * `Signature-Input` header fall through to bearer auth (sandbox backward * compat — unsigned AAO API keys keep working). Callers that DO present a * signature header MUST produce a valid one: malformed/invalid signature

()

Source from the content-addressed store, hash-verified

172 * — it only changes behavior when a caller DOES present a signature header.
173 */
174function buildDefaultAuthenticator(): Authenticator | null {
175 const bearerAuth = buildBearerAuthenticator();
176 if (!bearerAuth) return null;
177 return requireSignatureWhenPresent(lazySigningAuth(), bearerAuth);
178}
179
180/**
181 * Presence-gated authenticator for all `/mcp-strict*` routes. Accepts a lazy

Callers 1

index.tsFile · 0.85

Calls 2

buildBearerAuthenticatorFunction · 0.85
lazySigningAuthFunction · 0.85

Tested by

no test coverage detected