diff options
author | Diva Canto | 2014-05-23 16:19:43 -0700 |
---|---|---|
committer | Diva Canto | 2014-05-23 16:19:43 -0700 |
commit | 20f20895cf1444071d5edc42e11a1fb94b1b1079 (patch) | |
tree | 0c7547590a89eec47886e0a8646f86ebbf449e63 /OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-20f20895cf1444071d5edc42e11a1fb94b1b1079.zip opensim-SC-20f20895cf1444071d5edc42e11a1fb94b1b1079.tar.gz opensim-SC-20f20895cf1444071d5edc42e11a1fb94b1b1079.tar.bz2 opensim-SC-20f20895cf1444071d5edc42e11a1fb94b1b1079.tar.xz |
Adds optional HTTP Basic Authentication to Robust service connectors.
Diffstat (limited to 'OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs')
-rw-r--r-- | OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs b/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs index 8110fe5..3f61d9a 100644 --- a/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs +++ b/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs | |||
@@ -33,13 +33,14 @@ using System.Reflection; | |||
33 | using Nini.Config; | 33 | using Nini.Config; |
34 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
35 | using OpenSim.Framework.Communications; | 35 | using OpenSim.Framework.Communications; |
36 | using OpenSim.Framework.ServiceAuth; | ||
36 | using OpenSim.Server.Base; | 37 | using OpenSim.Server.Base; |
37 | using OpenSim.Services.Interfaces; | 38 | using OpenSim.Services.Interfaces; |
38 | using OpenMetaverse; | 39 | using OpenMetaverse; |
39 | 40 | ||
40 | namespace OpenSim.Services.Connectors | 41 | namespace OpenSim.Services.Connectors |
41 | { | 42 | { |
42 | public class UserAccountServicesConnector : IUserAccountService | 43 | public class UserAccountServicesConnector : BaseServiceConnector, IUserAccountService |
43 | { | 44 | { |
44 | private static readonly ILog m_log = | 45 | private static readonly ILog m_log = |
45 | LogManager.GetLogger( | 46 | LogManager.GetLogger( |
@@ -79,6 +80,8 @@ namespace OpenSim.Services.Connectors | |||
79 | throw new Exception("User account connector init error"); | 80 | throw new Exception("User account connector init error"); |
80 | } | 81 | } |
81 | m_ServerURI = serviceURI; | 82 | m_ServerURI = serviceURI; |
83 | |||
84 | base.Initialise(source, "UserAccountService"); | ||
82 | } | 85 | } |
83 | 86 | ||
84 | public virtual UserAccount GetUserAccount(UUID scopeID, string firstName, string lastName) | 87 | public virtual UserAccount GetUserAccount(UUID scopeID, string firstName, string lastName) |
@@ -144,7 +147,8 @@ namespace OpenSim.Services.Connectors | |||
144 | { | 147 | { |
145 | reply = SynchronousRestFormsRequester.MakeRequest("POST", | 148 | reply = SynchronousRestFormsRequester.MakeRequest("POST", |
146 | uri, | 149 | uri, |
147 | reqString); | 150 | reqString, |
151 | m_Auth); | ||
148 | if (reply == null || (reply != null && reply == string.Empty)) | 152 | if (reply == null || (reply != null && reply == string.Empty)) |
149 | { | 153 | { |
150 | m_log.DebugFormat("[ACCOUNT CONNECTOR]: GetUserAccounts received null or empty reply"); | 154 | m_log.DebugFormat("[ACCOUNT CONNECTOR]: GetUserAccounts received null or empty reply"); |
@@ -224,7 +228,8 @@ namespace OpenSim.Services.Connectors | |||
224 | { | 228 | { |
225 | reply = SynchronousRestFormsRequester.MakeRequest("POST", | 229 | reply = SynchronousRestFormsRequester.MakeRequest("POST", |
226 | uri, | 230 | uri, |
227 | reqString); | 231 | reqString, |
232 | m_Auth); | ||
228 | if (reply == null || (reply != null && reply == string.Empty)) | 233 | if (reply == null || (reply != null && reply == string.Empty)) |
229 | { | 234 | { |
230 | m_log.DebugFormat("[ACCOUNT CONNECTOR]: GetUserAccount received null or empty reply"); | 235 | m_log.DebugFormat("[ACCOUNT CONNECTOR]: GetUserAccount received null or empty reply"); |
@@ -260,7 +265,8 @@ namespace OpenSim.Services.Connectors | |||
260 | { | 265 | { |
261 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", | 266 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", |
262 | uri, | 267 | uri, |
263 | reqString); | 268 | reqString, |
269 | m_Auth); | ||
264 | if (reply != string.Empty) | 270 | if (reply != string.Empty) |
265 | { | 271 | { |
266 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | 272 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); |