29 using System.Collections.Generic;
30 using System.Reflection;
34 using OpenSim.Region.Framework.Interfaces;
35 using OpenSim.Region.Framework.Scenes;
36 using OpenSim.Server.Base;
37 using OpenSim.Services.Interfaces;
41 namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authentication
43 [Extension(Path =
"/OpenSim/RegionModules", NodeName =
"RegionModule", Id =
"LocalAuthenticationServicesConnector")]
46 private static readonly ILog m_log =
48 MethodBase.GetCurrentMethod().DeclaringType);
52 private bool m_Enabled =
false;
54 #region ISharedRegionModule
56 public Type ReplaceableInterface
63 get {
return "LocalAuthenticationServicesConnector"; }
68 IConfig moduleConfig = source.Configs[
"Modules"];
69 if (moduleConfig != null)
71 string name = moduleConfig.GetString(
"AuthenticationServices",
"");
74 IConfig userConfig = source.Configs[
"AuthenticationService"];
75 if (userConfig == null)
77 m_log.Error(
"[AUTH CONNECTOR]: AuthenticationService missing from OpenSim.ini");
81 string serviceDll = userConfig.GetString(
"LocalServiceModule",
84 if (serviceDll ==
String.Empty)
86 m_log.Error(
"[AUTH CONNECTOR]: No LocalServiceModule named in section AuthenticationService");
91 m_AuthenticationService =
95 if (m_AuthenticationService == null)
97 m_log.Error(
"[AUTH CONNECTOR]: Can't load Authentication service");
101 m_log.Info(
"[AUTH CONNECTOR]: Local Authentication connector enabled");
140 #region IAuthenticationService
142 public string Authenticate(UUID principalID,
string password,
int lifetime, out UUID realID)
149 public string Authenticate(UUID principalID,
string password,
int lifetime)
155 public bool Verify(UUID principalID,
string token,
int lifetime)
157 return m_AuthenticationService.Verify(principalID, token, lifetime);
160 public bool Release(UUID principalID,
string token)
162 return m_AuthenticationService.Release(principalID, token);
167 return m_AuthenticationService.SetPassword(principalID, passwd);
172 return m_AuthenticationService.GetAuthInfo(principalID);
177 return m_AuthenticationService.SetAuthInfo(info);
bool Release(UUID principalID, string token)
bool SetAuthInfo(AuthInfo info)
AuthInfo GetAuthInfo(UUID principalID)
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 RemoveRegion(Scene scene)
This is called whenever a Scene is removed. For shared modules, this can happen several times...
string Authenticate(UUID principalID, string password, int lifetime, out UUID realID)
void Close()
This is the inverse to Initialise. After a Close(), this instance won't be usable anymore...
Interactive OpenSim region server
void PostInitialise()
This is called exactly once after all the shared region-modules have been instanciated and IRegionMod...
bool Verify(UUID principalID, string token, int lifetime)
void Initialise(IConfigSource source)
This is called to initialize the region module. For shared modules, this is called exactly once...
bool SetPassword(UUID principalID, string passwd)
void AddRegion(Scene scene)
This is called whenever a Scene is added. For shared modules, this can happen several times...
string Authenticate(UUID principalID, string password, int lifetime)