From 20f20895cf1444071d5edc42e11a1fb94b1b1079 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 23 May 2014 16:19:43 -0700 Subject: Adds optional HTTP Basic Authentication to Robust service connectors. --- OpenSim/Framework/ServiceAuth/ServiceAuth.cs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 OpenSim/Framework/ServiceAuth/ServiceAuth.cs (limited to 'OpenSim/Framework/ServiceAuth/ServiceAuth.cs') diff --git a/OpenSim/Framework/ServiceAuth/ServiceAuth.cs b/OpenSim/Framework/ServiceAuth/ServiceAuth.cs new file mode 100644 index 0000000..bc32d90 --- /dev/null +++ b/OpenSim/Framework/ServiceAuth/ServiceAuth.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; + +using Nini.Config; + +namespace OpenSim.Framework.ServiceAuth +{ + public class ServiceAuth + { + public static IServiceAuth Create(IConfigSource config, string section) + { + string authType = Util.GetConfigVarFromSections(config, "AuthType", new string[] { "Network", section }, "None"); + + switch (authType) + { + case "BasicHttpAuthentication": + return new BasicHttpAuthentication(config, section); + } + + return null; + } + } +} -- cgit v1.1