aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs')
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs35
1 files changed, 19 insertions, 16 deletions
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs
index 68f73ee..51a09f8 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs
@@ -69,7 +69,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
69 69
70 public SimianAuthenticationServiceConnector(IConfigSource source) 70 public SimianAuthenticationServiceConnector(IConfigSource source)
71 { 71 {
72 Initialise(source); 72 CommonInit(source);
73 } 73 }
74 74
75 public void Initialise(IConfigSource source) 75 public void Initialise(IConfigSource source)
@@ -79,24 +79,27 @@ namespace OpenSim.Services.Connectors.SimianGrid
79 { 79 {
80 string name = moduleConfig.GetString("AuthenticationServices", ""); 80 string name = moduleConfig.GetString("AuthenticationServices", "");
81 if (name == Name) 81 if (name == Name)
82 { 82 CommonInit(source);
83 IConfig gridConfig = source.Configs["AuthenticationService"]; 83 }
84 if (gridConfig != null) 84 }
85 {
86 string serviceUrl = gridConfig.GetString("AuthenticationServerURI");
87 if (!String.IsNullOrEmpty(serviceUrl))
88 {
89 if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
90 serviceUrl = serviceUrl + '/';
91 m_serverUrl = serviceUrl;
92 m_Enabled = true;
93 }
94 }
95 85
96 if (String.IsNullOrEmpty(m_serverUrl)) 86 private void CommonInit(IConfigSource source)
97 m_log.Info("[SIMIAN AUTH CONNECTOR]: No AuthenticationServerURI specified, disabling connector"); 87 {
88 IConfig gridConfig = source.Configs["AuthenticationService"];
89 if (gridConfig != null)
90 {
91 string serviceUrl = gridConfig.GetString("AuthenticationServerURI");
92 if (!String.IsNullOrEmpty(serviceUrl))
93 {
94 if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
95 serviceUrl = serviceUrl + '/';
96 m_serverUrl = serviceUrl;
97 m_Enabled = true;
98 } 98 }
99 } 99 }
100
101 if (String.IsNullOrEmpty(m_serverUrl))
102 m_log.Info("[SIMIAN AUTH CONNECTOR]: No AuthenticationServerURI specified, disabling connector");
100 } 103 }
101 104
102 public string Authenticate(UUID principalID, string password, int lifetime) 105 public string Authenticate(UUID principalID, string password, int lifetime)