Skip to content

Commit 6309053

Browse files
committed
Auth: capture apiKey header/query param name (keyName)
1 parent e85ddb3 commit 6309053

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/lib/detect.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export interface DetectionResult {
4040
apiSchema?: { url: string; format: "openapi"; version?: string };
4141
/** How to authenticate — the bet. Aggregated across REST, MCP, and PRM. */
4242
auth?: {
43-
rest?: ReadonlyArray<{ name: string; type: string; scheme?: string; in?: string; bearerFormat?: string; openIdConnectUrl?: string; flows?: unknown }>;
43+
rest?: ReadonlyArray<{ name: string; type: string; scheme?: string; in?: string; keyName?: string; bearerFormat?: string; openIdConnectUrl?: string; flows?: unknown }>;
4444
mcp?: ReadonlyArray<{ url: string; type?: string; authorizationServer?: string }>;
4545
oauthProtectedResource?: { authorizationServers: string[]; scopes?: string[] };
4646
};
@@ -145,6 +145,7 @@ function extractRestAuth(doc: any) {
145145
type: s?.type,
146146
scheme: s?.scheme,
147147
in: s?.in,
148+
keyName: s?.name, // for apiKey: the header/query param to send, e.g. "X-API-Key"
148149
bearerFormat: s?.bearerFormat,
149150
openIdConnectUrl: s?.openIdConnectUrl,
150151
flows: s?.flows,

0 commit comments

Comments
 (0)