aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
authorRob Smart2009-09-11 12:28:48 +0100
committerDiva Canto2009-09-11 06:50:24 -0700
commiteaec7cf39ce134b4da0622f67ee6037843f6eb29 (patch)
tree82d261a37ec91787a835e974c3075bdd0d770aeb /OpenSim/Services
parentChanged the interface of IAuthorizationService to get less data. (diff)
downloadopensim-SC_OLD-eaec7cf39ce134b4da0622f67ee6037843f6eb29.zip
opensim-SC_OLD-eaec7cf39ce134b4da0622f67ee6037843f6eb29.tar.gz
opensim-SC_OLD-eaec7cf39ce134b4da0622f67ee6037843f6eb29.tar.bz2
opensim-SC_OLD-eaec7cf39ce134b4da0622f67ee6037843f6eb29.tar.xz
Changed RemoteAuthorizationServiceConnector so that it implements the IAuthorization interface method isAuthorizedForRegion looks up user and region data and delegates the remote authorization check to the AuthorizationServiceConnector
This keeps the IAuthorization as clean as possible and moves the dependency of using a UserProfileData object out to the connector from the scene.
Diffstat (limited to 'OpenSim/Services')
-rw-r--r--OpenSim/Services/Connectors/Authorization/AuthorizationServiceConnector.cs7
1 files changed, 3 insertions, 4 deletions
diff --git a/OpenSim/Services/Connectors/Authorization/AuthorizationServiceConnector.cs b/OpenSim/Services/Connectors/Authorization/AuthorizationServiceConnector.cs
index d50a6ed..bc4daad 100644
--- a/OpenSim/Services/Connectors/Authorization/AuthorizationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Authorization/AuthorizationServiceConnector.cs
@@ -39,7 +39,7 @@ using OpenMetaverse;
39 39
40namespace OpenSim.Services.Connectors 40namespace OpenSim.Services.Connectors
41{ 41{
42 public class AuthorizationServicesConnector : IAuthorizationService 42 public class AuthorizationServicesConnector
43 { 43 {
44 private static readonly ILog m_log = 44 private static readonly ILog m_log =
45 LogManager.GetLogger( 45 LogManager.GetLogger(
@@ -88,14 +88,14 @@ namespace OpenSim.Services.Connectors
88 m_ResponseOnFailure = responseOnFailure; 88 m_ResponseOnFailure = responseOnFailure;
89 } 89 }
90 90
91 public bool IsAuthorizedForRegion(string userID, string regionID) 91 public bool IsAuthorizedForRegion(string userID,string firstname, string surname, string email, string regionName, string regionID)
92 { 92 {
93 // do a remote call to the authorization server specified in the AuthorizationServerURI 93 // do a remote call to the authorization server specified in the AuthorizationServerURI
94 m_log.InfoFormat("[AUTHORIZATION CONNECTOR]: IsAuthorizedForRegion checking {0} at remote server {1}", userID, m_ServerURI); 94 m_log.InfoFormat("[AUTHORIZATION CONNECTOR]: IsAuthorizedForRegion checking {0} at remote server {1}", userID, m_ServerURI);
95 95
96 string uri = m_ServerURI; 96 string uri = m_ServerURI;
97 97
98 AuthorizationRequest req = new AuthorizationRequest(userID, regionID); 98 AuthorizationRequest req = new AuthorizationRequest(userID, firstname, surname, email, regionName, regionID);
99 99
100 AuthorizationResponse response; 100 AuthorizationResponse response;
101 try 101 try
@@ -105,7 +105,6 @@ namespace OpenSim.Services.Connectors
105 catch (Exception e) 105 catch (Exception e)
106 { 106 {
107 m_log.WarnFormat("[AUTHORIZATION CONNECTOR]: Unable to send authorize {0} for region {1} error thrown during comms with remote server. Reason: {2}", userID, regionID, e.Message); 107 m_log.WarnFormat("[AUTHORIZATION CONNECTOR]: Unable to send authorize {0} for region {1} error thrown during comms with remote server. Reason: {2}", userID, regionID, e.Message);
108 m_log.WarnFormat("Inner Exception is {0}",e.InnerException);
109 return m_ResponseOnFailure; 108 return m_ResponseOnFailure;
110 } 109 }
111 110