aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenGrid.Framework.Manager/GridManagementAgent.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/OpenGrid.Framework.Manager/GridManagementAgent.cs b/OpenGrid.Framework.Manager/GridManagementAgent.cs
index dca7a4a..c8e2cfd 100644
--- a/OpenGrid.Framework.Manager/GridManagementAgent.cs
+++ b/OpenGrid.Framework.Manager/GridManagementAgent.cs
@@ -1,6 +1,8 @@
1using Nwc.XmlRpc; 1using Nwc.XmlRpc;
2using OpenSim.Framework; 2using OpenSim.Framework;
3using OpenSim.Servers; 3using OpenSim.Servers;
4using System.Collections;
5using System.Collections.Generic;
4 6
5namespace OpenGrid.Framework.Manager { 7namespace OpenGrid.Framework.Manager {
6 8
@@ -20,6 +22,8 @@ namespace OpenGrid.Framework.Manager {
20 this.component_type=component_type; 22 this.component_type=component_type;
21 this.thecallback=thecallback; 23 this.thecallback=thecallback;
22 24
25 app_httpd.AddXmlRPCHandler("manager_login",XmlRpcLoginMethod);
26
23 switch(component_type) 27 switch(component_type)
24 { 28 {
25 case "gridserver": 29 case "gridserver":
@@ -31,5 +35,25 @@ namespace OpenGrid.Framework.Manager {
31 } 35 }
32 } 36 }
33 37
38 public static XmlRpcResponse XmlRpcLoginMethod(XmlRpcRequest request)
39 {
40 XmlRpcResponse response = new XmlRpcResponse();
41 Hashtable requestData = (Hashtable)request.Params[0];
42 Hashtable responseData = new Hashtable();
43
44 // TODO: Switch this over to using OpenGrid.Framework.Data
45 if( requestData["username"].Equals("admin") && requestData["password"].Equals("supersecret")) {
46 response.IsFault=false;
47 responseData["msg"]="Login OK";
48 } else {
49 response.IsFault=true;
50 responseData["error"]="Invalid username or password";
51 }
52
53 response.Value = responseData;
54 return response;
55
56 }
57
34 } 58 }
35} 59}