# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "isapi_shib", "isapi_shib\isapi_shib.vcproj", "{87C25D4E-8D19-4513-B0BA-BC668BC2DEE3}"
ProjectSection(ProjectDependencies) = postProject
- {81F0F7A6-DC36-46EF-957F-F9E81D4403F6} = {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}
- {84890110-2190-4AAE-9BDC-58F90DF71E4F} = {84890110-2190-4AAE-9BDC-58F90DF71E4F}
{E6CAB6C8-1D73-4410-970A-52BF9EC57810} = {E6CAB6C8-1D73-4410-970A-52BF9EC57810}
+ {84890110-2190-4AAE-9BDC-58F90DF71E4F} = {84890110-2190-4AAE-9BDC-58F90DF71E4F}
+ {81F0F7A6-DC36-46EF-957F-F9E81D4403F6} = {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "isapi_shib_gui", "isapi_shib_gui\isapi_shib_gui.vcproj", "{D341DCD8-7DCD-43A2-8559-C07DAB838711}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_shib13", "apache\mod_shib13.vcproj", "{D243B43E-728E-4F32-BDFF-B3A897037C6D}"
ProjectSection(ProjectDependencies) = postProject
- {81F0F7A6-DC36-46EF-957F-F9E81D4403F6} = {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}
- {84890110-2190-4AAE-9BDC-58F90DF71E4F} = {84890110-2190-4AAE-9BDC-58F90DF71E4F}
{E6CAB6C8-1D73-4410-970A-52BF9EC57810} = {E6CAB6C8-1D73-4410-970A-52BF9EC57810}
+ {84890110-2190-4AAE-9BDC-58F90DF71E4F} = {84890110-2190-4AAE-9BDC-58F90DF71E4F}
+ {81F0F7A6-DC36-46EF-957F-F9E81D4403F6} = {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_shib20", "apache\mod_shib20.vcproj", "{68E9568B-476C-4289-B93C-893432378ADC}"
ProjectSection(ProjectDependencies) = postProject
- {81F0F7A6-DC36-46EF-957F-F9E81D4403F6} = {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}
- {84890110-2190-4AAE-9BDC-58F90DF71E4F} = {84890110-2190-4AAE-9BDC-58F90DF71E4F}
{E6CAB6C8-1D73-4410-970A-52BF9EC57810} = {E6CAB6C8-1D73-4410-970A-52BF9EC57810}
+ {84890110-2190-4AAE-9BDC-58F90DF71E4F} = {84890110-2190-4AAE-9BDC-58F90DF71E4F}
+ {81F0F7A6-DC36-46EF-957F-F9E81D4403F6} = {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nsapi_shib", "nsapi_shib\nsapi_shib.vcproj", "{1396D80A-8672-4224-9B02-95F3F4207CDB}"
ProjectSection(ProjectDependencies) = postProject
- {E6CAB6C8-1D73-4410-970A-52BF9EC57810} = {E6CAB6C8-1D73-4410-970A-52BF9EC57810}
- {81F0F7A6-DC36-46EF-957F-F9E81D4403F6} = {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}
{84890110-2190-4AAE-9BDC-58F90DF71E4F} = {84890110-2190-4AAE-9BDC-58F90DF71E4F}
+ {81F0F7A6-DC36-46EF-957F-F9E81D4403F6} = {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}
+ {E6CAB6C8-1D73-4410-970A-52BF9EC57810} = {E6CAB6C8-1D73-4410-970A-52BF9EC57810}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "posttest", "posttest\posttest.vcproj", "{16E70C47-789E-43D5-AFDF-964D386C3CB5}"
ProjectSection(ProjectDependencies) = postProject
- {E6CAB6C8-1D73-4410-970A-52BF9EC57810} = {E6CAB6C8-1D73-4410-970A-52BF9EC57810}
- {81F0F7A6-DC36-46EF-957F-F9E81D4403F6} = {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}
{84890110-2190-4AAE-9BDC-58F90DF71E4F} = {84890110-2190-4AAE-9BDC-58F90DF71E4F}
+ {81F0F7A6-DC36-46EF-957F-F9E81D4403F6} = {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}
+ {E6CAB6C8-1D73-4410-970A-52BF9EC57810} = {E6CAB6C8-1D73-4410-970A-52BF9EC57810}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shar", "shar\shar.vcproj", "{F13141B5-6C87-40BB-8D4E-5CC56EBB4C59}"
ProjectSection(ProjectDependencies) = postProject
- {81F0F7A6-DC36-46EF-957F-F9E81D4403F6} = {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}
- {84890110-2190-4AAE-9BDC-58F90DF71E4F} = {84890110-2190-4AAE-9BDC-58F90DF71E4F}
{E6CAB6C8-1D73-4410-970A-52BF9EC57810} = {E6CAB6C8-1D73-4410-970A-52BF9EC57810}
+ {84890110-2190-4AAE-9BDC-58F90DF71E4F} = {84890110-2190-4AAE-9BDC-58F90DF71E4F}
+ {81F0F7A6-DC36-46EF-957F-F9E81D4403F6} = {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shib", "shib\shib.vcproj", "{E6CAB6C8-1D73-4410-970A-52BF9EC57810}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shib_mysql_ccache", "shib-mysql-ccache\shib_mysql_ccache.vcproj", "{54671467-CA4D-4BA3-9A27-15ED5576143D}"
ProjectSection(ProjectDependencies) = postProject
{84890110-2190-4AAE-9BDC-58F90DF71E4F} = {84890110-2190-4AAE-9BDC-58F90DF71E4F}
+ {81F0F7A6-DC36-46EF-957F-F9E81D4403F6} = {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shibtarget", "shib-target\shibtarget.vcproj", "{84890110-2190-4AAE-9BDC-58F90DF71E4F}"
ProjectSection(ProjectDependencies) = postProject
- {E6CAB6C8-1D73-4410-970A-52BF9EC57810} = {E6CAB6C8-1D73-4410-970A-52BF9EC57810}
{81F0F7A6-DC36-46EF-957F-F9E81D4403F6} = {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}
+ {E6CAB6C8-1D73-4410-970A-52BF9EC57810} = {E6CAB6C8-1D73-4410-970A-52BF9EC57810}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shibtest", "shibtest\shibtest.vcproj", "{67AF22A3-C26E-40BE-B0CA-2ABEE5123763}"
ProjectSection(ProjectDependencies) = postProject
- {81F0F7A6-DC36-46EF-957F-F9E81D4403F6} = {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}
- {84890110-2190-4AAE-9BDC-58F90DF71E4F} = {84890110-2190-4AAE-9BDC-58F90DF71E4F}
{E6CAB6C8-1D73-4410-970A-52BF9EC57810} = {E6CAB6C8-1D73-4410-970A-52BF9EC57810}
+ {84890110-2190-4AAE-9BDC-58F90DF71E4F} = {84890110-2190-4AAE-9BDC-58F90DF71E4F}
+ {81F0F7A6-DC36-46EF-957F-F9E81D4403F6} = {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "siterefresh", "siterefresh\siterefresh.vcproj", "{4D02F36E-D2CD-4FD1-AC50-2941E27BB3FB}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testclient", "shar\testclient.vcproj", "{B3F1E899-86F9-4D3A-8026-B57D1A5B90B1}"
ProjectSection(ProjectDependencies) = postProject
- {E6CAB6C8-1D73-4410-970A-52BF9EC57810} = {E6CAB6C8-1D73-4410-970A-52BF9EC57810}
- {81F0F7A6-DC36-46EF-957F-F9E81D4403F6} = {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}
{84890110-2190-4AAE-9BDC-58F90DF71E4F} = {84890110-2190-4AAE-9BDC-58F90DF71E4F}
+ {81F0F7A6-DC36-46EF-957F-F9E81D4403F6} = {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}
+ {E6CAB6C8-1D73-4410-970A-52BF9EC57810} = {E6CAB6C8-1D73-4410-970A-52BF9EC57810}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xmlproviders", "xmlproviders\xmlproviders.vcproj", "{68E46D06-6B91-4C59-A700-78DD4D4C420B}"
ProjectSection(ProjectDependencies) = postProject
- {E6CAB6C8-1D73-4410-970A-52BF9EC57810} = {E6CAB6C8-1D73-4410-970A-52BF9EC57810}
- {81F0F7A6-DC36-46EF-957F-F9E81D4403F6} = {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}
{84890110-2190-4AAE-9BDC-58F90DF71E4F} = {84890110-2190-4AAE-9BDC-58F90DF71E4F}
+ {81F0F7A6-DC36-46EF-957F-F9E81D4403F6} = {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}
+ {E6CAB6C8-1D73-4410-970A-52BF9EC57810} = {E6CAB6C8-1D73-4410-970A-52BF9EC57810}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "odbc_ccache", "odbc_ccache\odbc_ccache.vcproj", "{DAC7FB99-038A-45C9-A27C-21B6C8D4CD1E}"
ProjectSection(ProjectDependencies) = postProject
- {81F0F7A6-DC36-46EF-957F-F9E81D4403F6} = {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}
{84890110-2190-4AAE-9BDC-58F90DF71E4F} = {84890110-2190-4AAE-9BDC-58F90DF71E4F}
+ {81F0F7A6-DC36-46EF-957F-F9E81D4403F6} = {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_shib22", "apache\mod_shib22.vcproj", "{B44C0852-83B8-4FB2-A86E-097C9C8256D0}"
ProjectSection(ProjectDependencies) = postProject
- {81F0F7A6-DC36-46EF-957F-F9E81D4403F6} = {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}
- {84890110-2190-4AAE-9BDC-58F90DF71E4F} = {84890110-2190-4AAE-9BDC-58F90DF71E4F}
{E6CAB6C8-1D73-4410-970A-52BF9EC57810} = {E6CAB6C8-1D73-4410-970A-52BF9EC57810}
+ {84890110-2190-4AAE-9BDC-58F90DF71E4F} = {84890110-2190-4AAE-9BDC-58F90DF71E4F}
+ {81F0F7A6-DC36-46EF-957F-F9E81D4403F6} = {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Server Modules", "Server Modules", "{26BA8F84-6E42-41FA-9B13-5D3F4B5B2050}"
#include <shib-target/shib-target.h>
#include <shibsp/exceptions.h>
+#include <shibsp/SPConfig.h>
#include <log4cpp/Category.hh>
#include <xmltooling/util/NDC.h>
#include <xmltooling/util/Threads.h>
// Factories
-IPlugIn* new_odbc_ccache(const DOMElement* e)
+SessionCache* new_odbc_ccache(const DOMElement* const & e)
{
return new ODBCCCache(e);
}
{
// register this ccache type
SAMLConfig::getConfig().getPlugMgr().regFactory(ODBC_REPLAYCACHE, &new_odbc_replay);
- SAMLConfig::getConfig().getPlugMgr().regFactory(ODBC_SESSIONCACHE, &new_odbc_ccache);
+ SPConfig::getConfig().SessionCacheManager.registerFactory(ODBC_SESSIONCACHE, &new_odbc_ccache);
return 0;
}
extern "C" void SHIBODBC_EXPORTS saml_extension_term()
{
- SAMLConfig::getConfig().getPlugMgr().unregFactory(ODBC_SESSIONCACHE);
SAMLConfig::getConfig().getPlugMgr().unregFactory(ODBC_REPLAYCACHE);
}
#include <xmltooling/util/NDC.h>
#include <xmltooling/util/Threads.h>
#include <xmltooling/util/XMLHelper.h>
+#include <shibsp/SPConfig.h>
using xmltooling::XMLHelper;
#include <sstream>
#include <dmalloc.h>
#endif
+using namespace shibsp;
using namespace shibtarget;
using namespace opensaml::saml2md;
using namespace saml;
* The registration functions here...
*/
-IPlugIn* new_mysql_ccache(const DOMElement* e)
+SessionCache* new_mysql_ccache(const DOMElement* const & e)
{
return new ShibMySQLCCache(e);
}
{
// register this ccache type
SAMLConfig::getConfig().getPlugMgr().regFactory(MYSQL_REPLAYCACHE, &new_mysql_replay);
- SAMLConfig::getConfig().getPlugMgr().regFactory(MYSQL_SESSIONCACHE, &new_mysql_ccache);
+ SPConfig::getConfig().SessionCacheManager.registerFactory(MYSQL_SESSIONCACHE, &new_mysql_ccache);
return 0;
}
if (g_MySQLInitialized)
mysql_server_end();
SAMLConfig::getConfig().getPlugMgr().unregFactory(MYSQL_REPLAYCACHE);
- SAMLConfig::getConfig().getPlugMgr().unregFactory(MYSQL_SESSIONCACHE);
}
return NULL;
}
-IPlugIn* MemoryCacheFactory(const DOMElement* e)
+SessionCache* MemoryCacheFactory(const DOMElement* const & e)
{
// If this is a long-lived process, we return the "real" cache.
if (SPConfig::getConfig().isEnabled(SPConfig::OutOfProcess))
#endif
PlugManager::Factory TCPListenerFactory;
//PlugManager::Factory MemoryListenerFactory;
-PlugManager::Factory MemoryCacheFactory;
+PluginManager<SessionCache,const DOMElement*>::Factory MemoryCacheFactory;
PluginManager<Handler,const DOMElement*>::Factory ShibSessionInitiatorFactory;
PluginManager<Handler,const DOMElement*>::Factory SAML1POSTFactory;
PluginManager<Handler,const DOMElement*>::Factory SAML1ArtifactFactory;
conf.AssertionConsumerServiceManager.registerFactory(samlconstants::SAML1_PROFILE_BROWSER_ARTIFACT,&SAML1ArtifactFactory);
conf.SingleLogoutServiceManager.registerFactory(shibspconstants::SHIB1_LOGOUT_PROFILE_URI,&ShibLogoutFactory);
- samlConf.getPlugMgr().regFactory(MEMORY_SESSIONCACHE,&MemoryCacheFactory);
+ conf.SessionCacheManager.registerFactory(MEMORY_SESSIONCACHE,&MemoryCacheFactory);
log.info("finished initializing");
return true;
log.debug("application: %s", app->getId());
// Access the application config.
- IConfig* conf=dynamic_cast<IConfig*>(SPConfig::getConfig().getServiceProvider());
+ ServiceProvider* conf=SPConfig::getConfig().getServiceProvider();
xmltooling::Locker confLocker(conf);
auto_ptr_XMLCh wrecipient(recipient);
bpr=app->getBrowserProfile()->receive(
samlResponse,
wrecipient.get(),
- checkReplay.second ? conf->getReplayCache() : NULL,
+ NULL,
version.second
);
}
SAMLart,
wrecipient.get(),
artifactMapper.get(),
- checkReplay.second ? conf->getReplayCache() : NULL,
+ NULL,
version.second
);
// Insert into cache.
auto_ptr_char authContext(bpr.authnStatement->getAuthMethod());
- string key=conf->getSessionCache()->insert(
+ string key=dynamic_cast<ISessionCache*>(conf->getSessionCache())->insert(
app,
role,
client_address,
class XMLApplication : public virtual IApplication, public DOMPropertySet, public DOMNodeFilter
{
public:
- XMLApplication(const IConfig*, const DOMElement* e, const XMLApplication* base=NULL);
+ XMLApplication(const ServiceProvider*, const DOMElement* e, const XMLApplication* base=NULL);
~XMLApplication() { cleanup(); }
// PropertySet
private:
void cleanup();
- const IConfig* m_ini; // this is ok because its locking scope includes us
+ const ServiceProvider* m_sp; // this is ok because its locking scope includes us
const XMLApplication* m_base;
string m_hash;
vector<IAAP*> m_aaps;
#pragma warning( disable : 4250 )
#endif
- class XMLConfig : public IConfig, public ReloadableXMLFile
+ class XMLConfig : public ServiceProvider, public ReloadableXMLFile
{
public:
XMLConfig(const DOMElement* e)
- : ReloadableXMLFile(e), m_impl(NULL), m_listener(NULL), m_sessionCache(NULL), m_replayCache(NULL) {
+ : ReloadableXMLFile(e), m_impl(NULL), m_listener(NULL), m_sessionCache(NULL) {
}
void init() {
~XMLConfig() {
delete m_impl;
delete m_sessionCache;
- delete m_replayCache;
delete m_listener;
}
return m_listener;
}
- ISessionCache* getSessionCache() const {return m_sessionCache;}
- IReplayCache* getReplayCache() const {return m_replayCache;}
- RequestMapper* getRequestMapper() const {return m_impl->m_requestMapper;}
+ SessionCache* getSessionCache(bool required=true) const {
+ if (required && !m_sessionCache)
+ throw ConfigurationException("No SessionCache available.");
+ return m_sessionCache;
+ }
+
+ RequestMapper* getRequestMapper(bool required=true) const {
+ if (required && !m_impl->m_requestMapper)
+ throw ConfigurationException("No RequestMapper available.");
+ return m_impl->m_requestMapper;
+ }
+
const Application* getApplication(const char* applicationId) const {
map<string,Application*>::const_iterator i=m_impl->m_appmap.find(applicationId);
return (i!=m_impl->m_appmap.end()) ? i->second : NULL;
friend class XMLConfigImpl;
XMLConfigImpl* m_impl;
mutable ListenerService* m_listener;
- mutable ISessionCache* m_sessionCache;
- mutable IReplayCache* m_replayCache;
+ mutable SessionCache* m_sessionCache;
};
#if defined (_MSC_VER)
}
XMLApplication::XMLApplication(
- const IConfig* ini,
+ const ServiceProvider* sp,
const DOMElement* e,
const XMLApplication* base
- ) : m_ini(ini), m_base(base), m_metadata(NULL), m_trust(NULL), m_profile(NULL), m_binding(NULL), m_bindingHook(NULL),
+ ) : m_sp(sp), m_base(base), m_metadata(NULL), m_trust(NULL), m_profile(NULL), m_binding(NULL), m_bindingHook(NULL),
m_credDefault(NULL), m_sessionInitDefault(NULL), m_acsDefault(NULL)
{
#ifdef _DEBUG
load(e,log,this,&root_remap);
const DOMElement* child;
- IPlugIn* plugin=NULL;
string plugtype;
// Much of the processing can only occur on the first instantiation.
child=XMLHelper::getFirstChildElement(container,MemorySessionCache);
if (child) {
log.info("building Session Cache of type %s...",MEMORY_SESSIONCACHE);
- plugin=shibConf.getPlugMgr().newPlugin(MEMORY_SESSIONCACHE,child);
+ m_outer->m_sessionCache=conf.SessionCacheManager.newPlugin(MEMORY_SESSIONCACHE,child);
}
else {
child=XMLHelper::getFirstChildElement(container,SessionCache);
if (child) {
xmltooling::auto_ptr_char type(child->getAttributeNS(NULL,_type));
log.info("building Session Cache of type %s...",type.get());
- plugin=shibConf.getPlugMgr().newPlugin(type.get(),child);
+ m_outer->m_sessionCache=conf.SessionCacheManager.newPlugin(type.get(),child);
}
else {
log.info("custom SessionCache unspecified or no longer supported, building SessionCache of type %s...",MEMORY_SESSIONCACHE);
- plugin=shibConf.getPlugMgr().newPlugin(MEMORY_SESSIONCACHE,child);
- }
- }
- if (plugin) {
- ISessionCache* cache=dynamic_cast<ISessionCache*>(plugin);
- if (cache)
- m_outer->m_sessionCache=cache;
- else {
- delete plugin;
- log.fatal("plugin was not a Session Cache object");
- throw UnknownExtensionException("plugin was not a Session Cache object");
+ m_outer->m_sessionCache=conf.SessionCacheManager.newPlugin(MEMORY_SESSIONCACHE,child);
}
}
// Replay cache.
// TODO: switch to new cache interface
+ /*
child=XMLHelper::getFirstChildElement(container,ReplayCache);
if (child) {
xmltooling::auto_ptr_char type(child->getAttributeNS(NULL,_type));
log.info("custom ReplayCache unspecified or no longer supported, building default ReplayCache...");
m_outer->m_replayCache=IReplayCache::getInstance();
}
+ */
}
} // end of first-time-only stuff
xmltooling::auto_ptr_char type(child->getAttributeNS(NULL,_type));
log.info("building Attribute factory of type %s...",type.get());
try {
- plugin=shibConf.getPlugMgr().newPlugin(type.get(),child);
+ IPlugIn* plugin=shibConf.getPlugMgr().newPlugin(type.get(),child);
if (plugin) {
IAttributeFactory* fact=dynamic_cast<IAttributeFactory*>(plugin);
if (fact) {
#include <shibsp/Handler.h>
#include <shibsp/RequestMapper.h>
#include <shibsp/ServiceProvider.h>
+#include <shibsp/SessionCache.h>
#include <shibsp/remoting/ListenerService.h>
// Old headers
* remote and/or optimize calls by implementing custom versions of the
* ISessionCacheEntry interface as required.
*/
- struct SHIBTARGET_EXPORTS ISessionCache : public virtual saml::IPlugIn
+ struct SHIBTARGET_EXPORTS ISessionCache : virtual public shibsp::SessionCache
{
virtual std::string insert(
const IApplication* application,
#define ODBC_REPLAYCACHE "edu.internet2.middleware.shibboleth.sp.provider.ODBCReplayCacheProvider"
- struct SHIBTARGET_EXPORTS IConfig : public virtual shibsp::ServiceProvider
- {
- virtual ISessionCache* getSessionCache() const=0;
- virtual saml::IReplayCache* getReplayCache() const=0;
- virtual ~IConfig() {}
- };
-
class SHIBTARGET_EXPORTS ShibTargetConfig
{
public:
Application.cpp \
ServiceProvider.cpp \
SPConfig.cpp \
+ impl/StorageServiceSessionCache.cpp \
impl/XMLAccessControl.cpp \
impl/XMLRequestMapper.cpp \
metadata/MetadataExtImpl.cpp \
#include "Handler.h"
#include "RequestMapper.h"
#include "ServiceProvider.h"
+#include "SessionCache.h"
#include "SPConfig.h"
#include "metadata/MetadataExt.h"
#include "remoting/ListenerService.h"
registerAccessControls();
registerListenerServices();
registerRequestMappers();
+ registerSessionCaches();
registerServiceProviders();
log.info("library initialization complete");
SingleLogoutServiceManager.deregisterFactories();
SessionInitiatorManager.deregisterFactories();
+ SessionCacheManager.deregisterFactories();
ServiceProviderManager.deregisterFactories();
RequestMapperManager.deregisterFactories();
ManageNameIDServiceManager.deregisterFactories();
class SHIBSP_API ListenerService;
class SHIBSP_API RequestMapper;
class SHIBSP_API ServiceProvider;
+ class SHIBSP_API SessionCache;
#if defined (_MSC_VER)
#pragma warning( push )
xmltooling::PluginManager<ServiceProvider,const xercesc::DOMElement*> ServiceProviderManager;
/**
+ * Manages factories for SessionCache plugins.
+ */
+ xmltooling::PluginManager<SessionCache,const xercesc::DOMElement*> SessionCacheManager;
+
+ /**
* Manages factories for Handler plugins that implement SessionInitiator functionality.
*/
xmltooling::PluginManager<Handler,const xercesc::DOMElement*> SessionInitiatorManager;
virtual void init()=0;
/**
+ * Returns a SessionCache instance.
+ *
+ * @param required true iff an exception should be thrown if no SessionCache is available
+ * @return a SessionCache
+ */
+ virtual SessionCache* getSessionCache(bool required=true) const=0;
+
+ /**
* Returns a ListenerService instance.
*
* @param required true iff an exception should be thrown if no ListenerService is available
- * @return a ListenerService if available, or NULL
+ * @return a ListenerService
*/
virtual ListenerService* getListenerService(bool required=true) const=0;
/**
* Returns a RequestMapper instance.
*
- * @param a RequestMapper if available, or NULL
+ * @param required true iff an exception should be thrown if no RequestMapper is available
+ * @param a RequestMapper
*/
- virtual RequestMapper* getRequestMapper() const=0;
+ virtual RequestMapper* getRequestMapper(bool required=true) const=0;
//virtual ISessionCache* getSessionCache() const=0;
class SHIBSP_API SessionCache
{
MAKE_NONCOPYABLE(SessionCache);
+ protected:
+ SessionCache() {}
public:
- /**
- * Constructor
- *
- * @param e root of DOM to configure cache
- */
- SessionCache(const xercesc::DOMElement* e);
-
- virtual ~SessionCache();
-
- /** TODO: just a stub for now */
- virtual Session* find(const char* key, const Application& app, const char* address)=0;
+ virtual ~SessionCache() {}
};
+
+ /**
+ * Registers SessionCache classes into the runtime.
+ */
+ void SHIBSP_API registerSessionCaches();
};
#endif /* __shibsp_sessioncache_h__ */
--- /dev/null
+/*\r
+ * Copyright 2001-2005 Internet2\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+/** StorageServiceSessionCache.cpp\r
+ * \r
+ * StorageService-based SessionCache implementation\r
+ */\r
+\r
+#include "internal.h"\r
+#include "SessionCache.h"\r
+#include "util/SPConstants.h"\r
+\r
+#include <log4cpp/Category.hh>\r
+#include <xmltooling/util/NDC.h>\r
+#include <xmltooling/util/XMLHelper.h>\r
+#include <xercesc/util/XMLUniDefs.hpp>\r
+\r
+using namespace shibsp;\r
+using namespace xmltooling;\r
+using namespace log4cpp;\r
+using namespace std;\r
+/*\r
+namespace shibsp {\r
+\r
+ SessionCache* SHIBSP_DLLLOCAL XMLRequestMapperFactory(const DOMElement* const & e)\r
+ {\r
+ return new XMLRequestMapper(e);\r
+ }\r
+\r
+}\r
+*/\r
+void SHIBSP_API shibsp::registerSessionCaches()\r
+{\r
+ //SPConfig::getConfig().SessionCacheManager.registerFactory(XML_REQUEST_MAPPER, XMLRequestMapperFactory);\r
+}\r
Name="impl"\r
>\r
<File\r
+ RelativePath=".\impl\StorageServiceSessionCache.cpp"\r
+ >\r
+ </File>\r
+ <File\r
RelativePath=".\impl\XMLAccessControl.cpp"\r
>\r
</File>\r