aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/AuthenticationService/AuthenticationServiceBase.cs
diff options
context:
space:
mode:
authorDiva Canto2010-02-20 20:13:38 -0800
committerDiva Canto2010-02-20 20:13:38 -0800
commitdf59d098b319367394bdeb898d7fd7dacd7104ec (patch)
tree04d6b7214a1773a686d6fab6f53e8ecddd6a7bf7 /OpenSim/Services/AuthenticationService/AuthenticationServiceBase.cs
parentAdded UserAccountData and auth to the SQLite connector. Compiles, runs, but a... (diff)
downloadopensim-SC-df59d098b319367394bdeb898d7fd7dacd7104ec.zip
opensim-SC-df59d098b319367394bdeb898d7fd7dacd7104ec.tar.gz
opensim-SC-df59d098b319367394bdeb898d7fd7dacd7104ec.tar.bz2
opensim-SC-df59d098b319367394bdeb898d7fd7dacd7104ec.tar.xz
SQLite connector better, but access to tables still doesn't work.
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/AuthenticationService/AuthenticationServiceBase.cs13
1 files changed, 9 insertions, 4 deletions
diff --git a/OpenSim/Services/AuthenticationService/AuthenticationServiceBase.cs b/OpenSim/Services/AuthenticationService/AuthenticationServiceBase.cs
index f6dd085..9af61a9 100644
--- a/OpenSim/Services/AuthenticationService/AuthenticationServiceBase.cs
+++ b/OpenSim/Services/AuthenticationService/AuthenticationServiceBase.cs
@@ -106,12 +106,17 @@ namespace OpenSim.Services.AuthenticationService
106 string passwordSalt = Util.Md5Hash(UUID.Random().ToString()); 106 string passwordSalt = Util.Md5Hash(UUID.Random().ToString());
107 string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + passwordSalt); 107 string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + passwordSalt);
108 108
109 AuthenticationData auth = new AuthenticationData(); 109 AuthenticationData auth = m_Database.Get(principalID);
110 auth.PrincipalID = principalID; 110 if (auth == null)
111 auth.Data = new System.Collections.Generic.Dictionary<string, object>(); 111 {
112 auth = new AuthenticationData();
113 auth.PrincipalID = principalID;
114 auth.Data = new System.Collections.Generic.Dictionary<string, object>();
115 auth.Data["accountType"] = "UserAccount";
116 auth.Data["webLoginKey"] = UUID.Zero.ToString();
117 }
112 auth.Data["passwordHash"] = md5PasswdHash; 118 auth.Data["passwordHash"] = md5PasswdHash;
113 auth.Data["passwordSalt"] = passwordSalt; 119 auth.Data["passwordSalt"] = passwordSalt;
114 auth.Data["webLoginKey"] = UUID.Zero.ToString();
115 if (!m_Database.Store(auth)) 120 if (!m_Database.Store(auth))
116 { 121 {
117 m_log.DebugFormat("[AUTHENTICATION DB]: Failed to store authentication data"); 122 m_log.DebugFormat("[AUTHENTICATION DB]: Failed to store authentication data");