BaseServiceConnector.cs 844 B

123456789101112131415161718192021222324252627282930313233
  1. using System;
  2. using OpenSim.Framework;
  3. using OpenSim.Framework.ServiceAuth;
  4. using Nini.Config;
  5. namespace OpenSim.Services.Connectors
  6. {
  7. public class BaseServiceConnector
  8. {
  9. protected IServiceAuth m_Auth;
  10. public BaseServiceConnector() { }
  11. public BaseServiceConnector(IConfigSource config, string section)
  12. {
  13. Initialise(config, section);
  14. }
  15. public void Initialise(IConfigSource config, string section)
  16. {
  17. string authType = Util.GetConfigVarFromSections<string>(config, "AuthType", new string[] { "Network", section }, "None");
  18. switch (authType)
  19. {
  20. case "BasicHttpAuthentication":
  21. m_Auth = new BasicHttpAuthentication(config, section);
  22. break;
  23. }
  24. }
  25. }
  26. }