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