mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
Add a real_id field to the login response if impersonation is used. The wrapper
script needs this for proper logging.
This commit is contained in:
@@ -54,6 +54,13 @@ namespace OpenSim.Services.AuthenticationService
|
||||
}
|
||||
|
||||
public string Authenticate(UUID principalID, string password, int lifetime)
|
||||
{
|
||||
UUID realID;
|
||||
|
||||
return Authenticate(principalID, password, lifetime, out realID);
|
||||
}
|
||||
|
||||
public string Authenticate(UUID principalID, string password, int lifetime, out UUID realID)
|
||||
{
|
||||
AuthenticationData data = m_Database.Get(principalID);
|
||||
string result = String.Empty;
|
||||
@@ -62,7 +69,7 @@ namespace OpenSim.Services.AuthenticationService
|
||||
if (data.Data.ContainsKey("webLoginKey"))
|
||||
{
|
||||
m_log.DebugFormat("[AUTH SERVICE]: Attempting web key authentication for PrincipalID {0}", principalID);
|
||||
result = m_svcChecks["web_login_key"].Authenticate(principalID, password, lifetime);
|
||||
result = m_svcChecks["web_login_key"].Authenticate(principalID, password, lifetime, out realID);
|
||||
if (result == String.Empty)
|
||||
{
|
||||
m_log.DebugFormat("[AUTH SERVICE]: Web Login failed for PrincipalID {0}", principalID);
|
||||
@@ -71,12 +78,15 @@ namespace OpenSim.Services.AuthenticationService
|
||||
if (result == string.Empty && data.Data.ContainsKey("passwordHash") && data.Data.ContainsKey("passwordSalt"))
|
||||
{
|
||||
m_log.DebugFormat("[AUTH SERVICE]: Attempting password authentication for PrincipalID {0}", principalID);
|
||||
result = m_svcChecks["password"].Authenticate(principalID, password, lifetime);
|
||||
result = m_svcChecks["password"].Authenticate(principalID, password, lifetime, out realID);
|
||||
if (result == String.Empty)
|
||||
{
|
||||
m_log.DebugFormat("[AUTH SERVICE]: Password login failed for PrincipalID {0}", principalID);
|
||||
}
|
||||
}
|
||||
|
||||
realID = UUID.Zero;
|
||||
|
||||
if (result == string.Empty)
|
||||
{
|
||||
m_log.DebugFormat("[AUTH SERVICE]: Both password and webLoginKey-based authentication failed for PrincipalID {0}", principalID);
|
||||
@@ -89,4 +99,4 @@ namespace OpenSim.Services.AuthenticationService
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user