diff options
author | Diva Canto | 2014-05-23 16:19:43 -0700 |
---|---|---|
committer | Diva Canto | 2014-05-23 16:19:43 -0700 |
commit | 20f20895cf1444071d5edc42e11a1fb94b1b1079 (patch) | |
tree | 0c7547590a89eec47886e0a8646f86ebbf449e63 /OpenSim/Framework/ServiceAuth/ServiceAuth.cs | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-20f20895cf1444071d5edc42e11a1fb94b1b1079.zip opensim-SC-20f20895cf1444071d5edc42e11a1fb94b1b1079.tar.gz opensim-SC-20f20895cf1444071d5edc42e11a1fb94b1b1079.tar.bz2 opensim-SC-20f20895cf1444071d5edc42e11a1fb94b1b1079.tar.xz |
Adds optional HTTP Basic Authentication to Robust service connectors.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/ServiceAuth/ServiceAuth.cs | 23 |
1 files changed, 23 insertions, 0 deletions
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 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | |||
4 | using Nini.Config; | ||
5 | |||
6 | namespace OpenSim.Framework.ServiceAuth | ||
7 | { | ||
8 | public class ServiceAuth | ||
9 | { | ||
10 | public static IServiceAuth Create(IConfigSource config, string section) | ||
11 | { | ||
12 | string authType = Util.GetConfigVarFromSections<string>(config, "AuthType", new string[] { "Network", section }, "None"); | ||
13 | |||
14 | switch (authType) | ||
15 | { | ||
16 | case "BasicHttpAuthentication": | ||
17 | return new BasicHttpAuthentication(config, section); | ||
18 | } | ||
19 | |||
20 | return null; | ||
21 | } | ||
22 | } | ||
23 | } | ||