From ac40c7a74c15e0f61ba5bfcb4c6a6fb39993a87c Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 4 Sep 2009 07:48:09 +0100 Subject: Fully implement unencrypted auth token operations --- .../AuthenticationService/AuthenticationServiceBase.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/AuthenticationService/AuthenticationServiceBase.cs b/OpenSim/Services/AuthenticationService/AuthenticationServiceBase.cs index dab0598..5056db3 100644 --- a/OpenSim/Services/AuthenticationService/AuthenticationServiceBase.cs +++ b/OpenSim/Services/AuthenticationService/AuthenticationServiceBase.cs @@ -97,7 +97,7 @@ namespace OpenSim.Services.AuthenticationService public bool Verify(UUID principalID, string token, int lifetime) { - return false; + return m_Database.CheckToken(principalID, token, lifetime); } public bool VerifyEncrypted(byte[] cyphertext, byte[] key) @@ -107,7 +107,7 @@ namespace OpenSim.Services.AuthenticationService public virtual bool Release(UUID principalID, string token) { - return false; + return m_Database.CheckToken(principalID, token, 0); } public virtual bool ReleaseEncrypted(byte[] cyphertext, byte[] key) @@ -117,7 +117,12 @@ namespace OpenSim.Services.AuthenticationService protected string GetToken(UUID principalID, int lifetime) { - return "OK"; + UUID token = UUID.Random(); + + if (m_Database.SetToken(principalID, token.ToString(), lifetime)) + return token.ToString(); + + return String.Empty; } } } -- cgit v1.1