diff options
Diffstat (limited to 'OpenSim/Framework/UserManager')
-rw-r--r-- | OpenSim/Framework/UserManager/LoginResponse.cs | 13 | ||||
-rw-r--r-- | OpenSim/Framework/UserManager/UserManagerBase.cs | 37 |
2 files changed, 21 insertions, 29 deletions
diff --git a/OpenSim/Framework/UserManager/LoginResponse.cs b/OpenSim/Framework/UserManager/LoginResponse.cs index d1cd8cf..64504fa 100644 --- a/OpenSim/Framework/UserManager/LoginResponse.cs +++ b/OpenSim/Framework/UserManager/LoginResponse.cs | |||
@@ -1,13 +1,8 @@ | |||
1 | using System; | 1 | using System; |
2 | using System.Text; | ||
3 | using System.Text.RegularExpressions; | ||
4 | using System.Threading; | ||
5 | using System.Collections; | 2 | using System.Collections; |
6 | using System.Xml; | ||
7 | using libsecondlife; | 3 | using libsecondlife; |
8 | using OpenSim.Framework.Utilities; | ||
9 | using OpenSim.Framework.Interfaces; | ||
10 | using Nwc.XmlRpc; | 4 | using Nwc.XmlRpc; |
5 | using OpenSim.Framework.Console; | ||
11 | 6 | ||
12 | namespace OpenSim.Framework.UserManagement | 7 | namespace OpenSim.Framework.UserManagement |
13 | { | 8 | { |
@@ -227,7 +222,7 @@ namespace OpenSim.Framework.UserManagement | |||
227 | 222 | ||
228 | responseData["sim_port"] =(Int32) this.SimPort; | 223 | responseData["sim_port"] =(Int32) this.SimPort; |
229 | responseData["sim_ip"] = this.SimAddress; | 224 | responseData["sim_ip"] = this.SimAddress; |
230 | Console.MainLog.Instance.Warn("SIM IP: " + responseData["sim_ip"] + "; SIM PORT: " + responseData["sim_port"]); | 225 | MainLog.Instance.Warn("SIM IP: " + responseData["sim_ip"] + "; SIM PORT: " + responseData["sim_port"]); |
231 | responseData["agent_id"] = this.AgentID.ToStringHyphenated(); | 226 | responseData["agent_id"] = this.AgentID.ToStringHyphenated(); |
232 | responseData["session_id"] = this.SessionID.ToStringHyphenated(); | 227 | responseData["session_id"] = this.SessionID.ToStringHyphenated(); |
233 | responseData["secure_session_id"] = this.SecureSessionID.ToStringHyphenated(); | 228 | responseData["secure_session_id"] = this.SecureSessionID.ToStringHyphenated(); |
@@ -266,8 +261,8 @@ namespace OpenSim.Framework.UserManagement | |||
266 | } | 261 | } |
267 | catch (Exception e) | 262 | catch (Exception e) |
268 | { | 263 | { |
269 | OpenSim.Framework.Console.MainLog.Instance.WriteLine( | 264 | MainLog.Instance.WriteLine( |
270 | OpenSim.Framework.Console.LogPriority.LOW, | 265 | LogPriority.LOW, |
271 | "LoginResponse: Error creating XML-RPC Response: " + e.Message | 266 | "LoginResponse: Error creating XML-RPC Response: " + e.Message |
272 | ); | 267 | ); |
273 | return (this.GenerateFailureResponse("Internal Error", "Error generating Login Response", "false")); | 268 | return (this.GenerateFailureResponse("Internal Error", "Error generating Login Response", "false")); |
diff --git a/OpenSim/Framework/UserManager/UserManagerBase.cs b/OpenSim/Framework/UserManager/UserManagerBase.cs index 560752e..f316cc7 100644 --- a/OpenSim/Framework/UserManager/UserManagerBase.cs +++ b/OpenSim/Framework/UserManager/UserManagerBase.cs | |||
@@ -28,24 +28,21 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Text; | ||
32 | using OpenSim.Framework.Data; | ||
33 | using libsecondlife; | ||
34 | using System.Reflection; | 31 | using System.Reflection; |
35 | 32 | using System.Security.Cryptography; | |
36 | using System.Xml; | 33 | using libsecondlife; |
37 | using Nwc.XmlRpc; | 34 | using Nwc.XmlRpc; |
38 | using OpenSim.Framework.Sims; | 35 | using OpenSim.Framework.Console; |
36 | using OpenSim.Framework.Data; | ||
37 | using OpenSim.Framework.Interfaces; | ||
39 | using OpenSim.Framework.Inventory; | 38 | using OpenSim.Framework.Inventory; |
40 | using OpenSim.Framework.Utilities; | 39 | using OpenSim.Framework.Utilities; |
41 | 40 | ||
42 | using System.Security.Cryptography; | ||
43 | |||
44 | namespace OpenSim.Framework.UserManagement | 41 | namespace OpenSim.Framework.UserManagement |
45 | { | 42 | { |
46 | public abstract class UserManagerBase | 43 | public abstract class UserManagerBase |
47 | { | 44 | { |
48 | public OpenSim.Framework.Interfaces.UserConfig _config; | 45 | public UserConfig _config; |
49 | Dictionary<string, IUserData> _plugins = new Dictionary<string, IUserData>(); | 46 | Dictionary<string, IUserData> _plugins = new Dictionary<string, IUserData>(); |
50 | 47 | ||
51 | /// <summary> | 48 | /// <summary> |
@@ -54,10 +51,10 @@ namespace OpenSim.Framework.UserManagement | |||
54 | /// <param name="FileName">The filename to the user server plugin DLL</param> | 51 | /// <param name="FileName">The filename to the user server plugin DLL</param> |
55 | public void AddPlugin(string FileName) | 52 | public void AddPlugin(string FileName) |
56 | { | 53 | { |
57 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Userstorage: Attempting to load " + FileName); | 54 | MainLog.Instance.Verbose( "Userstorage: Attempting to load " + FileName); |
58 | Assembly pluginAssembly = Assembly.LoadFrom(FileName); | 55 | Assembly pluginAssembly = Assembly.LoadFrom(FileName); |
59 | 56 | ||
60 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Userstorage: Found " + pluginAssembly.GetTypes().Length + " interfaces."); | 57 | MainLog.Instance.Verbose( "Userstorage: Found " + pluginAssembly.GetTypes().Length + " interfaces."); |
61 | foreach (Type pluginType in pluginAssembly.GetTypes()) | 58 | foreach (Type pluginType in pluginAssembly.GetTypes()) |
62 | { | 59 | { |
63 | if (!pluginType.IsAbstract) | 60 | if (!pluginType.IsAbstract) |
@@ -69,7 +66,7 @@ namespace OpenSim.Framework.UserManagement | |||
69 | IUserData plug = (IUserData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); | 66 | IUserData plug = (IUserData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); |
70 | plug.Initialise(); | 67 | plug.Initialise(); |
71 | this._plugins.Add(plug.getName(), plug); | 68 | this._plugins.Add(plug.getName(), plug); |
72 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Userstorage: Added IUserData Interface"); | 69 | MainLog.Instance.Verbose( "Userstorage: Added IUserData Interface"); |
73 | } | 70 | } |
74 | 71 | ||
75 | typeInterface = null; | 72 | typeInterface = null; |
@@ -97,7 +94,7 @@ namespace OpenSim.Framework.UserManagement | |||
97 | } | 94 | } |
98 | catch (Exception e) | 95 | catch (Exception e) |
99 | { | 96 | { |
100 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); | 97 | MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); |
101 | } | 98 | } |
102 | } | 99 | } |
103 | 100 | ||
@@ -122,7 +119,7 @@ namespace OpenSim.Framework.UserManagement | |||
122 | } | 119 | } |
123 | catch (Exception e) | 120 | catch (Exception e) |
124 | { | 121 | { |
125 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); | 122 | MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); |
126 | } | 123 | } |
127 | } | 124 | } |
128 | 125 | ||
@@ -149,7 +146,7 @@ namespace OpenSim.Framework.UserManagement | |||
149 | } | 146 | } |
150 | catch (Exception e) | 147 | catch (Exception e) |
151 | { | 148 | { |
152 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); | 149 | MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); |
153 | } | 150 | } |
154 | } | 151 | } |
155 | 152 | ||
@@ -173,7 +170,7 @@ namespace OpenSim.Framework.UserManagement | |||
173 | } | 170 | } |
174 | catch (Exception e) | 171 | catch (Exception e) |
175 | { | 172 | { |
176 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); | 173 | MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); |
177 | } | 174 | } |
178 | } | 175 | } |
179 | 176 | ||
@@ -195,7 +192,7 @@ namespace OpenSim.Framework.UserManagement | |||
195 | } | 192 | } |
196 | catch (Exception e) | 193 | catch (Exception e) |
197 | { | 194 | { |
198 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); | 195 | MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); |
199 | } | 196 | } |
200 | } | 197 | } |
201 | 198 | ||
@@ -218,7 +215,7 @@ namespace OpenSim.Framework.UserManagement | |||
218 | } | 215 | } |
219 | catch (Exception e) | 216 | catch (Exception e) |
220 | { | 217 | { |
221 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); | 218 | MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); |
222 | } | 219 | } |
223 | } | 220 | } |
224 | 221 | ||
@@ -314,7 +311,7 @@ namespace OpenSim.Framework.UserManagement | |||
314 | /// <returns>Authenticated?</returns> | 311 | /// <returns>Authenticated?</returns> |
315 | public virtual bool AuthenticateUser(UserProfileData profile, string password) | 312 | public virtual bool AuthenticateUser(UserProfileData profile, string password) |
316 | { | 313 | { |
317 | OpenSim.Framework.Console.MainLog.Instance.Verbose( | 314 | MainLog.Instance.Verbose( |
318 | "Authenticating " + profile.username + " " + profile.surname); | 315 | "Authenticating " + profile.username + " " + profile.surname); |
319 | 316 | ||
320 | password = password.Remove(0, 3); //remove $1$ | 317 | password = password.Remove(0, 3); //remove $1$ |
@@ -517,7 +514,7 @@ namespace OpenSim.Framework.UserManagement | |||
517 | } | 514 | } |
518 | catch (Exception e) | 515 | catch (Exception e) |
519 | { | 516 | { |
520 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Unable to add user via " + plugin.Key + "(" + e.ToString() + ")"); | 517 | MainLog.Instance.Verbose("Unable to add user via " + plugin.Key + "(" + e.ToString() + ")"); |
521 | } | 518 | } |
522 | } | 519 | } |
523 | } | 520 | } |