aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/UserAccounts
diff options
context:
space:
mode:
authorDiva Canto2014-05-23 16:19:43 -0700
committerDiva Canto2014-05-23 16:19:43 -0700
commit20f20895cf1444071d5edc42e11a1fb94b1b1079 (patch)
tree0c7547590a89eec47886e0a8646f86ebbf449e63 /OpenSim/Server/Handlers/UserAccounts
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-20f20895cf1444071d5edc42e11a1fb94b1b1079.zip
opensim-SC_OLD-20f20895cf1444071d5edc42e11a1fb94b1b1079.tar.gz
opensim-SC_OLD-20f20895cf1444071d5edc42e11a1fb94b1b1079.tar.bz2
opensim-SC_OLD-20f20895cf1444071d5edc42e11a1fb94b1b1079.tar.xz
Adds optional HTTP Basic Authentication to Robust service connectors.
Diffstat (limited to 'OpenSim/Server/Handlers/UserAccounts')
-rw-r--r--OpenSim/Server/Handlers/UserAccounts/UserAccountServerConnector.cs5
-rw-r--r--OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs7
2 files changed, 8 insertions, 4 deletions
diff --git a/OpenSim/Server/Handlers/UserAccounts/UserAccountServerConnector.cs b/OpenSim/Server/Handlers/UserAccounts/UserAccountServerConnector.cs
index 344b513..e95e3dc 100644
--- a/OpenSim/Server/Handlers/UserAccounts/UserAccountServerConnector.cs
+++ b/OpenSim/Server/Handlers/UserAccounts/UserAccountServerConnector.cs
@@ -30,6 +30,7 @@ using Nini.Config;
30using OpenSim.Server.Base; 30using OpenSim.Server.Base;
31using OpenSim.Services.Interfaces; 31using OpenSim.Services.Interfaces;
32using OpenSim.Framework.Servers.HttpServer; 32using OpenSim.Framework.Servers.HttpServer;
33using OpenSim.Framework.ServiceAuth;
33using OpenSim.Server.Handlers.Base; 34using OpenSim.Server.Handlers.Base;
34 35
35namespace OpenSim.Server.Handlers.UserAccounts 36namespace OpenSim.Server.Handlers.UserAccounts
@@ -55,7 +56,9 @@ namespace OpenSim.Server.Handlers.UserAccounts
55 Object[] args = new Object[] { config }; 56 Object[] args = new Object[] { config };
56 m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(service, args); 57 m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(service, args);
57 58
58 server.AddStreamHandler(new UserAccountServerPostHandler(m_UserAccountService, serverConfig)); 59 IServiceAuth auth = ServiceAuth.Create(config, m_ConfigName);
60
61 server.AddStreamHandler(new UserAccountServerPostHandler(m_UserAccountService, serverConfig, auth));
59 } 62 }
60 } 63 }
61} 64}
diff --git a/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs b/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs
index 24c9de6..c87e022 100644
--- a/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs
@@ -41,6 +41,7 @@ using OpenSim.Services.Interfaces;
41using OpenSim.Services.UserAccountService; 41using OpenSim.Services.UserAccountService;
42using OpenSim.Framework; 42using OpenSim.Framework;
43using OpenSim.Framework.Servers.HttpServer; 43using OpenSim.Framework.Servers.HttpServer;
44using OpenSim.Framework.ServiceAuth;
44using OpenMetaverse; 45using OpenMetaverse;
45 46
46namespace OpenSim.Server.Handlers.UserAccounts 47namespace OpenSim.Server.Handlers.UserAccounts
@@ -54,10 +55,10 @@ namespace OpenSim.Server.Handlers.UserAccounts
54 private bool m_AllowSetAccount = false; 55 private bool m_AllowSetAccount = false;
55 56
56 public UserAccountServerPostHandler(IUserAccountService service) 57 public UserAccountServerPostHandler(IUserAccountService service)
57 : this(service, null) {} 58 : this(service, null, null) {}
58 59
59 public UserAccountServerPostHandler(IUserAccountService service, IConfig config) : 60 public UserAccountServerPostHandler(IUserAccountService service, IConfig config, IServiceAuth auth) :
60 base("POST", "/accounts") 61 base("POST", "/accounts", auth)
61 { 62 {
62 m_UserAccountService = service; 63 m_UserAccountService = service;
63 64