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