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/Server/Handlers/Inventory/XInventoryInConnector.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'OpenSim/Server/Handlers/Inventory') diff --git a/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs b/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs index ce975a8..7283237 100644 --- a/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs +++ b/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs @@ -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(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; } -- cgit v1.1