Adds optional HTTP Basic Authentication to Robust service connectors.

This commit is contained in:
Diva Canto
2014-05-23 16:19:43 -07:00
parent b7c7293c7a
commit 20f20895cf
47 changed files with 519 additions and 116 deletions

View File

@@ -33,6 +33,7 @@ using System.Collections.Generic;
using System.IO;
using Nini.Config;
using OpenSim.Framework;
using OpenSim.Framework.ServiceAuth;
using OpenSim.Server.Base;
using OpenSim.Services.Interfaces;
using OpenSim.Framework.Servers.HttpServer;
@@ -71,7 +72,9 @@ namespace OpenSim.Server.Handlers.Asset
m_InventoryService =
ServerUtils.LoadPlugin<IInventoryService>(inventoryService, args);
server.AddStreamHandler(new XInventoryConnectorPostHandler(m_InventoryService));
IServiceAuth auth = ServiceAuth.Create(config, m_ConfigName);
server.AddStreamHandler(new XInventoryConnectorPostHandler(m_InventoryService, auth));
}
}
@@ -81,8 +84,8 @@ namespace OpenSim.Server.Handlers.Asset
private IInventoryService m_InventoryService;
public XInventoryConnectorPostHandler(IInventoryService service) :
base("POST", "/xinventory")
public XInventoryConnectorPostHandler(IInventoryService service, IServiceAuth auth) :
base("POST", "/xinventory", auth)
{
m_InventoryService = service;
}