Adds optional HTTP Basic Authentication to Robust service connectors.

This commit is contained in:
Diva Canto
2014-05-23 16:19:43 -07:00
parent b7c7293c7a
commit 20f20895cf
47 changed files with 519 additions and 116 deletions

View File

@@ -0,0 +1,33 @@
using System;
using OpenSim.Framework;
using OpenSim.Framework.ServiceAuth;
using Nini.Config;
namespace OpenSim.Services.Connectors
{
public class BaseServiceConnector
{
protected IServiceAuth m_Auth;
public BaseServiceConnector() { }
public BaseServiceConnector(IConfigSource config, string section)
{
Initialise(config, section);
}
public void Initialise(IConfigSource config, string section)
{
string authType = Util.GetConfigVarFromSections<string>(config, "AuthType", new string[] { "Network", section }, "None");
switch (authType)
{
case "BasicHttpAuthentication":
m_Auth = new BasicHttpAuthentication(config, section);
break;
}
}
}
}