aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie2009-09-19 18:18:47 +0100
committerMelanie2009-09-19 18:18:47 +0100
commitf6410882a5bb3ac53e7a0434c3dcc4ecd1de8457 (patch)
treee25f71a3fcd518f9a3533224d60d47740ced88c0 /OpenSim
parentComplete the first authenticator method (diff)
downloadopensim-SC-f6410882a5bb3ac53e7a0434c3dcc4ecd1de8457.zip
opensim-SC-f6410882a5bb3ac53e7a0434c3dcc4ecd1de8457.tar.gz
opensim-SC-f6410882a5bb3ac53e7a0434c3dcc4ecd1de8457.tar.bz2
opensim-SC-f6410882a5bb3ac53e7a0434c3dcc4ecd1de8457.tar.xz
Finish the (untested) authentication connector
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/Connectors/Authentication/AuthenticationServiceConnector.cs37
1 files changed, 35 insertions, 2 deletions
diff --git a/OpenSim/Services/Connectors/Authentication/AuthenticationServiceConnector.cs b/OpenSim/Services/Connectors/Authentication/AuthenticationServiceConnector.cs
index 258b9b1..50e817e 100644
--- a/OpenSim/Services/Connectors/Authentication/AuthenticationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Authentication/AuthenticationServiceConnector.cs
@@ -106,12 +106,45 @@ namespace OpenSim.Services.Connectors
106 106
107 public bool Verify(UUID principalID, string token, int lifetime) 107 public bool Verify(UUID principalID, string token, int lifetime)
108 { 108 {
109 return false; 109 Dictionary<string, string> sendData = new Dictionary<string, string>();
110 sendData["LIFETIME"] = lifetime.ToString();
111 sendData["PRINCIPAL"] = principalID.ToString();
112 sendData["TOKEN"] = token;
113
114 sendData["METHOD"] = "verify";
115
116 string reply = SynchronousRestFormsRequester.MakeRequest("POST",
117 m_ServerURI + "/auth/plain",
118 ServerUtils.BuildQueryString(sendData));
119
120 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(
121 reply);
122
123 if (replyData["Result"].ToString() != "Success")
124 return false;
125
126 return true;
110 } 127 }
111 128
112 public bool Release(UUID principalID, string token) 129 public bool Release(UUID principalID, string token)
113 { 130 {
114 return false; 131 Dictionary<string, string> sendData = new Dictionary<string, string>();
132 sendData["PRINCIPAL"] = principalID.ToString();
133 sendData["TOKEN"] = token;
134
135 sendData["METHOD"] = "release";
136
137 string reply = SynchronousRestFormsRequester.MakeRequest("POST",
138 m_ServerURI + "/auth/plain",
139 ServerUtils.BuildQueryString(sendData));
140
141 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(
142 reply);
143
144 if (replyData["Result"].ToString() != "Success")
145 return false;
146
147 return true;
115 } 148 }
116 } 149 }
117} 150}