21 references to ClientCertificate
Aspire.Dashboard (12)
Configuration\ValidateDashboardOptions.cs (4)
116switch (options.ResourceServiceClient.ClientCertificate.Source) 119if (string.IsNullOrEmpty(options.ResourceServiceClient.ClientCertificate.FilePath)) 125if (string.IsNullOrEmpty(options.ResourceServiceClient.ClientCertificate.Subject)) 134errorMessages.Add($"Unexpected resource service client certificate source: {options.ResourceServiceClient.ClientCertificate.Source}");
ResourceService\DashboardClient.cs (8)
130var certificates = _dashboardOptions.ResourceServiceClient.ClientCertificate.Source switch 177_dashboardOptions.ResourceServiceClient.ClientCertificate.FilePath != null, 180var filePath = _dashboardOptions.ResourceServiceClient.ClientCertificate.FilePath; 181var password = _dashboardOptions.ResourceServiceClient.ClientCertificate.Password; 189_dashboardOptions.ResourceServiceClient.ClientCertificate.Subject != null, 192var subject = _dashboardOptions.ResourceServiceClient.ClientCertificate.Subject; 193var storeName = _dashboardOptions.ResourceServiceClient.ClientCertificate.Store ?? "My"; 194var location = _dashboardOptions.ResourceServiceClient.ClientCertificate.Location ?? StoreLocation.CurrentUser;
Aspire.Dashboard.Tests (9)
DashboardOptionsTests.cs (7)
127options.ResourceServiceClient.ClientCertificate.Source = DashboardClientCertificateSource.File; 128options.ResourceServiceClient.ClientCertificate.FilePath = ""; 142options.ResourceServiceClient.ClientCertificate.Source = DashboardClientCertificateSource.KeyStore; 143options.ResourceServiceClient.ClientCertificate.Subject = ""; 157options.ResourceServiceClient.ClientCertificate.Source = null; 171options.ResourceServiceClient.ClientCertificate.Source = (DashboardClientCertificateSource)int.MaxValue; 176Assert.Equal($"Unexpected resource service client certificate source: {options.ResourceServiceClient.ClientCertificate.Source}", result.FailureMessage);
Integration\StartupTests.cs (2)
476Assert.Equal(DashboardClientCertificateSource.KeyStore, app.DashboardOptionsMonitor.CurrentValue.ResourceServiceClient.ClientCertificate.Source); 477Assert.Equal("MySubject", app.DashboardOptionsMonitor.CurrentValue.ResourceServiceClient.ClientCertificate.Subject);