12 references to McpApiKeyAuthenticationHandler
Aspire.Dashboard (9)
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}"
DashboardEndpointsBuilder.cs (1)
100builder = endpoints.MapMcp("/mcp").RequireAuthorization(McpApiKeyAuthenticationHandler.PolicyName);
DashboardWebApplication.cs (4)
728.AddScheme<McpApiKeyAuthenticationHandlerOptions, McpApiKeyAuthenticationHandler>(McpApiKeyAuthenticationHandler.AuthenticationScheme, o => { }) 873name: McpApiKeyAuthenticationHandler.PolicyName, 875.RequireClaim(McpApiKeyAuthenticationHandler.McpClaimName, [bool.TrueString])
Mcp\McpCompositeAuthenticationHandler.cs (2)
34var id = new ClaimsIdentity([new Claim(McpApiKeyAuthenticationHandler.McpClaimName, bool.TrueString)]); 44yield return McpApiKeyAuthenticationHandler.AuthenticationScheme;
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);