diff options
-rw-r--r-- | OpenSim/Services/Connectors/Authentication/AuthenticationServiceConnector.cs | 37 |
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 | } |