diff options
author | Melanie | 2009-09-04 07:48:09 +0100 |
---|---|---|
committer | Melanie | 2009-09-04 07:48:09 +0100 |
commit | ac40c7a74c15e0f61ba5bfcb4c6a6fb39993a87c (patch) | |
tree | cc15d7ddc6423775d14b7d829400e6cf14e730e5 /OpenSim/Services/AuthenticationService | |
parent | Merge branch 'master' of ssh://melanie@opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-ac40c7a74c15e0f61ba5bfcb4c6a6fb39993a87c.zip opensim-SC-ac40c7a74c15e0f61ba5bfcb4c6a6fb39993a87c.tar.gz opensim-SC-ac40c7a74c15e0f61ba5bfcb4c6a6fb39993a87c.tar.bz2 opensim-SC-ac40c7a74c15e0f61ba5bfcb4c6a6fb39993a87c.tar.xz |
Fully implement unencrypted auth token operations
Diffstat (limited to 'OpenSim/Services/AuthenticationService')
-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 | } |