29 using System.Reflection;
32 using OpenSim.Server.Base;
33 using OpenSim.Services.Interfaces;
34 using OpenSim.Framework.Servers.HttpServer;
35 using OpenSim.Server.Handlers.Base;
37 namespace OpenSim.Server.Handlers.Authentication
41 private static readonly ILog m_log =
43 MethodBase.GetCurrentMethod().DeclaringType);
47 private string m_ConfigName =
"OpenIdService";
50 base(config, server, configName)
52 IConfig serverConfig = config.Configs[m_ConfigName];
53 if (serverConfig == null)
54 throw new Exception(String.Format(
"No section {0} in config file", m_ConfigName));
56 string authService = serverConfig.GetString(
"AuthenticationServiceModule",
58 string userService = serverConfig.GetString(
"UserAccountServiceModule",
61 if (authService == String.Empty || userService == String.Empty)
62 throw new Exception(
"No AuthenticationServiceModule or no UserAccountServiceModule in config file for OpenId authentication");
64 Object[] args =
new Object[] { config };
69 server.AddStreamHandler(
new OpenIdStreamHandler(
"GET",
"/users/", m_UserAccountService, m_AuthenticationService));
71 server.AddStreamHandler(
new OpenIdStreamHandler(
"POST",
"/openid/server/", m_UserAccountService, m_AuthenticationService));
72 server.AddStreamHandler(
new OpenIdStreamHandler(
"GET",
"/openid/server/", m_UserAccountService, m_AuthenticationService));
74 m_log.Info(
"[OPENID]: OpenId service enabled");
OpenIdServerConnector(IConfigSource config, IHttpServer server, string configName)
Interface to OpenSimulator's built in HTTP server. Use this to register handlers (http, llsd, xmlrpc, etc.) for given URLs.