public override void UpdateSettings()
 {
     try
     {
         var config = (DNNAuthenticationSAMLAuthenticationConfig)SettingsEditor.DataSource;
         config.PortalID = PortalId;
         DNNAuthenticationSAMLAuthenticationConfig.UpdateConfig(config);
     }
     catch (Exception exc)
     {
         Exceptions.ProcessModuleLoadException(this, exc);
     }
 }
예제 #2
0
        public override void UpdateSettings()
        {
            try
            {
                var config = DNNAuthenticationSAMLAuthenticationConfig.GetConfig(PortalId);
                config.PortalID          = PortalId;
                config.ConsumerServURL   = txtConsumerServUrl.Text;
                config.DNNAuthName       = txtDNNAuthName.Text;
                config.Enabled           = chkEnabled.Checked;
                config.IdPLogoutURL      = txtIdpLogoutUrl.Text;
                config.IdPURL            = txtIdpUrl.Text;
                config.OurIssuerEntityID = txtOurIssuerEntityId.Text;
                config.TheirCert         = txtTheirCert.Text;
                config.usrDisplayName    = txtDisplayName.Text;
                config.usrEmail          = txtEmail.Text;
                config.usrFirstName      = txtFirstName.Text;
                config.usrLastName       = txtLastName.Text;
                config.RoleAttribute     = txtRoleAttributeName.Text;
                config.RequiredRoles     = txtRequiredRolesTextbox.Text;

                DNNAuthenticationSAMLAuthenticationConfig.UpdateConfig(config);

                //Iterate through repeater
                foreach (RepeaterItem item in repeaterProps.Items)
                {
                    if (item.ItemType == ListItemType.Item || item.ItemType == ListItemType.AlternatingItem)
                    {
                        Label   lblProperty = (Label)item.FindControl("lblProperty");
                        TextBox txtMapped   = (TextBox)item.FindControl("txtMappedValue");
                        PortalController.UpdatePortalSetting(config.PortalID, usrPREFIX + lblProperty.Text, txtMapped.Text);
                    }
                }
            }
            catch (Exception exc)
            {
                Exceptions.ProcessModuleLoadException(this, exc);
            }
        }