diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Services/AuthenticationService/AuthenticationServiceBase.cs | 11 |
1 files changed, 8 insertions, 3 deletions
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 | |||
97 | 97 | ||
98 | public bool Verify(UUID principalID, string token, int lifetime) | 98 | public bool Verify(UUID principalID, string token, int lifetime) |
99 | { | 99 | { |
100 | return false; | 100 | return m_Database.CheckToken(principalID, token, lifetime); |
101 | } | 101 | } |
102 | 102 | ||
103 | public bool VerifyEncrypted(byte[] cyphertext, byte[] key) | 103 | public bool VerifyEncrypted(byte[] cyphertext, byte[] key) |
@@ -107,7 +107,7 @@ namespace OpenSim.Services.AuthenticationService | |||
107 | 107 | ||
108 | public virtual bool Release(UUID principalID, string token) | 108 | public virtual bool Release(UUID principalID, string token) |
109 | { | 109 | { |
110 | return false; | 110 | return m_Database.CheckToken(principalID, token, 0); |
111 | } | 111 | } |
112 | 112 | ||
113 | public virtual bool ReleaseEncrypted(byte[] cyphertext, byte[] key) | 113 | public virtual bool ReleaseEncrypted(byte[] cyphertext, byte[] key) |
@@ -117,7 +117,12 @@ namespace OpenSim.Services.AuthenticationService | |||
117 | 117 | ||
118 | protected string GetToken(UUID principalID, int lifetime) | 118 | protected string GetToken(UUID principalID, int lifetime) |
119 | { | 119 | { |
120 | return "OK"; | 120 | UUID token = UUID.Random(); |
121 | |||
122 | if (m_Database.SetToken(principalID, token.ToString(), lifetime)) | ||
123 | return token.ToString(); | ||
124 | |||
125 | return String.Empty; | ||
121 | } | 126 | } |
122 | } | 127 | } |
123 | } | 128 | } |