[cpp-sp] branch main updated: Get headers for ECP forwarded in wrapped calls.
Codeberg
noreply at shibboleth.net
Mon Aug 3 17:09:52 UTC 2026
This is an automated email from the git hooks/post-receive script.
codeberg pushed a commit to branch main
in repository cpp-sp.
View the commit online:
https://codeberg.org/Shibboleth/cpp-sp/commit/7fa0981f52f2d5313ff09198596e973509140631
The following commit(s) were added to refs/heads/main by this push:
new 7fa0981f Get headers for ECP forwarded in wrapped calls.
7fa0981f is described below
commit 7fa0981f52f2d5313ff09198596e973509140631
Author: Scott Cantor <scott at restingparrotsoftware.com>
AuthorDate: Mon Aug 3 12:44:36 2026 -0400
Get headers for ECP forwarded in wrapped calls.
---
shibsp/handler/AbstractHandler.h | 16 ++++++++++++++--
shibsp/handler/impl/AbstractHandler.cpp | 16 +++++++++++-----
shibsp/handler/impl/SessionInitiator.cpp | 2 +-
3 files changed, 26 insertions(+), 8 deletions(-)
diff --git a/shibsp/handler/AbstractHandler.h b/shibsp/handler/AbstractHandler.h
index 0c5b9972..4b4cba5b 100644
--- a/shibsp/handler/AbstractHandler.h
+++ b/shibsp/handler/AbstractHandler.h
@@ -41,8 +41,6 @@ namespace shibsp {
/**
* Base class for handlers based on a BoostPropertySet.
- *
- * TODO: Most of this probably is replaced/removed with hub operations.
*/
class SHIBSP_API AbstractHandler : public virtual Handler, public virtual BoostPropertySet
{
@@ -50,10 +48,24 @@ namespace shibsp {
/**
* Constructor.
*
+ * <p>This variant will only forward the "Cookie" header, plus any that are
+ * directly configured on the supplied property set.</p>
+ *
* @param pt root of handler configuration
*/
AbstractHandler(const boost::property_tree::ptree& pt);
+ /**
+ * Constructor.
+ *
+ * <p>This variant will forward the "Cookie" header, the set supplied, plus any that are
+ * directly configured on the supplied property set.</p>
+ *
+ * @param pt root of handler configuration
+ * @param headers preconfigured headers to forward when wrapping requests
+ */
+ AbstractHandler(const boost::property_tree::ptree& pt, const std::set<std::string>& headers);
+
/**
* Wrap a request for remoting to hub.
*
diff --git a/shibsp/handler/impl/AbstractHandler.cpp b/shibsp/handler/impl/AbstractHandler.cpp
index 4bea8e46..22729e2b 100644
--- a/shibsp/handler/impl/AbstractHandler.cpp
+++ b/shibsp/handler/impl/AbstractHandler.cpp
@@ -99,17 +99,23 @@ Handler::~Handler()
{
}
-AbstractHandler::AbstractHandler(const ptree& pt) : m_remotedHeaders({ "Cookie" }) {
+AbstractHandler::AbstractHandler(const ptree& pt) : AbstractHandler(pt, {})
+{
+}
+
+AbstractHandler::AbstractHandler(const ptree& pt, const set<string>& headers)
+{
load(pt);
static const char REMOTED_HEADERS_PROP_NAME[] = "remotedHeaders";
- const char* headers = getString(REMOTED_HEADERS_PROP_NAME);
- if (headers) {
- split_to_container(m_remotedHeaders, headers);
- m_remotedHeaders.insert("Cookie");
+ const char* configuredHeaders = getString(REMOTED_HEADERS_PROP_NAME);
+ if (configuredHeaders) {
+ split_to_container(m_remotedHeaders, configuredHeaders);
}
+ m_remotedHeaders.insert("Cookie");
+ m_remotedHeaders.insert(headers.begin(), headers.end());
}
AbstractHandler::~AbstractHandler()
diff --git a/shibsp/handler/impl/SessionInitiator.cpp b/shibsp/handler/impl/SessionInitiator.cpp
index 0bc41f2b..0dfd39b6 100644
--- a/shibsp/handler/impl/SessionInitiator.cpp
+++ b/shibsp/handler/impl/SessionInitiator.cpp
@@ -62,7 +62,7 @@ namespace shibsp {
};
SessionInitiator::SessionInitiator(const ptree& pt, const char* path)
- : AbstractHandler(pt), m_path(path), m_discoveryEnabled(true)
+ : AbstractHandler(pt, {"Accept", "PAOS"}), m_path(path), m_discoveryEnabled(true)
{
static const char DISCOVERY_ENABLED_PROP_NAME[] = "discoveryEnabled";
static const char REQUEST_MAPPER_SETTINGS_PROP_NAME[] = "requestMapperSettings";
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list