/// <summary> /// Add view description for the node /// </summary> void AddViewDescription() { var fvd = new FormViewDescription { DisplayName = Constants.PscTableColumnNameId, ViewType = typeof(ManagementFormView), ControlType = typeof(ManagementViewControl) }; ViewDescriptions.Add(fvd); ViewDescriptions.DefaultIndex = 0; }
void AddViewDescription() { FormViewDescription fvd = new FormViewDescription(); fvd.DisplayName = "Users (FormView)"; fvd.ViewType = typeof(ResultPaneFormView); fvd.ControlType = typeof(ResultPaneControl); // Attach the view to the root node this.ViewDescriptions.Add(fvd); this.ViewDescriptions.DefaultIndex = 0; }
void AddViewDescription() { var fvd = new FormViewDescription { DisplayName = "Relying Party", ViewType = typeof(RelyingPartyFormView), ControlType = typeof(RelyingPartyControl) }; ViewDescriptions.Add(fvd); ViewDescriptions.DefaultIndex = 0; }
void AddViewDescription() { var fvd = new FormViewDescription { DisplayName = "Users", ViewType = typeof(UsersFormView), ControlType = typeof(UsersControl) }; ViewDescriptions.Add(fvd); ViewDescriptions.DefaultIndex = 0; }
public void AddViewDescription() { var fvd = new FormViewDescription { DisplayName = Constants.PscTableColumnNameId, ViewType = typeof(GlobalFormView), ControlType = typeof(GlobalView) }; ViewDescriptions.Add(fvd); ViewDescriptions.DefaultIndex = 0; }
/// <summary> /// Add view description for the node /// </summary> void AddViewDescription() { var fvd = new FormViewDescription { DisplayName = Constants.PscTableColumnNameId, ViewType = typeof(InfrastructureFormView), ControlType = typeof(InfrastructureView) }; ViewDescriptions.Add(fvd); ViewDescriptions.DefaultIndex = 0; }
void AddViewDescription() { var fvd = new FormViewDescription { DisplayName = "OIDC Clients", ViewType = typeof(OidcClientsFormView), ControlType = typeof(OidcClientsControl) }; ViewDescriptions.Add(fvd); ViewDescriptions.DefaultIndex = 0; }
void AddViewDescription() { var fvd = new FormViewDescription { DisplayName = "External Identity Providers", ViewType = typeof(ExternalIdentityProviderFormView), ControlType = typeof(ExternalIdentityProvidersControl) }; ViewDescriptions.Add(fvd); ViewDescriptions.DefaultIndex = 0; }
void AddViewDescription() { var fvd = new FormViewDescription { DisplayName = "Groups", ViewType = typeof(GroupsFormView), ControlType = typeof(GroupsControl) }; // Attach the view to the root node. ViewDescriptions.Add(fvd); ViewDescriptions.DefaultIndex = 0; }
/// <summary> /// Constructor /// </summary> public SelectionFormViewSnapIn() { // Create the root node this.RootNode = new ScopeNode(); this.RootNode.DisplayName = "Selection (FormView) Sample"; // Create a form view for the root node. FormViewDescription fvd = new FormViewDescription(); fvd.DisplayName = "Users (FormView)"; fvd.ViewType = typeof(SelectionFormView); fvd.ControlType = typeof(SelectionControl); // Attach the view to the root node this.RootNode.ViewDescriptions.Add(fvd); this.RootNode.ViewDescriptions.DefaultIndex = 0; }
/// <summary> /// Initializes a new instance of the <see cref="ServerScopeNode"/> class. /// </summary> public ServerScopeNode(IConfigurator configurator) { this.EnabledStandardVerbs = StandardVerbs.Refresh; this.Configurator = configurator; // Initialize View ViewDescriptions // Create a form view for the root node. FormViewDescription fvd = new FormViewDescription(); fvd.DisplayName = "(localhost) Home"; fvd.ViewType = typeof(ServerFormView); fvd.ControlType = typeof(ServerFeaturesControl); // Attach the view to the root node. this.ViewDescriptions.Add(fvd); this.ViewDescriptions.DefaultIndex = 0; }
public AdminNode() { this.ImageIndex = 0; this.SelectedImageIndex = 0; this.EnabledStandardVerbs = StandardVerbs.Refresh; this.DisplayName = "Admin Properties"; // Create a form view for the AdminNode. FormViewDescription fvd = new FormViewDescription(); fvd.DisplayName = "Users (FormView)"; fvd.ViewType = typeof(AdminProperties); fvd.ControlType = typeof(SelectionControl); // Attach the view to the root node. this.ViewDescriptions.Add(fvd); this.ViewDescriptions.DefaultIndex = 0; }
/// <summary> /// Initializes a new instance of the <see cref="UpgradeScopeNode"/> class. /// </summary> public UpgradeScopeNode(IConfigurator configurator, int version) : base(true) { this.DataElementType = DataElementType.Upgrade; this.Configurator = configurator; this.Version = version; this.DisplayName = version.ToString(); this.Tag = version; this.ImageIndex = 7; this.SelectedImageIndex = 7; // Initialize View ViewDescriptions // Create a form view for the root node. FormViewDescription fvd = new FormViewDescription(); fvd.DisplayName = string.Format(SnapInResources.UpdateFormView_FrindlyName_Format, version); fvd.ViewType = typeof(UpdateFormView); fvd.ControlType = typeof(UpdateInfoControl); // Attach the view to the root node. this.ViewDescriptions.Add(fvd); this.ViewDescriptions.DefaultIndex = 0; }
/// <summary> /// Constructor. /// </summary> public ADFSSnapIn() { // Root Node this.RootNode = new RootScopeNode(); FormViewDescription fvr = new FormViewDescription(); fvr.DisplayName = "MFA Platform"; fvr.ControlType = typeof(RootViewControl); fvr.ViewType = typeof(RootFormView); this.RootNode.ViewDescriptions.Add(fvr); this.RootNode.ViewDescriptions.DefaultIndex = 0; // Service Node this.ServiceNode = new ServiceScopeNode(); FormViewDescription fvc = new FormViewDescription(); fvc.DisplayName = "MFA Platform Service"; fvc.ControlType = typeof(ServiceViewControl); fvc.ViewType = typeof(ServiceFormView); this.ServiceNode.ViewDescriptions.Add(fvc); this.ServiceNode.ViewDescriptions.DefaultIndex = 0; // General Scope this.ServiceGeneralNode = new ServiceGeneralScopeNode(); FormViewDescription fvs = new FormViewDescription(); fvs.DisplayName = "MFA Platform General Properties"; fvs.ControlType = typeof(GeneralViewControl); fvs.ViewType = typeof(GeneralFormView); this.ServiceGeneralNode.ViewDescriptions.Add(fvs); this.ServiceGeneralNode.ViewDescriptions.DefaultIndex = 0; // ADDS Scope this.ServiceADDSNode = new ServiceADDSScopeNode(); FormViewDescription fadds = new FormViewDescription(); fadds.DisplayName = "MFA Platform Active Directory Properties"; fadds.ControlType = typeof(ADDSViewControl); fadds.ViewType = typeof(ServiceADDSFormView); this.ServiceADDSNode.ViewDescriptions.Add(fadds); this.ServiceADDSNode.ViewDescriptions.DefaultIndex = 0; // SQL Scope this.ServiceSQLNode = new ServiceSQLScopeNode(); FormViewDescription fsql = new FormViewDescription(); fsql.DisplayName = "MFA Platform SQL Server Properties"; fsql.ControlType = typeof(SQLViewControl); fsql.ViewType = typeof(ServiceSQLFormView); this.ServiceSQLNode.ViewDescriptions.Add(fsql); this.ServiceSQLNode.ViewDescriptions.DefaultIndex = 0; // SMTP Scope this.ServiceSMTPNode = new ServiceSMTPScopeNode(); FormViewDescription fsmtp = new FormViewDescription(); fsmtp.DisplayName = "MFA Platform SMTP Properties"; fsmtp.ControlType = typeof(SMTPViewControl); fsmtp.ViewType = typeof(ServiceSMTPFormView); this.ServiceSMTPNode.ViewDescriptions.Add(fsmtp); this.ServiceSMTPNode.ViewDescriptions.DefaultIndex = 0; // SMS Scope this.ServiceSMSNode = new ServicePhoneScopeNode(); FormViewDescription fsms = new FormViewDescription(); fsms.DisplayName = "MFA Platform SMS Properties"; fsms.ControlType = typeof(SMSViewControl); fsms.ViewType = typeof(ServiceSMSFormView); this.ServiceSMSNode.ViewDescriptions.Add(fsms); this.ServiceSMSNode.ViewDescriptions.DefaultIndex = 0; // Parameters Scope this.ServiceSecurityNode = new ServiceSecurityScopeNode(); FormViewDescription fvp = new FormViewDescription(); fvp.DisplayName = "MFA Platform Security Properties"; fvp.ControlType = typeof(ServiceSecurityViewControl); fvp.ViewType = typeof(ServiceSecurityFormView); this.ServiceSecurityNode.ViewDescriptions.Add(fvp); this.ServiceSecurityNode.ViewDescriptions.DefaultIndex = 0; // Users Scope this.UsersNode = new UsersScopeNode(); FormViewDescription fvu = new FormViewDescription(); fvu.DisplayName = "MFA Platform Users"; fvu.ControlType = typeof(UsersListView); fvu.ViewType = typeof(UsersFormView); this.UsersNode.ViewDescriptions.Add(fvu); this.UsersNode.ViewDescriptions.DefaultIndex = 0; this.RootNode.Children.Add(this.ServiceNode); this.RootNode.Children.Add(this.ServiceGeneralNode); this.RootNode.Children.Add(this.ServiceADDSNode); this.RootNode.Children.Add(this.ServiceSQLNode); this.RootNode.Children.Add(this.ServiceSMTPNode); this.RootNode.Children.Add(this.ServiceSMSNode); this.RootNode.Children.Add(this.ServiceSecurityNode); this.RootNode.Children.Add(this.UsersNode); this.IsModified = true; this.SmallImages.Add(Neos_IdentityServer_Console_Snapin.folder16, Color.Black); this.LargeImages.Add(Neos_IdentityServer_Console_Snapin.folder32, Color.Black); }
/// <summary> /// BuildNodes method /// </summary> private void BuildNodes(bool doall = true) { if (doall) { this.RootNode = new RootScopeNode(); FormViewDescription fvr = new FormViewDescription(); fvr.DisplayName = "MFA Platform"; fvr.ControlType = typeof(RootViewControl); fvr.ViewType = typeof(RootFormView); this.RootNode.ViewDescriptions.Add(fvr); this.RootNode.ViewDescriptions.DefaultIndex = 0; if (IsPrimary) { // Service Node this.ServiceNode = new ServiceScopeNode(); FormViewDescription fvc = new FormViewDescription(); fvc.DisplayName = "MFA Platform Service"; fvc.ControlType = typeof(ServiceViewControl); fvc.ViewType = typeof(ServiceFormView); this.ServiceNode.ViewDescriptions.Add(fvc); this.ServiceNode.ViewDescriptions.DefaultIndex = 0; // General Scope this.ServiceGeneralNode = new ServiceGeneralScopeNode(); FormViewDescription fvs = new FormViewDescription(); fvs.DisplayName = "MFA Platform General Properties"; fvs.ControlType = typeof(GeneralViewControl); fvs.ViewType = typeof(GeneralFormView); this.ServiceGeneralNode.ViewDescriptions.Add(fvs); this.ServiceGeneralNode.ViewDescriptions.DefaultIndex = 0; // Storage this.ServiceStorageNode = new ServiceStorageScopeNode(); FormViewDescription fstore = new FormViewDescription(); fstore.DisplayName = "MFA Platform Storage Properties"; fstore.ControlType = typeof(StorageViewControl); fstore.ViewType = typeof(ServiceStoreFormView); this.ServiceStorageNode.ViewDescriptions.Add(fstore); this.ServiceStorageNode.ViewDescriptions.DefaultIndex = 0; // ADDS Scope this.ServiceADDSNode = new ServiceADDSScopeNode(); FormViewDescription fadds = new FormViewDescription(); fadds.DisplayName = "MFA Platform Active Directory Properties"; fadds.ControlType = typeof(ADDSViewControl); fadds.ViewType = typeof(ServiceADDSFormView); this.ServiceADDSNode.ViewDescriptions.Add(fadds); this.ServiceADDSNode.ViewDescriptions.DefaultIndex = 0; // SQL Scope this.ServiceSQLNode = new ServiceSQLScopeNode(); FormViewDescription fsql = new FormViewDescription(); fsql.DisplayName = "MFA Platform SQL Server Properties"; fsql.ControlType = typeof(SQLViewControl); fsql.ViewType = typeof(ServiceSQLFormView); this.ServiceSQLNode.ViewDescriptions.Add(fsql); this.ServiceSQLNode.ViewDescriptions.DefaultIndex = 0; // Custom Storage Scope this.ServiceCustomStorageNode = new ServiceCustomStorageScopeNode(); FormViewDescription cust = new FormViewDescription(); cust.DisplayName = "MFA Custom Storage Properties"; cust.ControlType = typeof(CustomStoreViewControl); cust.ViewType = typeof(ServiceCustomStoreFormView); this.ServiceCustomStorageNode.ViewDescriptions.Add(cust); this.ServiceCustomStorageNode.ViewDescriptions.DefaultIndex = 0; // Security Scope this.ServiceSecurityNode = new ServiceSecurityRootScopeNode(); FormViewDescription fsec = new FormViewDescription(); fsec.DisplayName = "Security Features"; fsec.ControlType = typeof(ServiceSecurityRootViewControl); fsec.ViewType = typeof(ServiceSecurityRootFormView); this.ServiceSecurityNode.ViewDescriptions.Add(fsec); this.ServiceSecurityNode.ViewDescriptions.DefaultIndex = 0; // RNG this.ServiceRNGNode = new ServiceSecurityRNGScopeNode(); FormViewDescription frng = new FormViewDescription(); frng.DisplayName = "Encoded Keys RGN "; frng.ControlType = typeof(ServiceSecurityRNGViewControl); frng.ViewType = typeof(ServiceSecurityRNGFormView); this.ServiceRNGNode.ViewDescriptions.Add(frng); this.ServiceRNGNode.ViewDescriptions.DefaultIndex = 0; // AES this.ServiceAESNode = new ServiceSecurityAESScopeNode(); FormViewDescription faes = new FormViewDescription(); faes.DisplayName = "Symmetric Keys AES"; faes.ControlType = typeof(ServiceSecurityAESViewControl); faes.ViewType = typeof(ServiceSecurityAESFormView); this.ServiceAESNode.ViewDescriptions.Add(faes); this.ServiceAESNode.ViewDescriptions.DefaultIndex = 0; // RSA this.ServiceRSANode = new ServiceSecurityRSAScopeNode(); FormViewDescription frsa = new FormViewDescription(); frsa.DisplayName = "Asymmetric Keys RSA "; frsa.ControlType = typeof(ServiceSecurityRSAViewControl); frsa.ViewType = typeof(ServiceSecurityRSAFormView); this.ServiceRSANode.ViewDescriptions.Add(frsa); this.ServiceRSANode.ViewDescriptions.DefaultIndex = 0; // Custom this.ServiceCustomSecurityNode = new ServiceCustomSecurityScopeNode(); FormViewDescription fcust = new FormViewDescription(); fcust.DisplayName = "Custom Keys"; fcust.ControlType = typeof(SecurityCustomViewControl); fcust.ViewType = typeof(ServiceSecurityCustomFormView); this.ServiceCustomSecurityNode.ViewDescriptions.Add(fcust); this.ServiceCustomSecurityNode.ViewDescriptions.DefaultIndex = 0; // WebAuthN this.ServiceWebAuthNNode = new ServiceSecurityWebAuthNScopeNode(); FormViewDescription frweb = new FormViewDescription(); frweb.DisplayName = "WebAuthN Credentials"; frweb.ControlType = typeof(ServiceSecurityWebAuthNViewControl); frweb.ViewType = typeof(ServiceSecurityWebAuthNFormView); this.ServiceWebAuthNNode.ViewDescriptions.Add(frweb); this.ServiceWebAuthNNode.ViewDescriptions.DefaultIndex = 0; // Providers Scope this.ServiceProvidersNode = new ServiceProvidersScopeNode(); FormViewDescription fprov = new FormViewDescription(); fprov.DisplayName = "MFA Providers"; fprov.ControlType = typeof(ProvidersViewControl); fprov.ViewType = typeof(ServiceProvidersFormView); this.ServiceProvidersNode.ViewDescriptions.Add(fprov); this.ServiceProvidersNode.ViewDescriptions.DefaultIndex = 0; ManagementService.EnsureService(); RuntimeAuthProvider.LoadProviders(ManagementService.Config); IExternalProvider prv0 = RuntimeAuthProvider.GetProviderInstance(PreferredMethod.Code); if (prv0 != null) { // TOTP Scope this.ServiceTOTPNode = new ServiceTOTPScopeNode(); FormViewDescription ftotp = new FormViewDescription(); ftotp.DisplayName = "MFA Platform TOTP Properties"; ftotp.ControlType = typeof(ServiceTOTPViewControl); ftotp.ViewType = typeof(ServiceTOTPFormView); this.ServiceTOTPNode.ViewDescriptions.Add(ftotp); this.ServiceTOTPNode.ViewDescriptions.DefaultIndex = 0; } IExternalProvider prv4 = RuntimeAuthProvider.GetProviderInstance(PreferredMethod.Biometrics); if (prv4 != null) { // Biometrics Scope this.ServiceBiometricsNode = new ServiceBiometricsScopeNode(); FormViewDescription fbio = new FormViewDescription(); fbio.DisplayName = "MFA Platform Biometrics Properties"; fbio.ControlType = typeof(ServiceBiometricsViewControl); fbio.ViewType = typeof(ServiceBiometricsFormView); this.ServiceBiometricsNode.ViewDescriptions.Add(fbio); this.ServiceBiometricsNode.ViewDescriptions.DefaultIndex = 0; } IExternalProvider prv1 = RuntimeAuthProvider.GetProviderInstance(PreferredMethod.Email); if (prv1 != null) { // SMTP Scope this.ServiceSMTPNode = new ServiceSMTPScopeNode(); FormViewDescription fsmtp = new FormViewDescription(); fsmtp.DisplayName = "MFA Platform SMTP Properties"; fsmtp.ControlType = typeof(SMTPViewControl); fsmtp.ViewType = typeof(ServiceSMTPFormView); this.ServiceSMTPNode.ViewDescriptions.Add(fsmtp); this.ServiceSMTPNode.ViewDescriptions.DefaultIndex = 0; } IExternalProvider prv2 = RuntimeAuthProvider.GetProviderInstance(PreferredMethod.External); if (prv2 != null) { // SMS Scope this.ServiceSMSNode = new ServicePhoneScopeNode(); FormViewDescription fsms = new FormViewDescription(); fsms.DisplayName = "MFA Platform SMS Properties"; fsms.ControlType = typeof(SMSViewControl); fsms.ViewType = typeof(ServiceSMSFormView); this.ServiceSMSNode.ViewDescriptions.Add(fsms); this.ServiceSMSNode.ViewDescriptions.DefaultIndex = 0; } IExternalProvider prv3 = RuntimeAuthProvider.GetProviderInstance(PreferredMethod.Azure); if (prv3 != null) { // Azure Scope this.ServiceAzureNode = new ServiceAzureScopeNode(); FormViewDescription faz = new FormViewDescription(); faz.DisplayName = "MFA Platform SMS Properties"; faz.ControlType = typeof(AzureViewControl); faz.ViewType = typeof(ServiceAzureFormView); this.ServiceAzureNode.ViewDescriptions.Add(faz); this.ServiceAzureNode.ViewDescriptions.DefaultIndex = 0; } } // Users Scope this.UsersNode = new UsersScopeNode(); FormViewDescription fvu = new FormViewDescription(); fvu.DisplayName = "MFA Platform Users"; fvu.ControlType = typeof(UsersListView); fvu.ViewType = typeof(UsersFormView); this.UsersNode.ViewDescriptions.Add(fvu); this.UsersNode.ViewDescriptions.DefaultIndex = 0; if (IsPrimary) { this.RootNode.Children.Add(this.ServiceNode); this.RootNode.Children.Add(this.ServiceGeneralNode); this.RootNode.Children.Add(this.ServiceSecurityNode); this.ServiceSecurityNode.Children.Add(this.ServiceRNGNode); this.ServiceSecurityNode.Children.Add(this.ServiceAESNode); this.ServiceSecurityNode.Children.Add(this.ServiceRSANode); this.ServiceSecurityNode.Children.Add(this.ServiceWebAuthNNode); this.ServiceSecurityNode.Children.Add(this.ServiceCustomSecurityNode); this.RootNode.Children.Add(this.ServiceStorageNode); this.ServiceStorageNode.Children.Add(this.ServiceADDSNode); this.ServiceStorageNode.Children.Add(this.ServiceSQLNode); this.ServiceStorageNode.Children.Add(this.ServiceCustomStorageNode); this.RootNode.Children.Add(this.ServiceProvidersNode); if (this.ServiceTOTPNode != null) { this.ServiceProvidersNode.Children.Add(this.ServiceTOTPNode); } if (this.ServiceBiometricsNode != null) { this.ServiceProvidersNode.Children.Add(this.ServiceBiometricsNode); } if (this.ServiceSMTPNode != null) { this.ServiceProvidersNode.Children.Add(this.ServiceSMTPNode); } if (this.ServiceSMSNode != null) { this.ServiceProvidersNode.Children.Add(this.ServiceSMSNode); } if (this.ServiceAzureNode != null) { this.ServiceProvidersNode.Children.Add(this.ServiceAzureNode); } } this.RootNode.Children.Add(this.UsersNode); this.IsModified = true; this.SmallImages.Add(Neos.IdentityServer.Console.Resources.Neos_IdentityServer_Console_Snapin.folder16, Color.Black); this.LargeImages.Add(Neos.IdentityServer.Console.Resources.Neos_IdentityServer_Console_Snapin.folder32, Color.Black); } else { RefreshUI(); } }
/// <summary> /// BuildNodes method /// </summary> private void BuildNodes(bool doall = true) { if (doall) { this.RootNode = new RootScopeNode(); FormViewDescription fvr = new FormViewDescription(); fvr.DisplayName = "MFA Platform"; fvr.ControlType = typeof(RootViewControl); fvr.ViewType = typeof(RootFormView); this.RootNode.ViewDescriptions.Add(fvr); this.RootNode.ViewDescriptions.DefaultIndex = 0; // Service Node this.ServiceNode = new ServiceScopeNode(); FormViewDescription fvc = new FormViewDescription(); fvc.DisplayName = "MFA Platform Service"; fvc.ControlType = typeof(ServiceViewControl); fvc.ViewType = typeof(ServiceFormView); this.ServiceNode.ViewDescriptions.Add(fvc); this.ServiceNode.ViewDescriptions.DefaultIndex = 0; // General Scope this.ServiceGeneralNode = new ServiceGeneralScopeNode(); FormViewDescription fvs = new FormViewDescription(); fvs.DisplayName = "MFA Platform General Properties"; fvs.ControlType = typeof(GeneralViewControl); fvs.ViewType = typeof(GeneralFormView); this.ServiceGeneralNode.ViewDescriptions.Add(fvs); this.ServiceGeneralNode.ViewDescriptions.DefaultIndex = 0; // ADDS Scope this.ServiceADDSNode = new ServiceADDSScopeNode(); FormViewDescription fadds = new FormViewDescription(); fadds.DisplayName = "MFA Platform Active Directory Properties"; fadds.ControlType = typeof(ADDSViewControl); fadds.ViewType = typeof(ServiceADDSFormView); this.ServiceADDSNode.ViewDescriptions.Add(fadds); this.ServiceADDSNode.ViewDescriptions.DefaultIndex = 0; // SQL Scope this.ServiceSQLNode = new ServiceSQLScopeNode(); FormViewDescription fsql = new FormViewDescription(); fsql.DisplayName = "MFA Platform SQL Server Properties"; fsql.ControlType = typeof(SQLViewControl); fsql.ViewType = typeof(ServiceSQLFormView); this.ServiceSQLNode.ViewDescriptions.Add(fsql); this.ServiceSQLNode.ViewDescriptions.DefaultIndex = 0; // Providers Scope this.ServiceProvidersNode = new ServiceProvidersScopeNode(); FormViewDescription fprov = new FormViewDescription(); fprov.DisplayName = "MFA Providers"; fprov.ControlType = typeof(ProvidersViewControl); fprov.ViewType = typeof(ServiceProvidersFormView); this.ServiceProvidersNode.ViewDescriptions.Add(fprov); this.ServiceProvidersNode.ViewDescriptions.DefaultIndex = 0; // TOTP Scope this.ServiceTOTPNode = new ServiceSecurityScopeNode(); FormViewDescription ftotp = new FormViewDescription(); ftotp.DisplayName = "MFA Platform TOTP Properties"; ftotp.ControlType = typeof(ServiceSecurityViewControl); ftotp.ViewType = typeof(ServiceSecurityFormView); this.ServiceTOTPNode.ViewDescriptions.Add(ftotp); this.ServiceTOTPNode.ViewDescriptions.DefaultIndex = 0; // SMTP Scope this.ServiceSMTPNode = new ServiceSMTPScopeNode(); FormViewDescription fsmtp = new FormViewDescription(); fsmtp.DisplayName = "MFA Platform SMTP Properties"; fsmtp.ControlType = typeof(SMTPViewControl); fsmtp.ViewType = typeof(ServiceSMTPFormView); this.ServiceSMTPNode.ViewDescriptions.Add(fsmtp); this.ServiceSMTPNode.ViewDescriptions.DefaultIndex = 0; // SMS Scope this.ServiceSMSNode = new ServicePhoneScopeNode(); FormViewDescription fsms = new FormViewDescription(); fsms.DisplayName = "MFA Platform SMS Properties"; fsms.ControlType = typeof(SMSViewControl); fsms.ViewType = typeof(ServiceSMSFormView); this.ServiceSMSNode.ViewDescriptions.Add(fsms); this.ServiceSMSNode.ViewDescriptions.DefaultIndex = 0; // Azure Scope this.ServiceAzureNode = new ServiceAzureScopeNode(); FormViewDescription faz = new FormViewDescription(); faz.DisplayName = "MFA Platform SMS Properties"; faz.ControlType = typeof(AzureViewControl); faz.ViewType = typeof(ServiceAzureFormView); this.ServiceAzureNode.ViewDescriptions.Add(faz); this.ServiceAzureNode.ViewDescriptions.DefaultIndex = 0; // Users Scope this.UsersNode = new UsersScopeNode(); FormViewDescription fvu = new FormViewDescription(); fvu.DisplayName = "MFA Platform Users"; fvu.ControlType = typeof(UsersListView); fvu.ViewType = typeof(UsersFormView); this.UsersNode.ViewDescriptions.Add(fvu); this.UsersNode.ViewDescriptions.DefaultIndex = 0; this.RootNode.Children.Add(this.ServiceNode); this.RootNode.Children.Add(this.ServiceGeneralNode); this.RootNode.Children.Add(this.ServiceADDSNode); this.RootNode.Children.Add(this.ServiceSQLNode); this.RootNode.Children.Add(this.ServiceProvidersNode); this.ServiceProvidersNode.Children.Add(this.ServiceTOTPNode); this.ServiceProvidersNode.Children.Add(this.ServiceSMTPNode); this.ServiceProvidersNode.Children.Add(this.ServiceSMSNode); this.ServiceProvidersNode.Children.Add(this.ServiceAzureNode); this.RootNode.Children.Add(this.UsersNode); this.IsModified = true; this.SmallImages.Add(Neos.IdentityServer.Console.Resources.Neos_IdentityServer_Console_Snapin.folder16, Color.Black); this.LargeImages.Add(Neos.IdentityServer.Console.Resources.Neos_IdentityServer_Console_Snapin.folder32, Color.Black); } else { RefreshUI(); } }
/// <summary> /// BuildNodes method /// </summary> private void BuildNodes(bool doall = true) { if (doall) { this.RootNode = new RootScopeNode(); FormViewDescription fvr = new FormViewDescription(); fvr.DisplayName = "MFA Platform"; fvr.ControlType = typeof(RootViewControl); fvr.ViewType = typeof(RootFormView); this.RootNode.ViewDescriptions.Add(fvr); this.RootNode.ViewDescriptions.DefaultIndex = 0; if (IsPrimary) { // Service Node this.ServiceNode = new ServiceScopeNode(); FormViewDescription fvc = new FormViewDescription(); fvc.DisplayName = "MFA Platform Service"; fvc.ControlType = typeof(ServiceViewControl); fvc.ViewType = typeof(ServiceFormView); this.ServiceNode.ViewDescriptions.Add(fvc); this.ServiceNode.ViewDescriptions.DefaultIndex = 0; // General Scope this.ServiceGeneralNode = new ServiceGeneralScopeNode(); FormViewDescription fvs = new FormViewDescription(); fvs.DisplayName = "MFA Platform General Properties"; fvs.ControlType = typeof(GeneralViewControl); fvs.ViewType = typeof(GeneralFormView); this.ServiceGeneralNode.ViewDescriptions.Add(fvs); this.ServiceGeneralNode.ViewDescriptions.DefaultIndex = 0; // ADDS Scope this.ServiceADDSNode = new ServiceADDSScopeNode(); FormViewDescription fadds = new FormViewDescription(); fadds.DisplayName = "MFA Platform Active Directory Properties"; fadds.ControlType = typeof(ADDSViewControl); fadds.ViewType = typeof(ServiceADDSFormView); this.ServiceADDSNode.ViewDescriptions.Add(fadds); this.ServiceADDSNode.ViewDescriptions.DefaultIndex = 0; // SQL Scope this.ServiceSQLNode = new ServiceSQLScopeNode(); FormViewDescription fsql = new FormViewDescription(); fsql.DisplayName = "MFA Platform SQL Server Properties"; fsql.ControlType = typeof(SQLViewControl); fsql.ViewType = typeof(ServiceSQLFormView); this.ServiceSQLNode.ViewDescriptions.Add(fsql); this.ServiceSQLNode.ViewDescriptions.DefaultIndex = 0; // Security Scope this.ServiceSecurityNode = new ServiceSecurityRootScopeNode(); FormViewDescription fsec = new FormViewDescription(); fsec.DisplayName = "Security Features"; fsec.ControlType = typeof(ServiceSecurityRootViewControl); fsec.ViewType = typeof(ServiceSecurityRootFormView); this.ServiceSecurityNode.ViewDescriptions.Add(fsec); this.ServiceSecurityNode.ViewDescriptions.DefaultIndex = 0; // RNG this.ServiceRNGNode = new ServiceSecurityRNGScopeNode(); FormViewDescription frng = new FormViewDescription(); frng.DisplayName = "RGN Ramdom Number Generator"; frng.ControlType = typeof(ServiceSecurityRNGViewControl); frng.ViewType = typeof(ServiceSecurityRNGFormView); this.ServiceRNGNode.ViewDescriptions.Add(frng); this.ServiceRNGNode.ViewDescriptions.DefaultIndex = 0; // RSA this.ServiceRSANode = new ServiceSecurityRSAScopeNode(); FormViewDescription frsa = new FormViewDescription(); frsa.DisplayName = "RSA Key Generator"; frsa.ControlType = typeof(ServiceSecurityRSAViewControl); frsa.ViewType = typeof(ServiceSecurityRSAFormView); this.ServiceRSANode.ViewDescriptions.Add(frsa); this.ServiceRSANode.ViewDescriptions.DefaultIndex = 0; // RSA CUST this.ServiceRSAXNode = new ServiceSecurityRSAXScopeNode(); FormViewDescription frsax = new FormViewDescription(); frsax.DisplayName = "RSA Extended Key Generator"; frsax.ControlType = typeof(ServiceSecurityRSAXViewControl); frsax.ViewType = typeof(ServiceSecurityRSAXFormView); this.ServiceRSAXNode.ViewDescriptions.Add(frsax); this.ServiceRSAXNode.ViewDescriptions.DefaultIndex = 0; // Providers Scope this.ServiceProvidersNode = new ServiceProvidersScopeNode(); FormViewDescription fprov = new FormViewDescription(); fprov.DisplayName = "MFA Providers"; fprov.ControlType = typeof(ProvidersViewControl); fprov.ViewType = typeof(ServiceProvidersFormView); this.ServiceProvidersNode.ViewDescriptions.Add(fprov); this.ServiceProvidersNode.ViewDescriptions.DefaultIndex = 0; ManagementService.EnsureService(); RuntimeAuthProvider.LoadProviders(ManagementService.Config); IExternalProvider prv0 = RuntimeAuthProvider.GetProviderInstance(PreferredMethod.Code); if (prv0 != null) { // TOTP Scope this.ServiceTOTPNode = new ServiceSecurityScopeNode(); FormViewDescription ftotp = new FormViewDescription(); ftotp.DisplayName = "MFA Platform TOTP Properties"; ftotp.ControlType = typeof(ServiceSecurityViewControl); ftotp.ViewType = typeof(ServiceSecurityFormView); this.ServiceTOTPNode.ViewDescriptions.Add(ftotp); this.ServiceTOTPNode.ViewDescriptions.DefaultIndex = 0; } IExternalProvider prv1 = RuntimeAuthProvider.GetProviderInstance(PreferredMethod.Email); if (prv1 != null) { // SMTP Scope this.ServiceSMTPNode = new ServiceSMTPScopeNode(); FormViewDescription fsmtp = new FormViewDescription(); fsmtp.DisplayName = "MFA Platform SMTP Properties"; fsmtp.ControlType = typeof(SMTPViewControl); fsmtp.ViewType = typeof(ServiceSMTPFormView); this.ServiceSMTPNode.ViewDescriptions.Add(fsmtp); this.ServiceSMTPNode.ViewDescriptions.DefaultIndex = 0; } IExternalProvider prv2 = RuntimeAuthProvider.GetProviderInstance(PreferredMethod.External); if (prv2 != null) { // SMS Scope this.ServiceSMSNode = new ServicePhoneScopeNode(); FormViewDescription fsms = new FormViewDescription(); fsms.DisplayName = "MFA Platform SMS Properties"; fsms.ControlType = typeof(SMSViewControl); fsms.ViewType = typeof(ServiceSMSFormView); this.ServiceSMSNode.ViewDescriptions.Add(fsms); this.ServiceSMSNode.ViewDescriptions.DefaultIndex = 0; } IExternalProvider prv3 = RuntimeAuthProvider.GetProviderInstance(PreferredMethod.Azure); if (prv3 != null) { // Azure Scope this.ServiceAzureNode = new ServiceAzureScopeNode(); FormViewDescription faz = new FormViewDescription(); faz.DisplayName = "MFA Platform SMS Properties"; faz.ControlType = typeof(AzureViewControl); faz.ViewType = typeof(ServiceAzureFormView); this.ServiceAzureNode.ViewDescriptions.Add(faz); this.ServiceAzureNode.ViewDescriptions.DefaultIndex = 0; } } // Users Scope this.UsersNode = new UsersScopeNode(); FormViewDescription fvu = new FormViewDescription(); fvu.DisplayName = "MFA Platform Users"; fvu.ControlType = typeof(UsersListView); fvu.ViewType = typeof(UsersFormView); this.UsersNode.ViewDescriptions.Add(fvu); this.UsersNode.ViewDescriptions.DefaultIndex = 0; if (IsPrimary) { this.RootNode.Children.Add(this.ServiceNode); this.RootNode.Children.Add(this.ServiceGeneralNode); this.RootNode.Children.Add(this.ServiceADDSNode); this.RootNode.Children.Add(this.ServiceSQLNode); this.RootNode.Children.Add(this.ServiceSecurityNode); this.ServiceSecurityNode.Children.Add(this.ServiceRNGNode); this.ServiceSecurityNode.Children.Add(this.ServiceRSANode); this.ServiceSecurityNode.Children.Add(this.ServiceRSAXNode); this.RootNode.Children.Add(this.ServiceProvidersNode); if (this.ServiceTOTPNode != null) { this.ServiceProvidersNode.Children.Add(this.ServiceTOTPNode); } if (this.ServiceSMTPNode != null) { this.ServiceProvidersNode.Children.Add(this.ServiceSMTPNode); } if (this.ServiceSMSNode != null) { this.ServiceProvidersNode.Children.Add(this.ServiceSMSNode); } if (this.ServiceAzureNode != null) { this.ServiceProvidersNode.Children.Add(this.ServiceAzureNode); } } this.RootNode.Children.Add(this.UsersNode); this.IsModified = true; this.SmallImages.Add(Neos.IdentityServer.Console.Resources.Neos_IdentityServer_Console_Snapin.folder16, Color.Black); this.LargeImages.Add(Neos.IdentityServer.Console.Resources.Neos_IdentityServer_Console_Snapin.folder32, Color.Black); } else { RefreshUI(); } }