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; } } }
/// <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); }
/// <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); }