diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Communications/OGS1/OGS1UserServices.cs | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs index 89b3e42..a55b62e 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs | |||
@@ -144,16 +144,25 @@ namespace OpenSim.Region.Communications.OGS1 | |||
144 | 144 | ||
145 | public override bool AuthenticateUserByPassword(UUID userID, string password) | 145 | public override bool AuthenticateUserByPassword(UUID userID, string password) |
146 | { | 146 | { |
147 | try | 147 | Hashtable param = new Hashtable(); |
148 | param["user_uuid"] = userID.ToString(); | ||
149 | param["password"] = password; | ||
150 | IList parameters = new ArrayList(); | ||
151 | parameters.Add(param); | ||
152 | XmlRpcRequest req = new XmlRpcRequest("authenticate_user_by_password", parameters); | ||
153 | XmlRpcResponse resp = req.Send(m_commsManager.NetworkServersInfo.UserURL, 30000); | ||
154 | |||
155 | // Temporary measure to deal with older services | ||
156 | if (resp.IsFault && resp.FaultCode == XmlRpcErrorCodes.SERVER_ERROR_METHOD) | ||
157 | //if ((string)respData["fault_code"] != null && (string)respData["fault_code"] == | ||
148 | { | 158 | { |
149 | Hashtable param = new Hashtable(); | 159 | throw new Exception( |
150 | param["user_uuid"] = userID.ToString(); | 160 | String.Format( |
151 | param["password"] = password; | 161 | "XMLRPC method 'authenticate_user_by_password' not yet implemented by user service at {0}", |
152 | IList parameters = new ArrayList(); | 162 | m_commsManager.NetworkServersInfo.UserURL)); |
153 | parameters.Add(param); | 163 | } |
154 | XmlRpcRequest req = new XmlRpcRequest("authenticate_user_by_password", parameters); | 164 | |
155 | XmlRpcResponse resp = req.Send(m_commsManager.NetworkServersInfo.UserURL, 30000); | 165 | Hashtable respData = (Hashtable)resp.Value; |
156 | Hashtable respData = (Hashtable)resp.Value; | ||
157 | 166 | ||
158 | // foreach (object key in respData.Keys) | 167 | // foreach (object key in respData.Keys) |
159 | // { | 168 | // { |
@@ -164,23 +173,14 @@ namespace OpenSim.Region.Communications.OGS1 | |||
164 | // "[OGS1 USER SERVICES]: AuthenticatedUserByPassword response for {0} is [{1}]", | 173 | // "[OGS1 USER SERVICES]: AuthenticatedUserByPassword response for {0} is [{1}]", |
165 | // userID, respData["auth_user"]); | 174 | // userID, respData["auth_user"]); |
166 | 175 | ||
167 | if ((string)respData["auth_user"] == "TRUE") | 176 | if ((string)respData["auth_user"] == "TRUE") |
168 | { | 177 | { |
169 | return true; | 178 | return true; |
170 | } | ||
171 | else | ||
172 | { | ||
173 | return false; | ||
174 | } | ||
175 | } | 179 | } |
176 | catch (Exception e) | 180 | else |
177 | { | 181 | { |
178 | m_log.ErrorFormat( | ||
179 | "[OGS1 USER SERVICES]: Error when trying to authenticate user by password from remote user server: {0}", | ||
180 | e); | ||
181 | |||
182 | return false; | 182 | return false; |
183 | } | 183 | } |
184 | } | 184 | } |
185 | } | 185 | } |
186 | } \ No newline at end of file | 186 | } \ No newline at end of file |