diff --git a/OpenSim/Services/Connectors/Authentication/AuthenticationServiceConnector.cs b/OpenSim/Services/Connectors/Authentication/AuthenticationServiceConnector.cs index 258b9b14d0..50e817e064 100644 --- a/OpenSim/Services/Connectors/Authentication/AuthenticationServiceConnector.cs +++ b/OpenSim/Services/Connectors/Authentication/AuthenticationServiceConnector.cs @@ -106,12 +106,45 @@ namespace OpenSim.Services.Connectors public bool Verify(UUID principalID, string token, int lifetime) { - return false; + Dictionary sendData = new Dictionary(); + sendData["LIFETIME"] = lifetime.ToString(); + sendData["PRINCIPAL"] = principalID.ToString(); + sendData["TOKEN"] = token; + + sendData["METHOD"] = "verify"; + + string reply = SynchronousRestFormsRequester.MakeRequest("POST", + m_ServerURI + "/auth/plain", + ServerUtils.BuildQueryString(sendData)); + + Dictionary replyData = ServerUtils.ParseXmlResponse( + reply); + + if (replyData["Result"].ToString() != "Success") + return false; + + return true; } public bool Release(UUID principalID, string token) { - return false; + Dictionary sendData = new Dictionary(); + sendData["PRINCIPAL"] = principalID.ToString(); + sendData["TOKEN"] = token; + + sendData["METHOD"] = "release"; + + string reply = SynchronousRestFormsRequester.MakeRequest("POST", + m_ServerURI + "/auth/plain", + ServerUtils.BuildQueryString(sendData)); + + Dictionary replyData = ServerUtils.ParseXmlResponse( + reply); + + if (replyData["Result"].ToString() != "Success") + return false; + + return true; } } }