aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors/Authentication
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/Connectors/Authentication')
-rw-r--r--OpenSim/Services/Connectors/Authentication/AuthenticationServicesConnector.cs14
1 files changed, 9 insertions, 5 deletions
diff --git a/OpenSim/Services/Connectors/Authentication/AuthenticationServicesConnector.cs b/OpenSim/Services/Connectors/Authentication/AuthenticationServicesConnector.cs
index f996aca..0443f5a 100644
--- a/OpenSim/Services/Connectors/Authentication/AuthenticationServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Authentication/AuthenticationServicesConnector.cs
@@ -32,14 +32,14 @@ using System.IO;
32using System.Reflection; 32using System.Reflection;
33using Nini.Config; 33using Nini.Config;
34using OpenSim.Framework; 34using OpenSim.Framework;
35using OpenSim.Framework.Communications; 35using OpenSim.Framework.ServiceAuth;
36using OpenSim.Services.Interfaces; 36using OpenSim.Services.Interfaces;
37using OpenSim.Server.Base; 37using OpenSim.Server.Base;
38using OpenMetaverse; 38using OpenMetaverse;
39 39
40namespace OpenSim.Services.Connectors 40namespace OpenSim.Services.Connectors
41{ 41{
42 public class AuthenticationServicesConnector : IAuthenticationService 42 public class AuthenticationServicesConnector : BaseServiceConnector, IAuthenticationService
43 { 43 {
44 private static readonly ILog m_log = 44 private static readonly ILog m_log =
45 LogManager.GetLogger( 45 LogManager.GetLogger(
@@ -57,6 +57,7 @@ namespace OpenSim.Services.Connectors
57 } 57 }
58 58
59 public AuthenticationServicesConnector(IConfigSource source) 59 public AuthenticationServicesConnector(IConfigSource source)
60 : base(source, "AuthenticationService")
60 { 61 {
61 Initialise(source); 62 Initialise(source);
62 } 63 }
@@ -79,6 +80,8 @@ namespace OpenSim.Services.Connectors
79 throw new Exception("Authentication connector init error"); 80 throw new Exception("Authentication connector init error");
80 } 81 }
81 m_ServerURI = serviceURI; 82 m_ServerURI = serviceURI;
83
84 base.Initialise(source, "AuthenticationService");
82 } 85 }
83 86
84 public string Authenticate(UUID principalID, string password, int lifetime, out UUID realID) 87 public string Authenticate(UUID principalID, string password, int lifetime, out UUID realID)
@@ -99,7 +102,7 @@ namespace OpenSim.Services.Connectors
99 102
100 string reply = SynchronousRestFormsRequester.MakeRequest("POST", 103 string reply = SynchronousRestFormsRequester.MakeRequest("POST",
101 m_ServerURI + "/auth/plain", 104 m_ServerURI + "/auth/plain",
102 ServerUtils.BuildQueryString(sendData)); 105 ServerUtils.BuildQueryString(sendData), m_Auth);
103 106
104 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse( 107 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(
105 reply); 108 reply);
@@ -112,6 +115,7 @@ namespace OpenSim.Services.Connectors
112 115
113 public bool Verify(UUID principalID, string token, int lifetime) 116 public bool Verify(UUID principalID, string token, int lifetime)
114 { 117 {
118// m_log.Error("[XXX]: Verify");
115 Dictionary<string, object> sendData = new Dictionary<string, object>(); 119 Dictionary<string, object> sendData = new Dictionary<string, object>();
116 sendData["LIFETIME"] = lifetime.ToString(); 120 sendData["LIFETIME"] = lifetime.ToString();
117 sendData["PRINCIPAL"] = principalID.ToString(); 121 sendData["PRINCIPAL"] = principalID.ToString();
@@ -121,7 +125,7 @@ namespace OpenSim.Services.Connectors
121 125
122 string reply = SynchronousRestFormsRequester.MakeRequest("POST", 126 string reply = SynchronousRestFormsRequester.MakeRequest("POST",
123 m_ServerURI + "/auth/plain", 127 m_ServerURI + "/auth/plain",
124 ServerUtils.BuildQueryString(sendData)); 128 ServerUtils.BuildQueryString(sendData), m_Auth);
125 129
126 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse( 130 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(
127 reply); 131 reply);
@@ -142,7 +146,7 @@ namespace OpenSim.Services.Connectors
142 146
143 string reply = SynchronousRestFormsRequester.MakeRequest("POST", 147 string reply = SynchronousRestFormsRequester.MakeRequest("POST",
144 m_ServerURI + "/auth/plain", 148 m_ServerURI + "/auth/plain",
145 ServerUtils.BuildQueryString(sendData)); 149 ServerUtils.BuildQueryString(sendData), m_Auth);
146 150
147 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse( 151 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(
148 reply); 152 reply);