// {{ display_name }} MCP server — generated by mcpify. Do not hand-edit.
//
// Credentials extracted from one incoming HTTP request (HTTP transport
// only) — never sourced from local config/env/keychain. Converts into the
// same `Credentials` map shape auth strategies already produce, so
// `AuthManager.applyAuthHeaders`'s header-building tail is reused
// unchanged for both transports; the header name/value are relayed
// verbatim to the facaded API, whatever they were on the way in (a
// prefixed `Authorization: Basic .../Bearer ...` value, or a bare
// `X-Api-Key`-style value).

import type { Credentials } from './auth-strategy.js';

export interface RequestCredentials {
  headerName: string;
  value: string;
}

export function toCredentialsMap(credentials: RequestCredentials): Credentials {
  return {
    requestHeaderName: credentials.headerName,
    requestHeaderValue: credentials.value,
  };
}
