aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors/BaseServiceConnector.cs
diff options
context:
space:
mode:
authorDiva Canto2014-05-23 16:19:43 -0700
committerDiva Canto2014-05-23 16:19:43 -0700
commit20f20895cf1444071d5edc42e11a1fb94b1b1079 (patch)
tree0c7547590a89eec47886e0a8646f86ebbf449e63 /OpenSim/Services/Connectors/BaseServiceConnector.cs
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-20f20895cf1444071d5edc42e11a1fb94b1b1079.zip
opensim-SC_OLD-20f20895cf1444071d5edc42e11a1fb94b1b1079.tar.gz
opensim-SC_OLD-20f20895cf1444071d5edc42e11a1fb94b1b1079.tar.bz2
opensim-SC_OLD-20f20895cf1444071d5edc42e11a1fb94b1b1079.tar.xz
Adds optional HTTP Basic Authentication to Robust service connectors.
Diffstat (limited to 'OpenSim/Services/Connectors/BaseServiceConnector.cs')
-rw-r--r--OpenSim/Services/Connectors/BaseServiceConnector.cs33
1 files changed, 33 insertions, 0 deletions
diff --git a/OpenSim/Services/Connectors/BaseServiceConnector.cs b/OpenSim/Services/Connectors/BaseServiceConnector.cs
new file mode 100644
index 0000000..98cd489
--- /dev/null
+++ b/OpenSim/Services/Connectors/BaseServiceConnector.cs
@@ -0,0 +1,33 @@
1using System;
2using OpenSim.Framework;
3using OpenSim.Framework.ServiceAuth;
4
5using Nini.Config;
6
7namespace OpenSim.Services.Connectors
8{
9 public class BaseServiceConnector
10 {
11 protected IServiceAuth m_Auth;
12
13 public BaseServiceConnector() { }
14
15 public BaseServiceConnector(IConfigSource config, string section)
16 {
17 Initialise(config, section);
18 }
19
20 public void Initialise(IConfigSource config, string section)
21 {
22 string authType = Util.GetConfigVarFromSections<string>(config, "AuthType", new string[] { "Network", section }, "None");
23
24 switch (authType)
25 {
26 case "BasicHttpAuthentication":
27 m_Auth = new BasicHttpAuthentication(config, section);
28 break;
29 }
30
31 }
32 }
33}