コード例 #1
0
        public AuthenticationViewModel(AuthenticationOptions model, ILogger <AuthenticationViewModel> logger, INotifyModelChangedEventPublisher eventPublisher, IDialogCoordinator dialogCoordinator, IX509Certificate2ViewModelFactory x509ViewModelFactory, IDirectory directory, IShellExecuteProvider shellExecuteProvider, IObjectSelectionProvider objectSelectionProvider, IProtectedSecretProvider secretProvider)
        {
            this.shellExecuteProvider = shellExecuteProvider;
            this.model                   = model;
            this.dialogCoordinator       = dialogCoordinator;
            this.x509ViewModelFactory    = x509ViewModelFactory;
            this.logger                  = logger;
            this.directory               = directory;
            this.eventPublisher          = eventPublisher;
            this.objectSelectionProvider = objectSelectionProvider;
            this.secretProvider          = secretProvider;

            this.DisplayName = "Authentication";

            model.Iwa ??= new IwaAuthenticationProviderOptions();
            model.Oidc ??= new OidcAuthenticationProviderOptions();
            model.WsFed ??= new WsFedAuthenticationProviderOptions();
            model.ClientCert ??= new CertificateAuthenticationProviderOptions();
            model.ClientCert.TrustedIssuers ??= new List <string>();
            model.ClientCert.RequiredEkus ??= new List <string>();
            model.AllowedPrincipals ??= new List <string>();

            this.TrustedIssuers    = new BindableCollection <X509Certificate2ViewModel>();
            this.RequiredEkus      = new BindableCollection <string>(model.ClientCert.RequiredEkus);
            this.AllowedPrincipals = new BindableCollection <SecurityIdentifierViewModel>();
        }
コード例 #2
0
 public LapsConfigurationViewModel(IDialogCoordinator dialogCoordinator, ICertificateProvider certificateProvider, IDirectory directory, IX509Certificate2ViewModelFactory certificate2ViewModelFactory, IServiceSettingsProvider serviceSettings, ILogger <LapsConfigurationViewModel> logger)
 {
     this.directory                    = directory;
     this.certificateProvider          = certificateProvider;
     this.certificate2ViewModelFactory = certificate2ViewModelFactory;
     this.dialogCoordinator            = dialogCoordinator;
     this.serviceSettings              = serviceSettings;
     this.logger  = logger;
     this.Forests = new List <Forest>();
     this.AvailableCertificates = new BindableCollection <X509Certificate2ViewModel>();
     this.DisplayName           = "Local admin passwords";
 }
コード例 #3
0
        public LapsConfigurationViewModel(IDialogCoordinator dialogCoordinator, ICertificateProvider certificateProvider, IX509Certificate2ViewModelFactory certificate2ViewModelFactory, IWindowsServiceProvider windowsServiceProvider, ILogger <LapsConfigurationViewModel> logger, IShellExecuteProvider shellExecuteProvider, IDomainTrustProvider domainTrustProvider, IDiscoveryServices discoveryServices, IScriptTemplateProvider scriptTemplateProvider, ICertificatePermissionProvider certPermissionProvider, DataProtectionOptions dataProtectionOptions, INotifyModelChangedEventPublisher eventPublisher)
        {
            this.shellExecuteProvider         = shellExecuteProvider;
            this.certificateProvider          = certificateProvider;
            this.certificate2ViewModelFactory = certificate2ViewModelFactory;
            this.dialogCoordinator            = dialogCoordinator;
            this.windowsServiceProvider       = windowsServiceProvider;
            this.logger = logger;
            this.domainTrustProvider    = domainTrustProvider;
            this.discoveryServices      = discoveryServices;
            this.scriptTemplateProvider = scriptTemplateProvider;
            this.dataProtectionOptions  = dataProtectionOptions;
            this.eventPublisher         = eventPublisher;

            this.Forests = new List <Forest>();
            this.AvailableCertificates  = new BindableCollection <X509Certificate2ViewModel>();
            this.DisplayName            = "Local admin passwords";
            this.certPermissionProvider = certPermissionProvider;
        }
コード例 #4
0
        public AuthenticationViewModel(AuthenticationOptions model, ILogger <AuthenticationViewModel> logger, INotifiableEventPublisher eventPublisher, IDialogCoordinator dialogCoordinator, IX509Certificate2ViewModelFactory x509ViewModelFactory, RandomNumberGenerator rng, IDirectory directory)
        {
            this.model                = model;
            this.dialogCoordinator    = dialogCoordinator;
            this.x509ViewModelFactory = x509ViewModelFactory;
            this.logger               = logger;
            this.rng            = rng;
            this.directory      = directory;
            this.eventPublisher = eventPublisher;

            this.DisplayName = "Authentication";

            model.Iwa ??= new IwaAuthenticationProviderOptions();
            model.Oidc ??= new OidcAuthenticationProviderOptions();
            model.WsFed ??= new WsFedAuthenticationProviderOptions();
            model.ClientCert ??= new CertificateAuthenticationProviderOptions();
            model.ClientCert.TrustedIssuers ??= new List <string>();
            model.ClientCert.RequiredEkus ??= new List <string>();
            model.AllowedPrincipals ??= new List <string>();

            this.TrustedIssuers    = new BindableCollection <X509Certificate2ViewModel>();
            this.RequiredEkus      = new BindableCollection <string>(model.ClientCert.RequiredEkus);
            this.AllowedPrincipals = new BindableCollection <SecurityIdentifierViewModel>();
        }