aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/GridService/GridService.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/GridService/GridService.cs19
1 files changed, 18 insertions, 1 deletions
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs
index 6826940..5c55c0b 100644
--- a/OpenSim/Services/GridService/GridService.cs
+++ b/OpenSim/Services/GridService/GridService.cs
@@ -34,6 +34,7 @@ using log4net;
34using OpenSim.Framework; 34using OpenSim.Framework;
35using OpenSim.Framework.Console; 35using OpenSim.Framework.Console;
36using OpenSim.Data; 36using OpenSim.Data;
37using OpenSim.Server.Base;
37using OpenSim.Services.Interfaces; 38using OpenSim.Services.Interfaces;
38using GridRegion = OpenSim.Services.Interfaces.GridRegion; 39using GridRegion = OpenSim.Services.Interfaces.GridRegion;
39using OpenMetaverse; 40using OpenMetaverse;
@@ -50,6 +51,8 @@ namespace OpenSim.Services.GridService
50 private static GridService m_RootInstance = null; 51 private static GridService m_RootInstance = null;
51 protected IConfigSource m_config; 52 protected IConfigSource m_config;
52 53
54 protected IAuthenticationService m_AuthenticationService = null;
55
53 public GridService(IConfigSource config) 56 public GridService(IConfigSource config)
54 : base(config) 57 : base(config)
55 { 58 {
@@ -60,6 +63,14 @@ namespace OpenSim.Services.GridService
60 if (gridConfig != null) 63 if (gridConfig != null)
61 { 64 {
62 m_DeleteOnUnregister = gridConfig.GetBoolean("DeleteOnUnregister", true); 65 m_DeleteOnUnregister = gridConfig.GetBoolean("DeleteOnUnregister", true);
66
67 string authService = gridConfig.GetString("AuthenticationService", String.Empty);
68
69 if (authService != String.Empty)
70 {
71 Object[] args = new Object[] { config };
72 m_AuthenticationService = ServerUtils.LoadPlugin<IAuthenticationService>(authService, args);
73 }
63 } 74 }
64 75
65 if (m_RootInstance == null) 76 if (m_RootInstance == null)
@@ -118,7 +129,13 @@ namespace OpenSim.Services.GridService
118 129
119 if ((rflags & OpenSim.Data.RegionFlags.Authenticate) != 0) 130 if ((rflags & OpenSim.Data.RegionFlags.Authenticate) != 0)
120 { 131 {
121 // TODO: Authenticate the principal 132 // Can we authenticate at all?
133 //
134 if (m_AuthenticationService == null)
135 return false;
136
137 if (!m_AuthenticationService.Verify(new UUID(region.Data["PrincipalID"].ToString()), regionInfos.Token, 30))
138 return false;
122 139
123 return false; 140 return false;
124 } 141 }