Better error handling on PasswordAuthenticationService
parent
13f0e4a718
commit
d167686adb
|
@ -47,9 +47,9 @@ namespace OpenSim.Services.AuthenticationService
|
|||
public class PasswordAuthenticationService :
|
||||
AuthenticationServiceBase, IAuthenticationService
|
||||
{
|
||||
//private static readonly ILog m_log =
|
||||
// LogManager.GetLogger(
|
||||
// MethodBase.GetCurrentMethod().DeclaringType);
|
||||
private static readonly ILog m_log =
|
||||
LogManager.GetLogger(
|
||||
MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public PasswordAuthenticationService(IConfigSource config) :
|
||||
base(config)
|
||||
|
@ -60,6 +60,8 @@ namespace OpenSim.Services.AuthenticationService
|
|||
{
|
||||
AuthenticationData data = m_Database.Get(principalID);
|
||||
|
||||
if (data != null && data.Data != null)
|
||||
{
|
||||
if (!data.Data.ContainsKey("passwordHash") ||
|
||||
!data.Data.ContainsKey("passwordSalt"))
|
||||
{
|
||||
|
@ -75,7 +77,9 @@ namespace OpenSim.Services.AuthenticationService
|
|||
{
|
||||
return GetToken(principalID, lifetime);
|
||||
}
|
||||
}
|
||||
|
||||
m_log.DebugFormat("[AUTH SERVICE]: PrincipalID {0} or its data not found", principalID);
|
||||
return String.Empty;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue