32 using System.Collections.Generic;
33 using System.Reflection;
34 using OpenSim.Framework;
35 using OpenSim.Server.Base;
36 using OpenSim.Region.Framework.Interfaces;
37 using OpenSim.Region.Framework.Scenes;
38 using OpenSim.Services.Interfaces;
41 namespace OpenSim.
Region.CoreModules.ServiceConnectorsOut.Authorization
43 [Extension(Path =
"/OpenSim/RegionModules", NodeName =
"RegionModule", Id =
"LocalAuthorizationServicesConnector")]
46 private static readonly ILog m_log =
48 MethodBase.GetCurrentMethod().DeclaringType);
51 private Scene m_Scene;
52 private IConfig m_AuthorizationConfig;
54 private bool m_Enabled =
false;
56 public Type ReplaceableInterface
63 get {
return "LocalAuthorizationServicesConnector"; }
68 m_log.Info(
"[AUTHORIZATION CONNECTOR]: Initialise");
70 IConfig moduleConfig = source.Configs[
"Modules"];
71 if (moduleConfig != null)
73 string name = moduleConfig.GetString(
"AuthorizationServices", string.Empty);
77 m_AuthorizationConfig = source.Configs[
"AuthorizationService"];
78 m_log.Info(
"[AUTHORIZATION CONNECTOR]: Local authorization connector enabled");
112 "[AUTHORIZATION CONNECTOR]: Enabled local authorization for region {0}",
113 scene.RegionInfo.RegionName);
117 string userID,
string firstName,
string lastName,
string regionID, out
string message)
123 return m_AuthorizationService.IsAuthorizedForRegion(userID, firstName, lastName, regionID, out message);
bool IsAuthorizedForRegion(string userID, string firstName, string lastName, string regionID, out string message)
Check whether the user should be given access to the region.
void RemoveRegion(Scene scene)
This is called whenever a Scene is removed. For shared modules, this can happen several times...
void AddRegion(Scene scene)
This is called whenever a Scene is added. For shared modules, this can happen several times...
void Initialise(IConfigSource source)
This is called to initialize the region module. For shared modules, this is called exactly once...
void RegionLoaded(Scene scene)
This will be called once for every scene loaded. In a shared module this will be multiple times in on...
void Close()
This is the inverse to Initialise. After a Close(), this instance won't be usable anymore...