8 references to McpApiKeyHeaderName
Aspire.Dashboard (5)
Components\Dialogs\McpServerDialog.razor.cs (2)
86
_mcpConfigProperties.Add(new McpConfigPropertyViewModel { Name = $"{McpApiKeyAuthenticationHandler.
McpApiKeyHeaderName
} (header)", Value = DashboardOptions.Value.Mcp.PrimaryApiKey! });
114
[McpApiKeyAuthenticationHandler.
McpApiKeyHeaderName
] = "${input:aspire_mcp_api_key}"
Mcp\McpApiKeyAuthenticationHandler.cs (3)
43
else if (Context.Request.Headers.TryGetValue(
McpApiKeyHeaderName
, out apiKey))
45
headerName =
McpApiKeyHeaderName
;
66
return Task.FromResult(AuthenticateResult.Fail($"API key header is missing. Use '{ApiAuthenticationHandler.ApiKeyHeaderName}' or '{
McpApiKeyHeaderName
}'."));
Aspire.Dashboard.Tests (3)
Integration\McpConfigurationTests.cs (2)
39
[McpApiKeyAuthenticationHandler.
McpApiKeyHeaderName
] = "${input:x_mcp_api_key}"
103
[McpApiKeyAuthenticationHandler.
McpApiKeyHeaderName
] = "${input:x_mcp_api_key}"
Integration\McpServiceTests.cs (1)
109
requestMessage.Headers.TryAddWithoutValidation(McpApiKeyAuthenticationHandler.
McpApiKeyHeaderName
, apiKey);