From d3a20a1e9257ecec417e219ebaf079370015f06d Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 21 Mar 2011 21:37:06 +0000 Subject: On initial region registration, if the user chooses the option to make the region part of an existing estate, then list the existing region names. --- OpenSim/Services/Connectors/Simulation/EstateDataService.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/Connectors/Simulation/EstateDataService.cs b/OpenSim/Services/Connectors/Simulation/EstateDataService.cs index b6df5a2..d0588bf 100644 --- a/OpenSim/Services/Connectors/Simulation/EstateDataService.cs +++ b/OpenSim/Services/Connectors/Simulation/EstateDataService.cs @@ -90,6 +90,11 @@ namespace OpenSim.Services.Connectors { return m_database.LoadEstateSettings(estateID); } + + public List LoadEstateSettingsAll() + { + return m_database.LoadEstateSettingsAll(); + } public void StoreEstateSettings(EstateSettings es) { @@ -100,6 +105,11 @@ namespace OpenSim.Services.Connectors { return m_database.GetEstates(search); } + + public List GetEstatesAll() + { + return m_database.GetEstatesAll(); + } public bool LinkRegion(UUID regionID, int estateID) { -- cgit v1.1 From 482686daab055d4d2d878b238059b442e64122f4 Mon Sep 17 00:00:00 2001 From: SignpostMarv Martin Date: Tue, 15 Mar 2011 10:29:24 +0000 Subject: WebkeyAuthenticationService is now no longer a stub! Signed-off-by: SignpostMarv Martin --- .../WebkeyAuthenticationService.cs | 40 +++++++++++++++++++--- 1 file changed, 35 insertions(+), 5 deletions(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs b/OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs index d1a5b0f..a072958 100644 --- a/OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs +++ b/OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs @@ -31,6 +31,9 @@ using OpenSim.Services.Interfaces; using log4net; using Nini.Config; using System.Reflection; +using OpenSim.Data; +using OpenSim.Framework; +using OpenSim.Framework.Console; namespace OpenSim.Services.AuthenticationService { @@ -43,17 +46,44 @@ namespace OpenSim.Services.AuthenticationService public class WebkeyAuthenticationService : 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 WebkeyAuthenticationService(IConfigSource config) : - base(config) + base(config) { } public string Authenticate(UUID principalID, string password, int lifetime) { + m_log.InfoFormat("[Authenticate]: Trying a web key authenticate"); + if (new UUID(password) == UUID.Zero) + { + m_log.InfoFormat("[Authenticate]: NULL_KEY is not a valid web_login_key"); + } + else + { + AuthenticationData data = m_Database.Get(principalID); + if (data != null && data.Data != null) + { + if (data.Data.ContainsKey("webLoginKey")) + { + m_log.InfoFormat("[Authenticate]: Trying a web key authentication"); + string key = data.Data["webLoginKey"].ToString(); + m_log.DebugFormat("[WEB LOGIN AUTH]: got {0} for key in db vs {1}", key, password); + if (key == password) + { + data.Data["webLoginKey"] = UUID.Zero.ToString(); + m_Database.Store(data); + return GetToken(principalID, lifetime); + } + }else{ + m_log.InfoFormat("[Authenticate]: no col webLoginKey in passwd.db"); + } + } + m_log.DebugFormat("[AUTH SERVICE]: PrincipalID {0} or its data not found", principalID); + } return String.Empty; } } -- cgit v1.1 From af3956348fc58613948889e5f85030a454684970 Mon Sep 17 00:00:00 2001 From: SignpostMarv Martin Date: Tue, 15 Mar 2011 10:29:42 +0000 Subject: Adding a combined auth service, allowing users to login with either web login or password Signed-off-by: SignpostMarv Martin --- .../WebkeyOrPasswordAuthenticationService.cs | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs new file mode 100644 index 0000000..0f2fd93 --- /dev/null +++ b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs @@ -0,0 +1,65 @@ +using System; +using System.Collections.Generic; +using OpenMetaverse; +using OpenSim.Services.Interfaces; +using log4net; +using Nini.Config; +using System.Reflection; +using OpenSim.Data; +using OpenSim.Framework; +using OpenSim.Framework.Console; + +namespace OpenSim.Services.AuthenticationService +{ + public class WebkeyOrPasswordAuthenticationService : AuthenticationServiceBase, IAuthenticationService + { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + public WebkeyOrPasswordAuthenticationService(IConfigSource config) + : base(config) + { + } + + public string Authenticate(UUID principalID, string password, int lifetime) + { + AuthenticationData data = m_Database.Get(principalID); + if (data != null && data.Data != null) + { + if (data.Data.ContainsKey("webLoginKey")) + { + m_log.InfoFormat("[Authenticate]: Trying a web key authentication"); + if (new UUID(password) == UUID.Zero) + { + m_log.InfoFormat("[Authenticate]: NULL_KEY is not a valid web_login_key"); + } + else + { + string key = data.Data["webLoginKey"].ToString(); + m_log.DebugFormat("[WEB LOGIN AUTH]: got {0} for key in db vs {1}", key, password); + if (key == password) + { + data.Data["webLoginKey"] = UUID.Zero.ToString(); + m_Database.Store(data); + return GetToken(principalID, lifetime); + } + } + } + if (data.Data.ContainsKey("passwordHash") && data.Data.ContainsKey("passwordSalt")) + { + m_log.InfoFormat("[Authenticate]: Trying a password authentication"); + string hashed = Util.Md5Hash(password + ":" + data.Data["passwordSalt"].ToString()); + m_log.DebugFormat("[PASS AUTH]: got {0}; hashed = {1}; stored = {2}", password, hashed, data.Data["passwordHash"].ToString()); + if (data.Data["passwordHash"].ToString() == hashed) + { + return GetToken(principalID, lifetime); + } + } + m_log.DebugFormat("[AUTH SERVICE]: Both password and webLoginKey-based login failed for PrincipalID {0}", principalID); + } + else + { + m_log.DebugFormat("[AUTH SERVICE]: PrincipalID {0} or its data not found", principalID); + } + return string.Empty; + } + } +} -- cgit v1.1 From 0e808950fbb54271d478d29669bf035949731114 Mon Sep 17 00:00:00 2001 From: SignpostMarv Martin Date: Mon, 21 Mar 2011 14:47:10 +0000 Subject: InfoFormat > DebugFormat Signed-off-by: SignpostMarv Martin --- OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs b/OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs index a072958..5924026 100644 --- a/OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs +++ b/OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs @@ -79,7 +79,7 @@ namespace OpenSim.Services.AuthenticationService return GetToken(principalID, lifetime); } }else{ - m_log.InfoFormat("[Authenticate]: no col webLoginKey in passwd.db"); + m_log.DebugFormat("[Authenticate]: no col webLoginKey in passwd.db"); } } m_log.DebugFormat("[AUTH SERVICE]: PrincipalID {0} or its data not found", principalID); -- cgit v1.1 From 3bc859a834c50634281df3d52166fc68d7c3c3ba Mon Sep 17 00:00:00 2001 From: SignpostMarv Martin Date: Mon, 21 Mar 2011 15:42:57 +0000 Subject: Making combined auth service re-use the existing auth services instead of duplicating code Signed-off-by: SignpostMarv Martin --- .../WebkeyOrPasswordAuthenticationService.cs | 40 ++++++++++------------ 1 file changed, 19 insertions(+), 21 deletions(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs index 0f2fd93..b8bb090 100644 --- a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs +++ b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs @@ -8,58 +8,56 @@ using System.Reflection; using OpenSim.Data; using OpenSim.Framework; using OpenSim.Framework.Console; +using OpenSim.Server.Base; namespace OpenSim.Services.AuthenticationService { public class WebkeyOrPasswordAuthenticationService : AuthenticationServiceBase, IAuthenticationService { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private IConfigSource config; public WebkeyOrPasswordAuthenticationService(IConfigSource config) : base(config) { + this.config = config; } public string Authenticate(UUID principalID, string password, int lifetime) { AuthenticationData data = m_Database.Get(principalID); + IAuthenticationService svc; + Object[] args = new Object[] { config }; + string result = String.Empty; if (data != null && data.Data != null) { if (data.Data.ContainsKey("webLoginKey")) { - m_log.InfoFormat("[Authenticate]: Trying a web key authentication"); - if (new UUID(password) == UUID.Zero) + svc = ServerUtils.LoadPlugin("OpenSim.Services.AuthenticationService.dll", "WebkeyAuthenticationService", args); + result = svc.Authenticate(principalID, password, lifetime); + if (result == String.Empty) { - m_log.InfoFormat("[Authenticate]: NULL_KEY is not a valid web_login_key"); - } - else - { - string key = data.Data["webLoginKey"].ToString(); - m_log.DebugFormat("[WEB LOGIN AUTH]: got {0} for key in db vs {1}", key, password); - if (key == password) - { - data.Data["webLoginKey"] = UUID.Zero.ToString(); - m_Database.Store(data); - return GetToken(principalID, lifetime); - } + m_log.DebugFormat("[Authenticate]: Web Login failed for PrincipalID {0}", principalID); } } if (data.Data.ContainsKey("passwordHash") && data.Data.ContainsKey("passwordSalt")) { - m_log.InfoFormat("[Authenticate]: Trying a password authentication"); - string hashed = Util.Md5Hash(password + ":" + data.Data["passwordSalt"].ToString()); - m_log.DebugFormat("[PASS AUTH]: got {0}; hashed = {1}; stored = {2}", password, hashed, data.Data["passwordHash"].ToString()); - if (data.Data["passwordHash"].ToString() == hashed) + svc = ServerUtils.LoadPlugin("OpenSim.Services.AuthenticationService.dll", "PasswordAuthenticationService", args); + result = svc.Authenticate(principalID, password, lifetime); + if (result == String.Empty) { - return GetToken(principalID, lifetime); + m_log.DebugFormat("[Authenticate]: Password login failed for PrincipalID {0}", principalID); } } - m_log.DebugFormat("[AUTH SERVICE]: Both password and webLoginKey-based login failed for PrincipalID {0}", principalID); + if (result == string.Empty) + { + m_log.DebugFormat("[AUTH SERVICE]: Both password and webLoginKey-based login failed for PrincipalID {0}", principalID); + } } else { m_log.DebugFormat("[AUTH SERVICE]: PrincipalID {0} or its data not found", principalID); } - return string.Empty; + return result; } } } -- cgit v1.1 From e93531e1240348f18abb4ef88a0def227026e8f3 Mon Sep 17 00:00:00 2001 From: SignpostMarv Martin Date: Thu, 24 Mar 2011 16:21:12 +0000 Subject: Fixing bug that occurs when using web login- the result was not checked --- .../AuthenticationService/WebkeyOrPasswordAuthenticationService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs index b8bb090..3a47e97 100644 --- a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs +++ b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs @@ -39,7 +39,7 @@ namespace OpenSim.Services.AuthenticationService m_log.DebugFormat("[Authenticate]: Web Login failed for PrincipalID {0}", principalID); } } - if (data.Data.ContainsKey("passwordHash") && data.Data.ContainsKey("passwordSalt")) + if (result == string.Empty && data.Data.ContainsKey("passwordHash") && data.Data.ContainsKey("passwordSalt")) { svc = ServerUtils.LoadPlugin("OpenSim.Services.AuthenticationService.dll", "PasswordAuthenticationService", args); result = svc.Authenticate(principalID, password, lifetime); -- cgit v1.1 From 3f4be42a87f77d5da7e6cafd4fb98ff6a502636d Mon Sep 17 00:00:00 2001 From: SignpostMarv Martin Date: Thu, 24 Mar 2011 16:46:21 +0000 Subject: Altering log feedback --- .../WebkeyAuthenticationService.cs | 23 +++++++++++----------- .../WebkeyOrPasswordAuthenticationService.cs | 8 +++++--- 2 files changed, 17 insertions(+), 14 deletions(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs b/OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs index 5924026..2344c0e 100644 --- a/OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs +++ b/OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs @@ -57,10 +57,9 @@ namespace OpenSim.Services.AuthenticationService public string Authenticate(UUID principalID, string password, int lifetime) { - m_log.InfoFormat("[Authenticate]: Trying a web key authenticate"); if (new UUID(password) == UUID.Zero) { - m_log.InfoFormat("[Authenticate]: NULL_KEY is not a valid web_login_key"); + m_log.DebugFormat("[AUTH SERVICE]: UUID.Zero is not a valid web_login_key on PrincipalID {0}", principalID); } else { @@ -69,17 +68,19 @@ namespace OpenSim.Services.AuthenticationService { if (data.Data.ContainsKey("webLoginKey")) { - m_log.InfoFormat("[Authenticate]: Trying a web key authentication"); string key = data.Data["webLoginKey"].ToString(); - m_log.DebugFormat("[WEB LOGIN AUTH]: got {0} for key in db vs {1}", key, password); - if (key == password) - { - data.Data["webLoginKey"] = UUID.Zero.ToString(); - m_Database.Store(data); - return GetToken(principalID, lifetime); - } + if (key == password) + { + data.Data["webLoginKey"] = UUID.Zero.ToString(); + m_Database.Store(data); + return GetToken(principalID, lifetime); + } + else + { + m_log.DebugFormat("[AUTH SERVICE]: web login auth failed, got PrincipalID {0} gave {1} instead of {2}", principalID, password, key); + } }else{ - m_log.DebugFormat("[Authenticate]: no col webLoginKey in passwd.db"); + m_log.DebugFormat("[AUTH SERVICE]: no col webLoginKey in passwd.db"); } } m_log.DebugFormat("[AUTH SERVICE]: PrincipalID {0} or its data not found", principalID); diff --git a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs index 3a47e97..c315ef2 100644 --- a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs +++ b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs @@ -32,25 +32,27 @@ namespace OpenSim.Services.AuthenticationService { if (data.Data.ContainsKey("webLoginKey")) { + m_log.DebugFormat("[AUTH SERVICE]: Attempting web key authentication for PrincipalID {0}", principalID); svc = ServerUtils.LoadPlugin("OpenSim.Services.AuthenticationService.dll", "WebkeyAuthenticationService", args); result = svc.Authenticate(principalID, password, lifetime); if (result == String.Empty) { - m_log.DebugFormat("[Authenticate]: Web Login failed for PrincipalID {0}", principalID); + m_log.DebugFormat("[AUTH SERVICE]: Web Login failed for PrincipalID {0}", principalID); } } if (result == string.Empty && data.Data.ContainsKey("passwordHash") && data.Data.ContainsKey("passwordSalt")) { + m_log.DebugFormat("[AUTH SERVICE]: Attempting password authentication for PrincipalID {0}", principalID); svc = ServerUtils.LoadPlugin("OpenSim.Services.AuthenticationService.dll", "PasswordAuthenticationService", args); result = svc.Authenticate(principalID, password, lifetime); if (result == String.Empty) { - m_log.DebugFormat("[Authenticate]: Password login failed for PrincipalID {0}", principalID); + m_log.DebugFormat("[AUTH SERVICE]: Password login failed for PrincipalID {0}", principalID); } } if (result == string.Empty) { - m_log.DebugFormat("[AUTH SERVICE]: Both password and webLoginKey-based login failed for PrincipalID {0}", principalID); + m_log.DebugFormat("[AUTH SERVICE]: Both password and webLoginKey-based authentication failed for PrincipalID {0}", principalID); } } else -- cgit v1.1 From 361b3e7ab8313b89475bc644fdcd348e071b951a Mon Sep 17 00:00:00 2001 From: SignpostMarv Martin Date: Thu, 24 Mar 2011 17:04:29 +0000 Subject: Removing hard-coded plugin loading in favour of direct class instantiation --- .../WebkeyOrPasswordAuthenticationService.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs index c315ef2..15dc5be 100644 --- a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs +++ b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs @@ -16,25 +16,25 @@ namespace OpenSim.Services.AuthenticationService { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private IConfigSource config; + private Dictionary svc_checks; public WebkeyOrPasswordAuthenticationService(IConfigSource config) : base(config) { this.config = config; + svc_checks["web_login_key"] = new WebkeyAuthenticationService(config); + svc_checks["password"] = new PasswordAuthenticationService(config); } public string Authenticate(UUID principalID, string password, int lifetime) { AuthenticationData data = m_Database.Get(principalID); - IAuthenticationService svc; - Object[] args = new Object[] { config }; string result = String.Empty; if (data != null && data.Data != null) { if (data.Data.ContainsKey("webLoginKey")) { m_log.DebugFormat("[AUTH SERVICE]: Attempting web key authentication for PrincipalID {0}", principalID); - svc = ServerUtils.LoadPlugin("OpenSim.Services.AuthenticationService.dll", "WebkeyAuthenticationService", args); - result = svc.Authenticate(principalID, password, lifetime); + result = svc_checks["web_login_key"].Authenticate(principalID, password, lifetime); if (result == String.Empty) { m_log.DebugFormat("[AUTH SERVICE]: Web Login failed for PrincipalID {0}", principalID); @@ -43,8 +43,7 @@ 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); - svc = ServerUtils.LoadPlugin("OpenSim.Services.AuthenticationService.dll", "PasswordAuthenticationService", args); - result = svc.Authenticate(principalID, password, lifetime); + result = svc_checks["password"].Authenticate(principalID, password, lifetime); if (result == String.Empty) { m_log.DebugFormat("[AUTH SERVICE]: Password login failed for PrincipalID {0}", principalID); -- cgit v1.1 From de0730a54ca8b2ede0727212bfc2474c0eff979f Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 26 Mar 2011 02:42:50 +0000 Subject: Add OpenSim.Server.Base reference in prebuild.xml. Initialize svc_checks dictionary in WebkeyOrPasswordAuthenticationService, which was what was causing the load failure. --- .../AuthenticationService/WebkeyOrPasswordAuthenticationService.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs index 15dc5be..bcfd03d 100644 --- a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs +++ b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs @@ -15,8 +15,11 @@ namespace OpenSim.Services.AuthenticationService public class WebkeyOrPasswordAuthenticationService : AuthenticationServiceBase, IAuthenticationService { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private IConfigSource config; - private Dictionary svc_checks; + private Dictionary svc_checks + = new Dictionary(); + public WebkeyOrPasswordAuthenticationService(IConfigSource config) : base(config) { -- cgit v1.1 From 83f48c26d62b148c11776af6d4947fc2397a675d Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 26 Mar 2011 02:43:41 +0000 Subject: add header file --- .../WebkeyOrPasswordAuthenticationService.cs | 29 +++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs index bcfd03d..00056a6 100644 --- a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs +++ b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs @@ -1,4 +1,31 @@ -using System; +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; using System.Collections.Generic; using OpenMetaverse; using OpenSim.Services.Interfaces; -- cgit v1.1 From 797128a6ad89ea4944074f99db0a30ad7a5e7a3d Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 26 Mar 2011 02:44:46 +0000 Subject: Rename some member fields to standard m_ OpenSim code convention --- .../WebkeyOrPasswordAuthenticationService.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs index 00056a6..3590e12 100644 --- a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs +++ b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs @@ -43,16 +43,16 @@ namespace OpenSim.Services.AuthenticationService { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - private IConfigSource config; - private Dictionary svc_checks + private IConfigSource m_config; + private Dictionary m_svcChecks = new Dictionary(); public WebkeyOrPasswordAuthenticationService(IConfigSource config) : base(config) { - this.config = config; - svc_checks["web_login_key"] = new WebkeyAuthenticationService(config); - svc_checks["password"] = new PasswordAuthenticationService(config); + this.m_config = config; + m_svcChecks["web_login_key"] = new WebkeyAuthenticationService(config); + m_svcChecks["password"] = new PasswordAuthenticationService(config); } public string Authenticate(UUID principalID, string password, int lifetime) @@ -64,7 +64,7 @@ namespace OpenSim.Services.AuthenticationService if (data.Data.ContainsKey("webLoginKey")) { m_log.DebugFormat("[AUTH SERVICE]: Attempting web key authentication for PrincipalID {0}", principalID); - result = svc_checks["web_login_key"].Authenticate(principalID, password, lifetime); + result = m_svcChecks["web_login_key"].Authenticate(principalID, password, lifetime); if (result == String.Empty) { m_log.DebugFormat("[AUTH SERVICE]: Web Login failed for PrincipalID {0}", principalID); @@ -73,7 +73,7 @@ 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 = svc_checks["password"].Authenticate(principalID, password, lifetime); + result = m_svcChecks["password"].Authenticate(principalID, password, lifetime); if (result == String.Empty) { m_log.DebugFormat("[AUTH SERVICE]: Password login failed for PrincipalID {0}", principalID); @@ -91,4 +91,4 @@ namespace OpenSim.Services.AuthenticationService return result; } } -} +} \ No newline at end of file -- cgit v1.1