23 references to ResourceClientAuthMode
Aspire.Dashboard (8)
Configuration\DashboardOptions.cs (1)
28public ResourceClientAuthMode? AuthMode { get; set; }
Configuration\ValidateDashboardOptions.cs (5)
107case ResourceClientAuthMode.Unsecured: 109case ResourceClientAuthMode.ApiKey: 112errorMessages.Add($"{DashboardConfigNames.ResourceServiceClientAuthModeName.ConfigKey} is \"{nameof(ResourceClientAuthMode.ApiKey)}\", but no {DashboardConfigNames.ResourceServiceClientApiKeyName.ConfigKey} is configured."); 115case ResourceClientAuthMode.Certificate: 139errorMessages.Add($"Resource service client authentication is not configured. Specify {DashboardConfigNames.ResourceServiceClientAuthModeName.ConfigKey}. Possible values: {string.Join(", ", typeof(ResourceClientAuthMode).GetEnumNames())}");
ResourceService\DashboardClient.cs (2)
107if (_dashboardOptions.ResourceServiceClient.AuthMode is ResourceClientAuthMode.ApiKey) 127if (authMode == ResourceClientAuthMode.Certificate)
Aspire.Dashboard.Tests (15)
DashboardOptionsTests.cs (8)
112options.ResourceServiceClient.AuthMode = ResourceClientAuthMode.ApiKey; 118Assert.Equal($"{DashboardConfigNames.ResourceServiceClientAuthModeName.ConfigKey} is \"{nameof(ResourceClientAuthMode.ApiKey)}\", but no {DashboardConfigNames.ResourceServiceClientApiKeyName.ConfigKey} is configured.", result.FailureMessage); 126options.ResourceServiceClient.AuthMode = ResourceClientAuthMode.Certificate; 141options.ResourceServiceClient.AuthMode = ResourceClientAuthMode.Certificate; 156options.ResourceServiceClient.AuthMode = ResourceClientAuthMode.Certificate; 170options.ResourceServiceClient.AuthMode = ResourceClientAuthMode.Certificate; 189Assert.Equal($"Resource service client authentication is not configured. Specify {DashboardConfigNames.ResourceServiceClientAuthModeName.ConfigKey}. Possible values: {string.Join(", ", typeof(ResourceClientAuthMode).GetEnumNames())}", result.FailureMessage); 197options.ResourceServiceClient.AuthMode = (ResourceClientAuthMode)int.MaxValue;
Integration\DashboardClientAuthTests.cs (4)
45await using var client = await CreateDashboardClientAsync(loggerFactory, server.Url, authMode: ResourceClientAuthMode.Unsecured).DefaultTimeout(); 61await using var client = await CreateDashboardClientAsync(loggerFactory, server.Url, authMode: ResourceClientAuthMode.ApiKey, configureOptions: options => options.ResourceServiceClient.ApiKey = "TestApiKey!").DefaultTimeout(); 114ResourceClientAuthMode authMode = ResourceClientAuthMode.Unsecured,
Integration\StartupTests.cs (2)
469data[DashboardConfigNames.ResourceServiceClientAuthModeName.ConfigKey] = nameof(ResourceClientAuthMode.Certificate); 475Assert.Equal(ResourceClientAuthMode.Certificate, app.DashboardOptionsMonitor.CurrentValue.ResourceServiceClient.AuthMode);
Model\DashboardClientTests.cs (1)
32AuthMode = ResourceClientAuthMode.Unsecured,