aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/ServiceAuth/ServiceAuth.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/ServiceAuth/ServiceAuth.cs')
-rw-r--r--OpenSim/Framework/ServiceAuth/ServiceAuth.cs18
1 files changed, 15 insertions, 3 deletions
diff --git a/OpenSim/Framework/ServiceAuth/ServiceAuth.cs b/OpenSim/Framework/ServiceAuth/ServiceAuth.cs
index 5ab613b..30f5bd6 100644
--- a/OpenSim/Framework/ServiceAuth/ServiceAuth.cs
+++ b/OpenSim/Framework/ServiceAuth/ServiceAuth.cs
@@ -36,15 +36,27 @@ namespace OpenSim.Framework.ServiceAuth
36 { 36 {
37 public static IServiceAuth Create(IConfigSource config, string section) 37 public static IServiceAuth Create(IConfigSource config, string section)
38 { 38 {
39 CompoundAuthentication compoundAuth = new CompoundAuthentication();
40
41 bool allowLlHttpRequestIn
42 = Util.GetConfigVarFromSections<bool>(config, "AllowllHTTPRequestIn", new string[] { "Network", section }, false);
43
44 if (!allowLlHttpRequestIn)
45 compoundAuth.AddAuthenticator(new DisallowLlHttpRequest());
46
39 string authType = Util.GetConfigVarFromSections<string>(config, "AuthType", new string[] { "Network", section }, "None"); 47 string authType = Util.GetConfigVarFromSections<string>(config, "AuthType", new string[] { "Network", section }, "None");
40 48
41 switch (authType) 49 switch (authType)
42 { 50 {
43 case "BasicHttpAuthentication": 51 case "BasicHttpAuthentication":
44 return new BasicHttpAuthentication(config, section); 52 compoundAuth.AddAuthenticator(new BasicHttpAuthentication(config, section));
53 break;
45 } 54 }
46 55
47 return null; 56 if (compoundAuth.Count > 0)
57 return compoundAuth;
58 else
59 return null;
48 } 60 }
49 } 61 }
50} 62} \ No newline at end of file