28 references to ConnectionType
Aspire.Dashboard (23)
Authentication\Connection\ConnectionTypeAuthenticationHandler.cs (1)
43public HashSet<ConnectionType> RequiredConnectionTypes { get; set; } = [];
Authentication\Connection\ConnectionTypeMiddleware.cs (3)
15private readonly List<ConnectionType> _connectionTypes; 18public ConnectionTypeMiddleware(ConnectionType[] connectionTypes, ConnectionDelegate next) 32public required List<ConnectionType> ConnectionTypes { get; init; }
Authentication\Connection\IConnectionTypeFeature.cs (1)
11List<ConnectionType> ConnectionTypes { get; }
Authentication\Connection\ListenOptionsConnectionTypeExtensions.cs (1)
10public static void UseConnectionTypes(this ListenOptions listenOptions, IEnumerable<ConnectionType> connectionTypes)
Configuration\EndpointInfo.cs (2)
9public record EndpointInfo(string Name, BindingAddress Address, HttpProtocols? HttpProtocols, bool RequireCertificate, ConnectionType ConnectionType) 11public static bool TryAddEndpoint(List<EndpointInfo> configuredEndpoints, BindingAddress? address, string name, HttpProtocols? httpProtocols, bool requireCertificate, ConnectionType connectionType)
DashboardWebApplication.cs (14)
568EndpointInfo.TryAddEndpoint(endpoints, fontendUrl, name, httpProtocols: null, requireCertificate: false, connectionType: ConnectionType.Frontend); 570EndpointInfo.TryAddEndpoint(endpoints, dashboardOptions.Otlp.GetGrpcEndpointAddress(), "OtlpGrpc", httpProtocols: HttpProtocols.Http2, requireCertificate: dashboardOptions.Otlp.AuthMode == OtlpAuthMode.ClientCertificate, connectionType: ConnectionType.OtlpGrpc); 571EndpointInfo.TryAddEndpoint(endpoints, dashboardOptions.Otlp.GetHttpEndpointAddress(), "OtlpHttp", httpProtocols: HttpProtocols.Http1AndHttp2, requireCertificate: dashboardOptions.Otlp.AuthMode == OtlpAuthMode.ClientCertificate, connectionType: ConnectionType.OtlpHttp); 572EndpointInfo.TryAddEndpoint(endpoints, dashboardOptions.Mcp.GetEndpointAddress(), "Mcp", httpProtocols: HttpProtocols.Http1AndHttp2, requireCertificate: dashboardOptions.Otlp.AuthMode == OtlpAuthMode.ClientCertificate, connectionType: ConnectionType.Mcp); 638if (!endpointConfiguration.IsHttps && connectionTypes.Contains(ConnectionType.Frontend) && endpointConfiguration.ListenOptions.Protocols == HttpProtocols.Http2) 645foreach (var connectionType in connectionTypes) 649case ConnectionType.Frontend: 654case ConnectionType.OtlpGrpc: 657case ConnectionType.OtlpHttp: 660case ConnectionType.Mcp: 704.AddScheme<ConnectionTypeAuthenticationHandlerOptions, ConnectionTypeAuthenticationHandler>(ConnectionTypeAuthenticationDefaults.AuthenticationSchemeFrontend, o => o.RequiredConnectionTypes = [ConnectionType.Frontend]) 705.AddScheme<ConnectionTypeAuthenticationHandlerOptions, ConnectionTypeAuthenticationHandler>(ConnectionTypeAuthenticationDefaults.AuthenticationSchemeOtlp, o => o.RequiredConnectionTypes = [ConnectionType.OtlpGrpc, ConnectionType.OtlpHttp]) 706.AddScheme<ConnectionTypeAuthenticationHandlerOptions, ConnectionTypeAuthenticationHandler>(ConnectionTypeAuthenticationDefaults.AuthenticationSchemeMcp, o => o.RequiredConnectionTypes = [ConnectionType.Mcp])
Model\BrowserSecurityHeadersMiddleware.cs (1)
67if (feature == null || feature.ConnectionTypes.Contains(ConnectionType.Frontend))
Aspire.Dashboard.Tests (5)
BrowserSecurityHeadersMiddlewareTests.cs (5)
66[InlineData(ConnectionType.OtlpGrpc)] 67[InlineData(ConnectionType.OtlpHttp)] 68[InlineData(ConnectionType.Mcp)] 69public async Task InvokeAsync_Otlp_NotAdded(ConnectionType connectionType) 85public required List<ConnectionType> ConnectionTypes { get; init; }