From 3f4be42a87f77d5da7e6cafd4fb98ff6a502636d Mon Sep 17 00:00:00 2001 From: SignpostMarv Martin Date: Thu, 24 Mar 2011 16:46:21 +0000 Subject: [PATCH] Altering log feedback --- .../WebkeyAuthenticationService.cs | 23 ++++++++++--------- .../WebkeyOrPasswordAuthenticationService.cs | 8 ++++--- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs b/OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs index 59240264e6..2344c0ed4e 100644 --- a/OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs +++ b/OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs @@ -57,10 +57,9 @@ namespace OpenSim.Services.AuthenticationService public string Authenticate(UUID principalID, string password, int lifetime) { - m_log.InfoFormat("[Authenticate]: Trying a web key authenticate"); if (new UUID(password) == UUID.Zero) { - m_log.InfoFormat("[Authenticate]: NULL_KEY is not a valid web_login_key"); + m_log.DebugFormat("[AUTH SERVICE]: UUID.Zero is not a valid web_login_key on PrincipalID {0}", principalID); } else { @@ -69,17 +68,19 @@ namespace OpenSim.Services.AuthenticationService { if (data.Data.ContainsKey("webLoginKey")) { - m_log.InfoFormat("[Authenticate]: Trying a web key authentication"); string key = data.Data["webLoginKey"].ToString(); - m_log.DebugFormat("[WEB LOGIN AUTH]: got {0} for key in db vs {1}", key, password); - if (key == password) - { - data.Data["webLoginKey"] = UUID.Zero.ToString(); - m_Database.Store(data); - return GetToken(principalID, lifetime); - } + if (key == password) + { + data.Data["webLoginKey"] = UUID.Zero.ToString(); + m_Database.Store(data); + return GetToken(principalID, lifetime); + } + else + { + m_log.DebugFormat("[AUTH SERVICE]: web login auth failed, got PrincipalID {0} gave {1} instead of {2}", principalID, password, key); + } }else{ - m_log.DebugFormat("[Authenticate]: no col webLoginKey in passwd.db"); + m_log.DebugFormat("[AUTH SERVICE]: no col webLoginKey in passwd.db"); } } m_log.DebugFormat("[AUTH SERVICE]: PrincipalID {0} or its data not found", principalID); diff --git a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs index 3a47e97de6..c315ef2bd8 100644 --- a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs +++ b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs @@ -32,25 +32,27 @@ namespace OpenSim.Services.AuthenticationService { if (data.Data.ContainsKey("webLoginKey")) { + m_log.DebugFormat("[AUTH SERVICE]: Attempting web key authentication for PrincipalID {0}", principalID); svc = ServerUtils.LoadPlugin("OpenSim.Services.AuthenticationService.dll", "WebkeyAuthenticationService", args); result = svc.Authenticate(principalID, password, lifetime); if (result == String.Empty) { - m_log.DebugFormat("[Authenticate]: Web Login failed for PrincipalID {0}", principalID); + m_log.DebugFormat("[AUTH SERVICE]: Web Login failed for PrincipalID {0}", principalID); } } if (result == string.Empty && data.Data.ContainsKey("passwordHash") && data.Data.ContainsKey("passwordSalt")) { + m_log.DebugFormat("[AUTH SERVICE]: Attempting password authentication for PrincipalID {0}", principalID); svc = ServerUtils.LoadPlugin("OpenSim.Services.AuthenticationService.dll", "PasswordAuthenticationService", args); result = svc.Authenticate(principalID, password, lifetime); if (result == String.Empty) { - m_log.DebugFormat("[Authenticate]: Password login failed for PrincipalID {0}", principalID); + m_log.DebugFormat("[AUTH SERVICE]: Password login failed for PrincipalID {0}", principalID); } } if (result == string.Empty) { - m_log.DebugFormat("[AUTH SERVICE]: Both password and webLoginKey-based login failed for PrincipalID {0}", principalID); + m_log.DebugFormat("[AUTH SERVICE]: Both password and webLoginKey-based authentication failed for PrincipalID {0}", principalID); } } else