public HttpSession(string baseUrl, Authentication authentication) { LOG.Debug("Create HttpSession with baseUrl: " + baseUrl); if (authentication != null) { LOG.Debug("Using authentication: " + authentication.Name); } this.SetBaseUrl(baseUrl); this.SetAuthentication(authentication); }
public void AddAuthentication(Authentication authentication) { this.authentications.Add(authentication); }
public void SetAuthentication(Authentication authentication) { this.authentication = authentication; }
private void ReadAuthentications(Project project) { Authentication authentication = null; while (reader.Read()) { switch (reader.NodeType) { case XmlNodeType.Element: if (reader.Name.Equals("authentication")) { authentication = new Authentication(); for (int i = 0; i < reader.AttributeCount; i++) { reader.MoveToAttribute(i); if (reader.Name.Equals("type")) { authentication.Type = reader.Value; } } } else if (reader.Name.Equals("name")) { authentication.Name = reader.ReadElementContentAsString(); } else if (reader.Name.Equals("user")) { authentication.User = reader.ReadElementContentAsString(); } else if (reader.Name.Equals("password")) { authentication.Password = reader.ReadElementContentAsString(); } break; case XmlNodeType.EndElement: if (reader.Name.Equals("authentication")) { project.AddAuthentication(authentication); return; } else if (reader.Name.Equals("authentications")) { return; } break; } } }