aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/Authorization
diff options
context:
space:
mode:
authorRob Smart2009-09-10 16:13:18 +0100
committerDiva Canto2009-09-10 17:52:42 -0700
commit953ef780c5858b70b3b2da551640c93105feb12c (patch)
treec875871ac861e7948a8f08266118c00817d64762 /OpenSim/Server/Handlers/Authorization
parentThe stubs for an authorization service, at the moment the service will always... (diff)
downloadopensim-SC_OLD-953ef780c5858b70b3b2da551640c93105feb12c.zip
opensim-SC_OLD-953ef780c5858b70b3b2da551640c93105feb12c.tar.gz
opensim-SC_OLD-953ef780c5858b70b3b2da551640c93105feb12c.tar.bz2
opensim-SC_OLD-953ef780c5858b70b3b2da551640c93105feb12c.tar.xz
adding in working functionality for the remote connector
Diffstat (limited to 'OpenSim/Server/Handlers/Authorization')
-rw-r--r--OpenSim/Server/Handlers/Authorization/AuthorizationServerGetHandler.cs37
1 files changed, 31 insertions, 6 deletions
diff --git a/OpenSim/Server/Handlers/Authorization/AuthorizationServerGetHandler.cs b/OpenSim/Server/Handlers/Authorization/AuthorizationServerGetHandler.cs
index 4e4960c..9e4c00e 100644
--- a/OpenSim/Server/Handlers/Authorization/AuthorizationServerGetHandler.cs
+++ b/OpenSim/Server/Handlers/Authorization/AuthorizationServerGetHandler.cs
@@ -55,16 +55,41 @@ namespace OpenSim.Server.Handlers.Authorization
55 public override byte[] Handle(string path, Stream request, 55 public override byte[] Handle(string path, Stream request,
56 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 56 OSHttpRequest httpRequest, OSHttpResponse httpResponse)
57 { 57 {
58 byte[] result = new byte[0]; 58 // always return success for now, this is just stub functionality
59 return SuccessResult();
60 }
61
62 private byte[] SuccessResult()
63 {
64 XmlDocument doc = new XmlDocument();
65
66 XmlNode xmlnode = doc.CreateNode(XmlNodeType.XmlDeclaration,
67 "", "");
68
69 doc.AppendChild(xmlnode);
59 70
60 string[] p = SplitParams(path); 71 XmlElement rootElement = doc.CreateElement("", "Authorization",
72 "");
61 73
62 if (p.Length == 0) 74 doc.AppendChild(rootElement);
63 return result;
64 75
65 // Process web request 76 XmlElement result = doc.CreateElement("", "Result", "");
77 result.AppendChild(doc.CreateTextNode("success"));
78
79 rootElement.AppendChild(result);
80
81 return DocToBytes(doc);
82 }
83
84 private byte[] DocToBytes(XmlDocument doc)
85 {
86 MemoryStream ms = new MemoryStream();
87 XmlTextWriter xw = new XmlTextWriter(ms, null);
88 xw.Formatting = Formatting.Indented;
89 doc.WriteTo(xw);
90 xw.Flush();
66 91
67 return result; 92 return ms.GetBuffer();
68 } 93 }
69 } 94 }
70} 95}