12 references to McpApiKeyAuthenticationHandler
Aspire.Dashboard (9)
Components\Dialogs\McpServerDialog.razor.cs (2)
86_mcpConfigProperties.Add(new McpConfigPropertyViewModel { Name = $"{McpApiKeyAuthenticationHandler.ApiKeyHeaderName} (header)", Value = DashboardOptions.Value.Mcp.PrimaryApiKey! }); 114[McpApiKeyAuthenticationHandler.ApiKeyHeaderName] = "${input:aspire_mcp_api_key}"
DashboardEndpointsBuilder.cs (1)
98builder = endpoints.MapMcp("/mcp").RequireAuthorization(McpApiKeyAuthenticationHandler.PolicyName);
DashboardWebApplication.cs (4)
704.AddScheme<McpApiKeyAuthenticationHandlerOptions, McpApiKeyAuthenticationHandler>(McpApiKeyAuthenticationHandler.AuthenticationScheme, o => { }) 848name: McpApiKeyAuthenticationHandler.PolicyName, 850.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.ApiKeyHeaderName] = "${input:x_mcp_api_key}" 103[McpApiKeyAuthenticationHandler.ApiKeyHeaderName] = "${input:x_mcp_api_key}"
Integration\McpServiceTests.cs (1)
109requestMessage.Headers.TryAddWithoutValidation(McpApiKeyAuthenticationHandler.ApiKeyHeaderName, apiKey);