From 20f20895cf1444071d5edc42e11a1fb94b1b1079 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 23 May 2014 16:19:43 -0700 Subject: Adds optional HTTP Basic Authentication to Robust service connectors. --- OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs b/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs index af8a0c1..780d17b 100644 --- a/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs @@ -37,6 +37,7 @@ using System.Collections.Generic; using System.Reflection; using log4net; using OpenSim.Framework; +using OpenSim.Framework.ServiceAuth; using OpenSim.Framework.Communications; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; @@ -54,7 +55,7 @@ namespace OpenSim.Region.CoreModules.Avatar.BakedTextures private string m_URL = String.Empty; private static XmlSerializer m_serializer = new XmlSerializer(typeof(AssetBase)); - + private static IServiceAuth m_Auth; public void Initialise(IConfigSource configSource) { @@ -63,6 +64,7 @@ namespace OpenSim.Region.CoreModules.Avatar.BakedTextures return; m_URL = config.GetString("URL", String.Empty); + m_Auth = ServiceAuth.Create(configSource, "XBakes"); } public void AddRegion(Scene scene) @@ -110,7 +112,7 @@ namespace OpenSim.Region.CoreModules.Avatar.BakedTextures try { - Stream s = rc.Request(); + Stream s = rc.Request(m_Auth); XmlTextReader sr = new XmlTextReader(s); sr.ReadStartElement("BakedAppearance"); @@ -183,7 +185,7 @@ namespace OpenSim.Region.CoreModules.Avatar.BakedTextures Util.FireAndForget( delegate { - rc.Request(reqStream); + rc.Request(reqStream, m_Auth); } ); } -- cgit v1.1