예제 #1
0
        private void HandleCredentialsFactory(XmlNode node, ClientSecurityConfig clientSecurityConfig)
        {
            var className = GetAttribute(node, "class-name");
            var credentialsFactoryConfig = new CredentialsFactoryConfig(className);

            clientSecurityConfig.SetCredentialsFactoryConfig(credentialsFactoryConfig);
            foreach (XmlNode child in node.ChildNodes)
            {
                var nodeName = CleanNodeName(child.Name);
                if ("properties".Equals(nodeName))
                {
                    FillProperties(child, credentialsFactoryConfig.GetProperties());
                    break;
                }
            }
        }
예제 #2
0
        /// <exception cref="System.Exception"></exception>
        private void HandleSecurity(XmlNode node)
        {
            var clientSecurityConfig = new ClientSecurityConfig();

            foreach (XmlNode child in node.ChildNodes)
            {
                var nodeName = CleanNodeName(child);
                if ("credentials".Equals(nodeName))
                {
                    var className = GetTextContent(child);
                    clientSecurityConfig.SetCredentialsClassName(className);
                }
                else if ("credentials-factory".Equals(nodeName))
                {
                    HandleCredentialsFactory(child, clientSecurityConfig);
                }
            }
            _clientConfig.SetSecurityConfig(clientSecurityConfig);
        }
예제 #3
0
 /// <summary>
 /// Sets <see cref="ClientSecurityConfig"/>.
 /// </summary>
 /// <param name="securityConfig"><see cref="ClientSecurityConfig"/></param>
 /// <returns><see cref="ClientConfig"/> for chaining</returns>
 public ClientConfig SetSecurityConfig(ClientSecurityConfig securityConfig)
 {
     _securityConfig = securityConfig;
     return(this);
 }