diff --git a/OpenGridServices.UserServer/UserManager.cs b/OpenGridServices.UserServer/UserManager.cs
index c1e442ffcd..b5797327e5 100644
--- a/OpenGridServices.UserServer/UserManager.cs
+++ b/OpenGridServices.UserServer/UserManager.cs
@@ -126,6 +126,11 @@ namespace OpenGridServices.UserServer
return null;
}
+ ///
+ /// Loads a user agent by uuid (not called directly)
+ ///
+ /// The agents UUID
+ /// Agent profiles
public UserAgentData getUserAgent(LLUUID uuid)
{
foreach (KeyValuePair plugin in _plugins)
@@ -143,6 +148,11 @@ namespace OpenGridServices.UserServer
return null;
}
+ ///
+ /// Loads a user agent by name (not called directly)
+ ///
+ /// The agents name
+ /// A user agent
public UserAgentData getUserAgent(string name)
{
foreach (KeyValuePair plugin in _plugins)
@@ -160,6 +170,12 @@ namespace OpenGridServices.UserServer
return null;
}
+ ///
+ /// Loads a user agent by name (not called directly)
+ ///
+ /// The agents firstname
+ /// The agents lastname
+ /// A user agent
public UserAgentData getUserAgent(string fname, string lname)
{
foreach (KeyValuePair plugin in _plugins)
@@ -177,6 +193,10 @@ namespace OpenGridServices.UserServer
return null;
}
+ ///
+ /// Creates a error response caused by invalid XML
+ ///
+ /// An XMLRPC response
private static XmlRpcResponse CreateErrorConnectingToGridResponse()
{
XmlRpcResponse response = new XmlRpcResponse();
@@ -188,6 +208,10 @@ namespace OpenGridServices.UserServer
return response;
}
+ ///
+ /// Creates an error response caused by bad login credentials
+ ///
+ /// An XMLRPC response
private static XmlRpcResponse CreateLoginErrorResponse()
{
XmlRpcResponse response = new XmlRpcResponse();
@@ -199,6 +223,10 @@ namespace OpenGridServices.UserServer
return response;
}
+ ///
+ /// Creates an error response caused by being logged in already
+ ///
+ /// An XMLRPC Response
private static XmlRpcResponse CreateAlreadyLoggedInResponse()
{
XmlRpcResponse response = new XmlRpcResponse();
@@ -210,6 +238,11 @@ namespace OpenGridServices.UserServer
return response;
}
+ ///
+ /// Customises the login response and fills in missing values.
+ ///
+ /// The existing response
+ /// The user profile
public virtual void CustomiseResponse(ref Hashtable response, ref UserProfileData theUser)
{
// Load information from the gridserver
@@ -254,6 +287,12 @@ namespace OpenGridServices.UserServer
XmlRpcResponse GridResp = GridReq.Send(SimInfo.caps_url, 3000);
}
+ ///
+ /// Checks a user against it's password hash
+ ///
+ /// The users profile
+ /// The supplied password
+ /// Authenticated?
public bool AuthenticateUser(ref UserProfileData profile, string password)
{
password = password.Remove(0, 3); //remove $1$
@@ -272,6 +311,11 @@ namespace OpenGridServices.UserServer
return profile.passwordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase);
}
+ ///
+ /// Creates and initialises a new user agent - make sure to use CommitAgent when done to submit to the DB
+ ///
+ /// The users profile
+ /// The users loginrequest
public void CreateAgent(ref UserProfileData profile, XmlRpcRequest request)
{
Hashtable requestData = (Hashtable)request.Params[0];
@@ -319,12 +363,22 @@ namespace OpenGridServices.UserServer
agent.currentRegion = ""; // Fill in later
}
+ ///
+ /// Saves a target agent to the database
+ ///
+ /// The users profile
+ /// Successful?
public bool CommitAgent(ref UserProfileData profile)
{
// Saves the agent to database
return true;
}
+ ///
+ /// Main user login function
+ ///
+ /// The XMLRPC request
+ /// The response to send
public XmlRpcResponse XmlRpcLoginMethod(XmlRpcRequest request)
{
XmlRpcResponse response = new XmlRpcResponse();
@@ -487,6 +541,13 @@ namespace OpenGridServices.UserServer
}
+ ///
+ /// Deletes an active agent session
+ ///
+ /// The request
+ /// The path (eg /bork/narf/test)
+ /// Parameters sent
+ /// Success "OK" else error
public string RestDeleteUserSessionMethod(string request, string path, string param)
{
// TODO! Important!