aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs29
1 files changed, 13 insertions, 16 deletions
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs
index 7a96a05..f1c2575 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs
@@ -1,4 +1,4 @@
1/* 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/ 2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
@@ -73,24 +73,20 @@ namespace OpenSim.Services.Connectors.SimianGrid
73 73
74 public void Initialise(IConfigSource source) 74 public void Initialise(IConfigSource source)
75 { 75 {
76 if (Simian.IsSimianEnabled(source, "AuthenticationServices", this.Name)) 76 IConfig gridConfig = source.Configs["AuthenticationService"];
77 if (gridConfig != null)
77 { 78 {
78 IConfig assetConfig = source.Configs["AuthenticationService"]; 79 string serviceUrl = gridConfig.GetString("AuthenticationServerURI");
79 if (assetConfig == null) 80 if (!String.IsNullOrEmpty(serviceUrl))
80 { 81 {
81 m_log.Error("[SIMIAN AUTH CONNECTOR]: AuthenticationService missing from OpenSim.ini"); 82 if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
82 throw new Exception("Authentication connector init error"); 83 serviceUrl = serviceUrl + '/';
84 m_serverUrl = serviceUrl;
83 } 85 }
84
85 string serviceURI = assetConfig.GetString("AuthenticationServerURI");
86 if (String.IsNullOrEmpty(serviceURI))
87 {
88 m_log.Error("[SIMIAN AUTH CONNECTOR]: No Server URI named in section AuthenticationService");
89 throw new Exception("Authentication connector init error");
90 }
91
92 m_serverUrl = serviceURI;
93 } 86 }
87
88 if (String.IsNullOrEmpty(m_serverUrl))
89 m_log.Info("[SIMIAN AUTH CONNECTOR]: No AuthenticationServerURI specified, disabling connector");
94 } 90 }
95 91
96 public string Authenticate(UUID principalID, string password, int lifetime) 92 public string Authenticate(UUID principalID, string password, int lifetime)
@@ -253,7 +249,8 @@ namespace OpenSim.Services.Connectors.SimianGrid
253 if (password == simianGridCredential || 249 if (password == simianGridCredential ||
254 "$1$" + password == simianGridCredential || 250 "$1$" + password == simianGridCredential ||
255 "$1$" + Utils.MD5String(password) == simianGridCredential || 251 "$1$" + Utils.MD5String(password) == simianGridCredential ||
256 Utils.MD5String(password) == simianGridCredential) 252 Utils.MD5String(password) == simianGridCredential ||
253 "$1$" + Utils.MD5String(password + ":") == simianGridCredential)
257 { 254 {
258 authorizeResult = Authorize(userID); 255 authorizeResult = Authorize(userID);
259 return true; 256 return true;