From c313de630f2fec6793da2bc1f51dd54be82cb3e8 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 15 Aug 2012 23:31:38 +0200 Subject: Add a real_id field to the login response if impersonation is used. The wrapper script needs this for proper logging. --- .../AuthenticationService/PasswordAuthenticationService.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs') diff --git a/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs b/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs index 769c3c2..9d12d47 100644 --- a/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs +++ b/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs @@ -64,6 +64,15 @@ 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) + { + realID = UUID.Zero; + m_log.DebugFormat("[AUTH SERVICE]: Authenticating for {0}, user account service present: {1}", principalID, m_UserAccountService != null); AuthenticationData data = m_Database.Get(principalID); UserAccount user = null; @@ -127,6 +136,7 @@ namespace OpenSim.Services.AuthenticationService if (data.Data["passwordHash"].ToString() == hashed) { m_log.DebugFormat("[PASS AUTH]: {0} {1} impersonating {2}, proceeding with login", a.FirstName, a.LastName, principalID); + realID = a.PrincipalID; return GetToken(principalID, lifetime); } // else -- cgit v1.1