aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs
diff options
context:
space:
mode:
authorTeravus Ovares (Dan Olivares)2009-09-04 04:26:14 -0400
committerTeravus Ovares (Dan Olivares)2009-09-04 04:26:14 -0400
commitd49ee1f8ab34a4328adacbedf5daec7b25d0df14 (patch)
tree771f738ab34d0a7c66ca69f31ba23d42ffab666e /OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs
parent* Make the RegionCombinerModule also register to handle permissions for the v... (diff)
parentpreparing LandData seriali(s|z)ation into OAR [not yet functional] (diff)
downloadopensim-SC_OLD-d49ee1f8ab34a4328adacbedf5daec7b25d0df14.zip
opensim-SC_OLD-d49ee1f8ab34a4328adacbedf5daec7b25d0df14.tar.gz
opensim-SC_OLD-d49ee1f8ab34a4328adacbedf5daec7b25d0df14.tar.bz2
opensim-SC_OLD-d49ee1f8ab34a4328adacbedf5daec7b25d0df14.tar.xz
Merge branch 'master' of ssh://MyConnection/var/git/opensim
Diffstat (limited to 'OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs')
-rw-r--r--OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs28
1 files changed, 17 insertions, 11 deletions
diff --git a/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs b/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs
index 83ce0d0..7fdbbf6 100644
--- a/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs
+++ b/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs
@@ -56,8 +56,24 @@ namespace OpenSim.Services.AuthenticationService
56 { 56 {
57 } 57 }
58 58
59 public string Authenticate(UUID principalID, string password) 59 public string Authenticate(UUID principalID, string password, int lifetime)
60 { 60 {
61 AuthenticationData data = m_Database.Get(principalID);
62
63 if (!data.Data.ContainsKey("passwordHash") ||
64 !data.Data.ContainsKey("passwordSalt"))
65 {
66 return String.Empty;
67 }
68
69 string hashed = Util.Md5Hash(Util.Md5Hash(password) + ":" +
70 data.Data["passwordSalt"].ToString());
71
72 if (data.Data["passwordHash"].ToString() == hashed)
73 {
74 return GetToken(principalID, lifetime);
75 }
76
61 return String.Empty; 77 return String.Empty;
62 } 78 }
63 79
@@ -65,15 +81,5 @@ namespace OpenSim.Services.AuthenticationService
65 { 81 {
66 return new byte[0]; 82 return new byte[0];
67 } 83 }
68
69 public bool Verify(UUID principalID, string token)
70 {
71 return false;
72 }
73
74 public bool VerifyEncrypted(byte[] cyphertext, byte[] key)
75 {
76 return false;
77 }
78 } 84 }
79} 85}