mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
Fully implement unencrypted auth token operations
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user