* Just for the heck of it - added a UUID based equivilent too.

Sugilite
Adam Frisby 2007-06-09 01:27:02 +00:00
parent 26b208d738
commit 0a600b2dbf
2 changed files with 15 additions and 0 deletions

View File

@ -106,7 +106,10 @@ namespace OpenGridServices.UserServer
BaseHttpServer httpServer = new BaseHttpServer(8002); BaseHttpServer httpServer = new BaseHttpServer(8002);
httpServer.AddXmlRPCHandler("login_to_simulator", m_userManager.XmlRpcLoginMethod); httpServer.AddXmlRPCHandler("login_to_simulator", m_userManager.XmlRpcLoginMethod);
httpServer.AddRestHandler("GET", "/user/name/", m_userManager.RestGetUserMethodName); httpServer.AddRestHandler("GET", "/user/name/", m_userManager.RestGetUserMethodName);
httpServer.AddRestHandler("GET", "/user/uuid/", m_userManager.RestGetUserMethodUUID);
httpServer.AddRestHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod); httpServer.AddRestHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod);
httpServer.Start(); httpServer.Start();

View File

@ -706,5 +706,17 @@ namespace OpenGridServices.UserServer
return ProfileToXml(userProfile); return ProfileToXml(userProfile);
} }
public string RestGetUserMethodUUID(string request, string path, string param)
{
UserProfileData userProfile = getUserProfile(new LLUUID(param));
if (userProfile == null)
{
return CreateUnknownUserErrorResponse();
}
return ProfileToXml(userProfile);
}
} }
} }