10 references to McpApiKeyAuthenticationHandler
Aspire.Dashboard (9)
Components\Dialogs\McpServerDialog.razor.cs (2)
66_mcpConfigProperties.Add(new McpConfigPropertyViewModel { Name = $"{McpApiKeyAuthenticationHandler.ApiKeyHeaderName} (header)", Value = DashboardOptions.Value.Mcp.PrimaryApiKey! }); 89[McpApiKeyAuthenticationHandler.ApiKeyHeaderName] = DashboardOptions.Value.Mcp.PrimaryApiKey!
DashboardWebApplication.cs (5)
449_app.MapMcp("/mcp").RequireAuthorization(McpApiKeyAuthenticationHandler.PolicyName); 701.AddScheme<McpApiKeyAuthenticationHandlerOptions, McpApiKeyAuthenticationHandler>(McpApiKeyAuthenticationHandler.AuthenticationScheme, o => { }) 845name: McpApiKeyAuthenticationHandler.PolicyName, 847.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 (1)
Integration\McpServiceTests.cs (1)
106requestMessage.Headers.TryAddWithoutValidation(McpApiKeyAuthenticationHandler.ApiKeyHeaderName, apiKey);