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