From 03438f7d449a09e28dcb1543b2075d70b2573ffc Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 23 Sep 2009 16:24:26 +0100
Subject: minor: remove double initialization of user appearance module in
Grid.UserServer.Main
---
OpenSim/Grid/UserServer/Main.cs | 4 ----
1 file changed, 4 deletions(-)
(limited to 'OpenSim/Grid')
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs
index baf0fd3..a92226d 100644
--- a/OpenSim/Grid/UserServer/Main.cs
+++ b/OpenSim/Grid/UserServer/Main.cs
@@ -260,8 +260,6 @@ namespace OpenSim.Grid.UserServer
m_userManager.PostInitialise();
m_avatarAppearanceModule.PostInitialise();
m_friendsModule.PostInitialise();
-
- m_avatarAppearanceModule.PostInitialise();
}
protected virtual void RegisterHttpHandlers()
@@ -276,8 +274,6 @@ namespace OpenSim.Grid.UserServer
m_avatarAppearanceModule.RegisterHandlers(m_httpServer);
m_messagesService.RegisterHandlers(m_httpServer);
m_gridInfoService.RegisterHandlers(m_httpServer);
-
- m_avatarAppearanceModule.RegisterHandlers(m_httpServer);
}
public override void ShutdownSpecific()
--
cgit v1.1
From 7870152d23db4cb6f5834d4921fac17feb717220 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 24 Sep 2009 14:54:12 +0100
Subject: Allow load/save iar password checks to be done in grid mode This
should allow load/save iar to work for grid mode as long as the grid user
service is later than this revision Grid services of earlier revisions will
always erroneously report incorrect password. This will be addressed
shortly.
---
OpenSim/Grid/UserServer.Modules/UserManager.cs | 56 +++++++++++++++++++++++++-
1 file changed, 55 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Grid')
diff --git a/OpenSim/Grid/UserServer.Modules/UserManager.cs b/OpenSim/Grid/UserServer.Modules/UserManager.cs
index 002f232..bc19ac8 100644
--- a/OpenSim/Grid/UserServer.Modules/UserManager.cs
+++ b/OpenSim/Grid/UserServer.Modules/UserManager.cs
@@ -108,6 +108,9 @@ namespace OpenSim.Grid.UserServer.Modules
m_httpServer.AddXmlRPCHandler("get_user_by_uuid", XmlRPCGetUserMethodUUID);
m_httpServer.AddXmlRPCHandler("get_avatar_picker_avatar", XmlRPCGetAvatarPickerAvatar);
+ // Used by IAR module to do password checks
+ //m_httpServer.AddXmlRPCHandler("authenticate_user_by_password", XmlRPCAuthenticateUserMethodPassword);
+
m_httpServer.AddXmlRPCHandler("update_user_current_region", XmlRPCAtRegion);
m_httpServer.AddXmlRPCHandler("logout_of_simulator", XmlRPCLogOffUserMethodUUID);
m_httpServer.AddXmlRPCHandler("get_agent_by_uuid", XmlRPCGetAgentMethodUUID);
@@ -203,6 +206,57 @@ namespace OpenSim.Grid.UserServer.Modules
#region XMLRPC User Methods
+ ///
+ /// Authenticate a user using their password
+ ///
+ /// Must contain values for "user_uuid" and "password" keys
+ ///
+ ///
+ public XmlRpcResponse XmlRPCAuthenticateUserMethodPassword(XmlRpcRequest request, IPEndPoint remoteClient)
+ {
+// m_log.DebugFormat("[USER MANAGER]: Received authenticated user by password request from {0}", remoteClient);
+
+ Hashtable requestData = (Hashtable)request.Params[0];
+ string userUuidRaw = (string)requestData["user_uuid"];
+ string password = (string)requestData["password"];
+
+ if (null == userUuidRaw)
+ return Util.CreateUnknownUserErrorResponse();
+
+ UUID userUuid;
+ if (!UUID.TryParse(userUuidRaw, out userUuid))
+ return Util.CreateUnknownUserErrorResponse();
+
+ UserProfileData userProfile = m_userDataBaseService.GetUserProfile(userUuid);
+ if (null == userProfile)
+ return Util.CreateUnknownUserErrorResponse();
+
+ string authed;
+
+ if (null == password)
+ {
+ authed = "FALSE";
+ }
+ else
+ {
+ if (m_userDataBaseService.AuthenticateUserByPassword(userUuid, password))
+ authed = "TRUE";
+ else
+ authed = "FALSE";
+ }
+
+// m_log.DebugFormat(
+// "[USER MANAGER]: Authentication by password result from {0} for {1} is {2}",
+// remoteClient, userUuid, authed);
+
+ XmlRpcResponse response = new XmlRpcResponse();
+ Hashtable responseData = new Hashtable();
+ responseData["auth_user"] = authed;
+ response.Value = responseData;
+
+ return response;
+ }
+
public XmlRpcResponse XmlRPCGetAvatarPickerAvatar(XmlRpcRequest request, IPEndPoint remoteClient)
{
// XmlRpcResponse response = new XmlRpcResponse();
@@ -246,10 +300,10 @@ namespace OpenSim.Grid.UserServer.Modules
m_userDataBaseService.CommitAgent(ref userProfile);
//setUserProfile(userProfile);
-
returnstring = "TRUE";
}
}
+
responseData.Add("returnString", returnstring);
response.Value = responseData;
return response;
--
cgit v1.1
From e1abc3d4c49ae4068faf7b8d1dcb220829429757 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 24 Sep 2009 15:22:47 +0100
Subject: re-enable registration of user service authentication method I
accidentally disabled a few commits ago load/save iar on a grid should now
work, provided that the user service is this revision or newer
---
OpenSim/Grid/UserServer.Modules/UserManager.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Grid')
diff --git a/OpenSim/Grid/UserServer.Modules/UserManager.cs b/OpenSim/Grid/UserServer.Modules/UserManager.cs
index bc19ac8..efbf45e 100644
--- a/OpenSim/Grid/UserServer.Modules/UserManager.cs
+++ b/OpenSim/Grid/UserServer.Modules/UserManager.cs
@@ -109,7 +109,7 @@ namespace OpenSim.Grid.UserServer.Modules
m_httpServer.AddXmlRPCHandler("get_avatar_picker_avatar", XmlRPCGetAvatarPickerAvatar);
// Used by IAR module to do password checks
- //m_httpServer.AddXmlRPCHandler("authenticate_user_by_password", XmlRPCAuthenticateUserMethodPassword);
+ m_httpServer.AddXmlRPCHandler("authenticate_user_by_password", XmlRPCAuthenticateUserMethodPassword);
m_httpServer.AddXmlRPCHandler("update_user_current_region", XmlRPCAtRegion);
m_httpServer.AddXmlRPCHandler("logout_of_simulator", XmlRPCLogOffUserMethodUUID);
--
cgit v1.1