diff options
Diffstat (limited to 'OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs')
-rw-r--r-- | OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs index 2c6cebd..7fbf36d 100644 --- a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs +++ b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs | |||
@@ -55,6 +55,13 @@ namespace OpenSim.Services.AuthenticationService | |||
55 | 55 | ||
56 | public string Authenticate(UUID principalID, string password, int lifetime) | 56 | public string Authenticate(UUID principalID, string password, int lifetime) |
57 | { | 57 | { |
58 | UUID realID; | ||
59 | |||
60 | return Authenticate(principalID, password, lifetime, out realID); | ||
61 | } | ||
62 | |||
63 | public string Authenticate(UUID principalID, string password, int lifetime, out UUID realID) | ||
64 | { | ||
58 | AuthenticationData data = m_Database.Get(principalID); | 65 | AuthenticationData data = m_Database.Get(principalID); |
59 | string result = String.Empty; | 66 | string result = String.Empty; |
60 | if (data != null && data.Data != null) | 67 | if (data != null && data.Data != null) |
@@ -62,7 +69,7 @@ namespace OpenSim.Services.AuthenticationService | |||
62 | if (data.Data.ContainsKey("webLoginKey")) | 69 | if (data.Data.ContainsKey("webLoginKey")) |
63 | { | 70 | { |
64 | m_log.DebugFormat("[AUTH SERVICE]: Attempting web key authentication for PrincipalID {0}", principalID); | 71 | m_log.DebugFormat("[AUTH SERVICE]: Attempting web key authentication for PrincipalID {0}", principalID); |
65 | result = m_svcChecks["web_login_key"].Authenticate(principalID, password, lifetime); | 72 | result = m_svcChecks["web_login_key"].Authenticate(principalID, password, lifetime, out realID); |
66 | if (result == String.Empty) | 73 | if (result == String.Empty) |
67 | { | 74 | { |
68 | m_log.DebugFormat("[AUTH SERVICE]: Web Login failed for PrincipalID {0}", principalID); | 75 | m_log.DebugFormat("[AUTH SERVICE]: Web Login failed for PrincipalID {0}", principalID); |
@@ -71,12 +78,15 @@ namespace OpenSim.Services.AuthenticationService | |||
71 | if (result == string.Empty && data.Data.ContainsKey("passwordHash") && data.Data.ContainsKey("passwordSalt")) | 78 | if (result == string.Empty && data.Data.ContainsKey("passwordHash") && data.Data.ContainsKey("passwordSalt")) |
72 | { | 79 | { |
73 | m_log.DebugFormat("[AUTH SERVICE]: Attempting password authentication for PrincipalID {0}", principalID); | 80 | m_log.DebugFormat("[AUTH SERVICE]: Attempting password authentication for PrincipalID {0}", principalID); |
74 | result = m_svcChecks["password"].Authenticate(principalID, password, lifetime); | 81 | result = m_svcChecks["password"].Authenticate(principalID, password, lifetime, out realID); |
75 | if (result == String.Empty) | 82 | if (result == String.Empty) |
76 | { | 83 | { |
77 | m_log.DebugFormat("[AUTH SERVICE]: Password login failed for PrincipalID {0}", principalID); | 84 | m_log.DebugFormat("[AUTH SERVICE]: Password login failed for PrincipalID {0}", principalID); |
78 | } | 85 | } |
79 | } | 86 | } |
87 | |||
88 | realID = UUID.Zero; | ||
89 | |||
80 | if (result == string.Empty) | 90 | if (result == string.Empty) |
81 | { | 91 | { |
82 | m_log.DebugFormat("[AUTH SERVICE]: Both password and webLoginKey-based authentication failed for PrincipalID {0}", principalID); | 92 | m_log.DebugFormat("[AUTH SERVICE]: Both password and webLoginKey-based authentication failed for PrincipalID {0}", principalID); |
@@ -89,4 +99,4 @@ namespace OpenSim.Services.AuthenticationService | |||
89 | return result; | 99 | return result; |
90 | } | 100 | } |
91 | } | 101 | } |
92 | } \ No newline at end of file | 102 | } |