ServiceAuth.cs 597 B

1234567891011121314151617181920212223
  1. using System;
  2. using System.Collections.Generic;
  3. using Nini.Config;
  4. namespace OpenSim.Framework.ServiceAuth
  5. {
  6. public class ServiceAuth
  7. {
  8. public static IServiceAuth Create(IConfigSource config, string section)
  9. {
  10. string authType = Util.GetConfigVarFromSections<string>(config, "AuthType", new string[] { "Network", section }, "None");
  11. switch (authType)
  12. {
  13. case "BasicHttpAuthentication":
  14. return new BasicHttpAuthentication(config, section);
  15. }
  16. return null;
  17. }
  18. }
  19. }