/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "remoting/ListenerService.h"
#include <algorithm>
+#include <xmltooling/util/Threads.h>
using namespace shibsp;
using namespace xmltooling;
delete m_lock;
}
+const ServiceProvider& Application::getServiceProvider() const
+{
+ return *m_sp;
+}
+
+const char* Application::getId() const
+{
+ pair<bool,const char*> ret = getString("id");
+ return ret.first ? ret.second : "default";
+}
+
pair<string,const char*> Application::getCookieNameProps(const char* prefix, time_t* lifetime) const
{
static const char* defProps="; path=/";
return pair<string,const char*>(prefix,defProps);
}
+void Application::clearHeader(SPRequest& request, const char* rawname, const char* cginame) const
+{
+ request.clearHeader(rawname, cginame);
+}
+
+void Application::setHeader(SPRequest& request, const char* name, const char* value) const
+{
+ request.setHeader(name, value);
+}
+
+string Application::getSecureHeader(const SPRequest& request, const char* name) const
+{
+ return request.getSecureHeader(name);
+}
+
void Application::clearAttributeHeaders(SPRequest& request) const
{
if (SPConfig::getConfig().isEnabled(SPConfig::OutOfProcess)) {
for (vector< pair<string,string> >::const_iterator i = m_unsetHeaders.begin(); i!=m_unsetHeaders.end(); ++i)
request.clearHeader(i->first.c_str(), i->second.c_str());
}
+
+const Handler* Application::getAssertionConsumerServiceByProtocol(const XMLCh* protocol, const char* binding) const
+{
+ auto_ptr_XMLCh b(binding);
+ const vector<const Handler*>& handlers = getAssertionConsumerServicesByBinding(b.get());
+ return handlers.empty() ? nullptr : handlers.front();
+}