aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors/Authentication/AuthenticationServicesConnector.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/Connectors/Authentication/AuthenticationServicesConnector.cs')
-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 2b77154..56b6434 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) 87 public string Authenticate(UUID principalID, string password, int lifetime)
@@ -92,7 +95,7 @@ namespace OpenSim.Services.Connectors
92 95
93 string reply = SynchronousRestFormsRequester.MakeRequest("POST", 96 string reply = SynchronousRestFormsRequester.MakeRequest("POST",
94 m_ServerURI + "/auth/plain", 97 m_ServerURI + "/auth/plain",
95 ServerUtils.BuildQueryString(sendData)); 98 ServerUtils.BuildQueryString(sendData), m_Auth);
96 99
97 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse( 100 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(
98 reply); 101 reply);
@@ -105,6 +108,7 @@ namespace OpenSim.Services.Connectors
105 108
106 public bool Verify(UUID principalID, string token, int lifetime) 109 public bool Verify(UUID principalID, string token, int lifetime)
107 { 110 {
111 m_log.Error("[XXX]: Verify");
108 Dictionary<string, object> sendData = new Dictionary<string, object>(); 112 Dictionary<string, object> sendData = new Dictionary<string, object>();
109 sendData["LIFETIME"] = lifetime.ToString(); 113 sendData["LIFETIME"] = lifetime.ToString();
110 sendData["PRINCIPAL"] = principalID.ToString(); 114 sendData["PRINCIPAL"] = principalID.ToString();
@@ -114,7 +118,7 @@ namespace OpenSim.Services.Connectors
114 118
115 string reply = SynchronousRestFormsRequester.MakeRequest("POST", 119 string reply = SynchronousRestFormsRequester.MakeRequest("POST",
116 m_ServerURI + "/auth/plain", 120 m_ServerURI + "/auth/plain",
117 ServerUtils.BuildQueryString(sendData)); 121 ServerUtils.BuildQueryString(sendData), m_Auth);
118 122
119 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse( 123 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(
120 reply); 124 reply);
@@ -135,7 +139,7 @@ namespace OpenSim.Services.Connectors
135 139
136 string reply = SynchronousRestFormsRequester.MakeRequest("POST", 140 string reply = SynchronousRestFormsRequester.MakeRequest("POST",
137 m_ServerURI + "/auth/plain", 141 m_ServerURI + "/auth/plain",
138 ServerUtils.BuildQueryString(sendData)); 142 ServerUtils.BuildQueryString(sendData), m_Auth);
139 143
140 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse( 144 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(
141 reply); 145 reply);