Factor out LogoutInitiator class, simpler API to get ACS by binding.
[shibboleth/sp.git] / shibsp / handler / impl / LogoutInitiator.cpp
1 /*\r
2  *  Copyright 2010 Internet2\r
3  * \r
4  * Licensed under the Apache License, Version 2.0 (the "License");\r
5  * you may not use this file except in compliance with the License.\r
6  * You may obtain a copy of the License at\r
7  *\r
8  *     http://www.apache.org/licenses/LICENSE-2.0\r
9  *\r
10  * Unless required by applicable law or agreed to in writing, software\r
11  * distributed under the License is distributed on an "AS IS" BASIS,\r
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
13  * See the License for the specific language governing permissions and\r
14  * limitations under the License.\r
15  */\r
16 \r
17 /**\r
18  * LogoutInitiator.cpp\r
19  * \r
20  * Pluggable runtime functionality that handles initiating logout.\r
21  */\r
22 \r
23 #include "internal.h"\r
24 #include "handler/LogoutInitiator.h"\r
25 \r
26 using namespace shibsp;\r
27 using namespace xmltooling;\r
28 using namespace std;\r
29 \r
30 namespace shibsp {\r
31     SHIBSP_DLLLOCAL PluginManager< Handler,string,pair<const DOMElement*,const char*> >::Factory ChainingLogoutInitiatorFactory;\r
32     SHIBSP_DLLLOCAL PluginManager< Handler,string,pair<const DOMElement*,const char*> >::Factory SAML2LogoutInitiatorFactory;\r
33     SHIBSP_DLLLOCAL PluginManager< Handler,string,pair<const DOMElement*,const char*> >::Factory LocalLogoutInitiatorFactory;\r
34 };\r
35 \r
36 void SHIBSP_API shibsp::registerLogoutInitiators()\r
37 {\r
38     SPConfig& conf=SPConfig::getConfig();\r
39     conf.LogoutInitiatorManager.registerFactory(CHAINING_LOGOUT_INITIATOR, ChainingLogoutInitiatorFactory);\r
40     conf.LogoutInitiatorManager.registerFactory(SAML2_LOGOUT_INITIATOR, SAML2LogoutInitiatorFactory);\r
41     conf.LogoutInitiatorManager.registerFactory(LOCAL_LOGOUT_INITIATOR, LocalLogoutInitiatorFactory);\r
42 }\r
43 \r
44 LogoutInitiator::LogoutInitiator()\r
45 {\r
46 }\r
47 \r
48 LogoutInitiator::~LogoutInitiator()\r
49 {\r
50 }\r
51 \r
52 #ifndef SHIBSP_LITE\r
53 const char* LogoutInitiator::getType() const\r
54 {\r
55     return "LogoutInitiator";\r
56 }\r
57 #endif\r