mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 18:55:58 +08:00
Adds optional HTTP Basic Authentication to Robust service connectors.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user