diff options
author | MW | 2009-02-24 13:33:57 +0000 |
---|---|---|
committer | MW | 2009-02-24 13:33:57 +0000 |
commit | 2a91f21d082aee4dc97b5b0d29e1739cfe409024 (patch) | |
tree | 950cf659d45ffc05367814c0075b48f4a2aabbc5 /OpenSim/Grid/UserServer/UserLoginService.cs | |
parent | update version number for bamboo zip file output (diff) | |
download | opensim-SC-2a91f21d082aee4dc97b5b0d29e1739cfe409024.zip opensim-SC-2a91f21d082aee4dc97b5b0d29e1739cfe409024.tar.gz opensim-SC-2a91f21d082aee4dc97b5b0d29e1739cfe409024.tar.bz2 opensim-SC-2a91f21d082aee4dc97b5b0d29e1739cfe409024.tar.xz |
More refactoring of the UserServer.
Diffstat (limited to 'OpenSim/Grid/UserServer/UserLoginService.cs')
-rw-r--r-- | OpenSim/Grid/UserServer/UserLoginService.cs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs index 0bec2a1..0cb4976 100644 --- a/OpenSim/Grid/UserServer/UserLoginService.cs +++ b/OpenSim/Grid/UserServer/UserLoginService.cs | |||
@@ -38,6 +38,7 @@ using OpenSim.Framework; | |||
38 | using OpenSim.Framework.Communications; | 38 | using OpenSim.Framework.Communications; |
39 | using OpenSim.Framework.Communications.Cache; | 39 | using OpenSim.Framework.Communications.Cache; |
40 | using OpenSim.Framework.Communications.Capabilities; | 40 | using OpenSim.Framework.Communications.Capabilities; |
41 | using OpenSim.Framework.Servers; | ||
41 | 42 | ||
42 | namespace OpenSim.Grid.UserServer | 43 | namespace OpenSim.Grid.UserServer |
43 | { | 44 | { |
@@ -61,6 +62,8 @@ namespace OpenSim.Grid.UserServer | |||
61 | public UserConfig m_config; | 62 | public UserConfig m_config; |
62 | private readonly IRegionProfileService m_regionProfileService; | 63 | private readonly IRegionProfileService m_regionProfileService; |
63 | 64 | ||
65 | protected BaseHttpServer m_httpServer; | ||
66 | |||
64 | public UserLoginService( | 67 | public UserLoginService( |
65 | UserManagerBase userManager, IInterServiceInventoryServices inventoryService, | 68 | UserManagerBase userManager, IInterServiceInventoryServices inventoryService, |
66 | LibraryRootFolder libraryRootFolder, | 69 | LibraryRootFolder libraryRootFolder, |
@@ -71,6 +74,29 @@ namespace OpenSim.Grid.UserServer | |||
71 | m_inventoryService = inventoryService; | 74 | m_inventoryService = inventoryService; |
72 | m_regionProfileService = regionProfileService; | 75 | m_regionProfileService = regionProfileService; |
73 | } | 76 | } |
77 | |||
78 | public void RegisterHandlers(BaseHttpServer httpServer, bool registerLLSDHandler, bool registerOpenIDHandlers) | ||
79 | { | ||
80 | m_httpServer = httpServer; | ||
81 | |||
82 | m_httpServer.AddXmlRPCHandler("login_to_simulator", XmlRpcLoginMethod); | ||
83 | m_httpServer.AddHTTPHandler("login", ProcessHTMLLogin); | ||
84 | m_httpServer.AddXmlRPCHandler("set_login_params", XmlRPCSetLoginParams); | ||
85 | |||
86 | if (registerLLSDHandler) | ||
87 | { | ||
88 | m_httpServer.SetDefaultLLSDHandler(LLSDLoginMethod); | ||
89 | } | ||
90 | |||
91 | if (registerOpenIDHandlers) | ||
92 | { | ||
93 | // Handler for OpenID avatar identity pages | ||
94 | m_httpServer.AddStreamHandler(new OpenIdStreamHandler("GET", "/users/", this)); | ||
95 | // Handlers for the OpenID endpoint server | ||
96 | m_httpServer.AddStreamHandler(new OpenIdStreamHandler("POST", "/openid/server/", this)); | ||
97 | m_httpServer.AddStreamHandler(new OpenIdStreamHandler("GET", "/openid/server/", this)); | ||
98 | } | ||
99 | } | ||
74 | 100 | ||
75 | public void setloginlevel(int level) | 101 | public void setloginlevel(int level) |
76 | { | 102 | { |