aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/LLLoginService
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/LLLoginService')
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginResponse.cs19
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginService.cs14
2 files changed, 29 insertions, 4 deletions
diff --git a/OpenSim/Services/LLLoginService/LLLoginResponse.cs b/OpenSim/Services/LLLoginService/LLLoginResponse.cs
index 9ec744f..e2f947c 100644
--- a/OpenSim/Services/LLLoginService/LLLoginResponse.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginResponse.cs
@@ -55,6 +55,7 @@ namespace OpenSim.Services.LLLoginService
55 public static LLFailedLoginResponse InventoryProblem; 55 public static LLFailedLoginResponse InventoryProblem;
56 public static LLFailedLoginResponse DeadRegionProblem; 56 public static LLFailedLoginResponse DeadRegionProblem;
57 public static LLFailedLoginResponse LoginBlockedProblem; 57 public static LLFailedLoginResponse LoginBlockedProblem;
58 public static LLFailedLoginResponse UnverifiedAccountProblem;
58 public static LLFailedLoginResponse AlreadyLoggedInProblem; 59 public static LLFailedLoginResponse AlreadyLoggedInProblem;
59 public static LLFailedLoginResponse InternalError; 60 public static LLFailedLoginResponse InternalError;
60 61
@@ -75,6 +76,10 @@ namespace OpenSim.Services.LLLoginService
75 LoginBlockedProblem = new LLFailedLoginResponse("presence", 76 LoginBlockedProblem = new LLFailedLoginResponse("presence",
76 "Logins are currently restricted. Please try again later.", 77 "Logins are currently restricted. Please try again later.",
77 "false"); 78 "false");
79 UnverifiedAccountProblem = new LLFailedLoginResponse("presence",
80 "Your account has not yet been verified. Please check " +
81 "your email and click the provided link.",
82 "false");
78 AlreadyLoggedInProblem = new LLFailedLoginResponse("presence", 83 AlreadyLoggedInProblem = new LLFailedLoginResponse("presence",
79 "You appear to be already logged in. " + 84 "You appear to be already logged in. " +
80 "If this is not the case please wait for your session to timeout. " + 85 "If this is not the case please wait for your session to timeout. " +
@@ -145,6 +150,7 @@ namespace OpenSim.Services.LLLoginService
145 private UUID agentID; 150 private UUID agentID;
146 private UUID sessionID; 151 private UUID sessionID;
147 private UUID secureSessionID; 152 private UUID secureSessionID;
153 private UUID realID;
148 154
149 // Login Flags 155 // Login Flags
150 private string dst; 156 private string dst;
@@ -227,7 +233,7 @@ namespace OpenSim.Services.LLLoginService
227 GridRegion destination, List<InventoryFolderBase> invSkel, FriendInfo[] friendsList, ILibraryService libService, 233 GridRegion destination, List<InventoryFolderBase> invSkel, FriendInfo[] friendsList, ILibraryService libService,
228 string where, string startlocation, Vector3 position, Vector3 lookAt, List<InventoryItemBase> gestures, string message, 234 string where, string startlocation, Vector3 position, Vector3 lookAt, List<InventoryItemBase> gestures, string message,
229 GridRegion home, IPEndPoint clientIP, string mapTileURL, string profileURL, string openIDURL, string searchURL, string currency, 235 GridRegion home, IPEndPoint clientIP, string mapTileURL, string profileURL, string openIDURL, string searchURL, string currency,
230 string DSTZone) 236 string DSTZone, UUID realID)
231 : this() 237 : this()
232 { 238 {
233 FillOutInventoryData(invSkel, libService); 239 FillOutInventoryData(invSkel, libService);
@@ -240,6 +246,7 @@ namespace OpenSim.Services.LLLoginService
240 AgentID = account.PrincipalID; 246 AgentID = account.PrincipalID;
241 SessionID = aCircuit.SessionID; 247 SessionID = aCircuit.SessionID;
242 SecureSessionID = aCircuit.SecureSessionID; 248 SecureSessionID = aCircuit.SecureSessionID;
249 RealID = realID;
243 Message = message; 250 Message = message;
244 BuddList = ConvertFriendListItem(friendsList); 251 BuddList = ConvertFriendListItem(friendsList);
245 StartLocation = where; 252 StartLocation = where;
@@ -375,6 +382,7 @@ namespace OpenSim.Services.LLLoginService
375 private void FillOutRegionData(GridRegion destination) 382 private void FillOutRegionData(GridRegion destination)
376 { 383 {
377 IPEndPoint endPoint = destination.ExternalEndPoint; 384 IPEndPoint endPoint = destination.ExternalEndPoint;
385 if (endPoint == null) return;
378 SimAddress = endPoint.Address.ToString(); 386 SimAddress = endPoint.Address.ToString();
379 SimPort = (uint)endPoint.Port; 387 SimPort = (uint)endPoint.Port;
380 RegionX = (uint)destination.RegionLocX; 388 RegionX = (uint)destination.RegionLocX;
@@ -450,6 +458,7 @@ namespace OpenSim.Services.LLLoginService
450 SessionID = UUID.Random(); 458 SessionID = UUID.Random();
451 SecureSessionID = UUID.Random(); 459 SecureSessionID = UUID.Random();
452 AgentID = UUID.Random(); 460 AgentID = UUID.Random();
461 RealID = UUID.Zero;
453 462
454 Hashtable InitialOutfitHash = new Hashtable(); 463 Hashtable InitialOutfitHash = new Hashtable();
455 InitialOutfitHash["folder_name"] = "Nightclub Female"; 464 InitialOutfitHash["folder_name"] = "Nightclub Female";
@@ -493,6 +502,7 @@ namespace OpenSim.Services.LLLoginService
493 responseData["http_port"] = (Int32)SimHttpPort; 502 responseData["http_port"] = (Int32)SimHttpPort;
494 503
495 responseData["agent_id"] = AgentID.ToString(); 504 responseData["agent_id"] = AgentID.ToString();
505 responseData["real_id"] = RealID.ToString();
496 responseData["session_id"] = SessionID.ToString(); 506 responseData["session_id"] = SessionID.ToString();
497 responseData["secure_session_id"] = SecureSessionID.ToString(); 507 responseData["secure_session_id"] = SecureSessionID.ToString();
498 responseData["circuit_code"] = CircuitCode; 508 responseData["circuit_code"] = CircuitCode;
@@ -575,6 +585,7 @@ namespace OpenSim.Services.LLLoginService
575 map["sim_ip"] = OSD.FromString(SimAddress); 585 map["sim_ip"] = OSD.FromString(SimAddress);
576 586
577 map["agent_id"] = OSD.FromUUID(AgentID); 587 map["agent_id"] = OSD.FromUUID(AgentID);
588 map["real_id"] = OSD.FromUUID(RealID);
578 map["session_id"] = OSD.FromUUID(SessionID); 589 map["session_id"] = OSD.FromUUID(SessionID);
579 map["secure_session_id"] = OSD.FromUUID(SecureSessionID); 590 map["secure_session_id"] = OSD.FromUUID(SecureSessionID);
580 map["circuit_code"] = OSD.FromInteger(CircuitCode); 591 map["circuit_code"] = OSD.FromInteger(CircuitCode);
@@ -882,6 +893,12 @@ namespace OpenSim.Services.LLLoginService
882 set { secureSessionID = value; } 893 set { secureSessionID = value; }
883 } 894 }
884 895
896 public UUID RealID
897 {
898 get { return realID; }
899 set { realID = value; }
900 }
901
885 public Int32 CircuitCode 902 public Int32 CircuitCode
886 { 903 {
887 get { return circuitCode; } 904 get { return circuitCode; }
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs
index 53a22d4..ede2353 100644
--- a/OpenSim/Services/LLLoginService/LLLoginService.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginService.cs
@@ -141,7 +141,8 @@ namespace OpenSim.Services.LLLoginService
141 Object[] args = new Object[] { config }; 141 Object[] args = new Object[] { config };
142 m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(accountService, args); 142 m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(accountService, args);
143 m_GridUserService = ServerUtils.LoadPlugin<IGridUserService>(gridUserService, args); 143 m_GridUserService = ServerUtils.LoadPlugin<IGridUserService>(gridUserService, args);
144 m_AuthenticationService = ServerUtils.LoadPlugin<IAuthenticationService>(authService, args); 144 Object[] authArgs = new Object[] { config, m_UserAccountService };
145 m_AuthenticationService = ServerUtils.LoadPlugin<IAuthenticationService>(authService, authArgs);
145 m_InventoryService = ServerUtils.LoadPlugin<IInventoryService>(invService, args); 146 m_InventoryService = ServerUtils.LoadPlugin<IInventoryService>(invService, args);
146 147
147 if (gridService != string.Empty) 148 if (gridService != string.Empty)
@@ -290,6 +291,12 @@ namespace OpenSim.Services.LLLoginService
290 return LLFailedLoginResponse.UserProblem; 291 return LLFailedLoginResponse.UserProblem;
291 } 292 }
292 293
294 if (account.UserLevel < 0)
295 {
296 m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: Unverified account");
297 return LLFailedLoginResponse.UnverifiedAccountProblem;
298 }
299
293 if (account.UserLevel < m_MinLoginLevel) 300 if (account.UserLevel < m_MinLoginLevel)
294 { 301 {
295 m_log.InfoFormat( 302 m_log.InfoFormat(
@@ -321,7 +328,8 @@ namespace OpenSim.Services.LLLoginService
321 if (!passwd.StartsWith("$1$")) 328 if (!passwd.StartsWith("$1$"))
322 passwd = "$1$" + Util.Md5Hash(passwd); 329 passwd = "$1$" + Util.Md5Hash(passwd);
323 passwd = passwd.Remove(0, 3); //remove $1$ 330 passwd = passwd.Remove(0, 3); //remove $1$
324 string token = m_AuthenticationService.Authenticate(account.PrincipalID, passwd, 30); 331 UUID realID;
332 string token = m_AuthenticationService.Authenticate(account.PrincipalID, passwd, 30, out realID);
325 UUID secureSession = UUID.Zero; 333 UUID secureSession = UUID.Zero;
326 if ((token == string.Empty) || (token != string.Empty && !UUID.TryParse(token, out secureSession))) 334 if ((token == string.Empty) || (token != string.Empty && !UUID.TryParse(token, out secureSession)))
327 { 335 {
@@ -453,7 +461,7 @@ namespace OpenSim.Services.LLLoginService
453 = new LLLoginResponse( 461 = new LLLoginResponse(
454 account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService, 462 account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService,
455 where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP, 463 where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP,
456 m_MapTileURL, m_ProfileURL, m_OpenIDURL, m_SearchURL, m_Currency, m_DSTZone); 464 m_MapTileURL, m_ProfileURL, m_OpenIDURL, m_SearchURL, m_Currency, m_DSTZone, realID);
457 465
458 m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to {0} {1}", firstName, lastName); 466 m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to {0} {1}", firstName, lastName);
459 467