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)
43else if (Context.Request.Headers.TryGetValue(McpApiKeyHeaderName, out apiKey)) 45headerName = McpApiKeyHeaderName; 66return 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)
109requestMessage.Headers.TryAddWithoutValidation(McpApiKeyAuthenticationHandler.McpApiKeyHeaderName, apiKey);