13 references to ApiAuthenticationHandler
Aspire.Dashboard (8)
DashboardEndpointsBuilder.cs (1)
118.RequireAuthorization(ApiAuthenticationHandler.PolicyName)
DashboardWebApplication.cs (4)
729.AddScheme<ApiAuthenticationHandlerOptions, ApiAuthenticationHandler>(ApiAuthenticationHandler.AuthenticationScheme, o => { }) 879name: ApiAuthenticationHandler.PolicyName, 880policy: new AuthorizationPolicyBuilder(ApiAuthenticationHandler.AuthenticationScheme)
Mcp\McpApiKeyAuthenticationHandler.cs (3)
39if (Context.Request.Headers.TryGetValue(ApiAuthenticationHandler.ApiKeyHeaderName, out apiKey)) 41headerName = ApiAuthenticationHandler.ApiKeyHeaderName; 66return Task.FromResult(AuthenticateResult.Fail($"API key header is missing. Use '{ApiAuthenticationHandler.ApiKeyHeaderName}' or '{McpApiKeyHeaderName}'."));
Aspire.Dashboard.Tests (5)
Integration\TelemetryApiTests.cs (5)
148httpClient.DefaultRequestHeaders.TryAddWithoutValidation(ApiAuthenticationHandler.ApiKeyHeaderName, apiKey); 175httpClient.DefaultRequestHeaders.TryAddWithoutValidation(ApiAuthenticationHandler.ApiKeyHeaderName, "WrongKey!"); 388httpClient.DefaultRequestHeaders.TryAddWithoutValidation(ApiAuthenticationHandler.ApiKeyHeaderName, secondaryKey); 412httpClient.DefaultRequestHeaders.TryAddWithoutValidation(ApiAuthenticationHandler.ApiKeyHeaderName, apiKey); 581httpClient.DefaultRequestHeaders.TryAddWithoutValidation(ApiAuthenticationHandler.ApiKeyHeaderName, apiKey);