* 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
()
| 172 | * — it only changes behavior when a caller DOES present a signature header. |
| 173 | */ |
| 174 | function 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 |
no test coverage detected