Beispiel #1
0
        private void ReloadCertificates()
        {
            foreach (NSTableColumn column in CertificateTableView.TableColumns())
            {
                CertificateTableView.RemoveColumn(column);
            }
            CertificateTableView.Delegate = new CertTableDelegate();
            var listView = new TrustedCertificatesDataSource {
                Entries = TenantConfigurationDto.AuthenticationPolicy.ClientCertificatePolicy.TrustedCACertificates
            };
            var columnNames = new List <ColumnOptions> {
                new ColumnOptions {
                    Id = "SubjectDn", DisplayName = "Subject DN", DisplayOrder = 1, Width = 120
                },
                new ColumnOptions {
                    Id = "IssuedBy", DisplayName = "Issuer", DisplayOrder = 1, Width = 150
                },
                new ColumnOptions {
                    Id = "IssuedOn", DisplayName = "Valid From", DisplayOrder = 1, Width = 80
                },
                new ColumnOptions {
                    Id = "Expiration", DisplayName = "Valid To", DisplayOrder = 1, Width = 80
                },
                new ColumnOptions {
                    Id = "Fingerprint", DisplayName = "FingerPrint", DisplayOrder = 1, Width = 150
                }
            };
            var columns = ListViewHelper.ToNSTableColumns(columnNames);

            foreach (var column in columns)
            {
                CertificateTableView.AddColumn(column);
            }
            CertificateTableView.DataSource = listView;
            CertificateTableView.ReloadData();
            BtnAuthenticationRemoveCertificate.Enabled = TenantConfigurationDto.AuthenticationPolicy.ClientCertificatePolicy.TrustedCACertificates != null &&
                                                         TenantConfigurationDto.AuthenticationPolicy.ClientCertificatePolicy.TrustedCACertificates.Count > 0;
        }
        private void ReloadCertificates()
        {
            foreach (NSTableColumn column in CertificateTableView.TableColumns())
            {
                CertificateTableView.RemoveColumn(column);
            }
            CertificateTableView.Delegate = new CertTableDelegate();
            var listView = new TrustedCertificatesDataSource {
                Entries = ExternalIdentityProviderDto.SigningCertificates.Certificates
            };
            var columnNames = new List <ColumnOptions> {
                new ColumnOptions {
                    Id = "SubjectDn", DisplayName = "Subject DN", DisplayOrder = 1, Width = 120
                },
                new ColumnOptions {
                    Id = "IssuedBy", DisplayName = "Issuer", DisplayOrder = 1, Width = 150
                },
                new ColumnOptions {
                    Id = "IssuedOn", DisplayName = "Valid From", DisplayOrder = 1, Width = 80
                },
                new ColumnOptions {
                    Id = "Expiration", DisplayName = "Valid To", DisplayOrder = 1, Width = 80
                },
                new ColumnOptions {
                    Id = "Fingerprint", DisplayName = "FingerPrint", DisplayOrder = 1, Width = 150
                }
            };
            var columns = ListViewHelper.ToNSTableColumns(columnNames);

            foreach (var column in columns)
            {
                CertificateTableView.AddColumn(column);
            }
            CertificateTableView.DataSource = listView;
            CertificateTableView.ReloadData();
        }