[cpp-sp] branch main updated: Initial changes to support discovery.
Scott Cantor
cantor.2 at osu.edu
Fri Jun 27 20:08:20 UTC 2025
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch main
in repository cpp-sp.
View the commit online:
http://git.shibboleth.net/view/?p=cpp-sp.git;a=commit;h=19e87ac3fa137f925e4cf13352a251e73e617134
The following commit(s) were added to refs/heads/main by this push:
new 19e87ac3 Initial changes to support discovery.
19e87ac3 is described below
commit 19e87ac3fa137f925e4cf13352a251e73e617134
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Fri Jun 27 16:08:05 2025 -0400
Initial changes to support discovery.
---
shibsp/handler/impl/SessionInitiator.cpp | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/shibsp/handler/impl/SessionInitiator.cpp b/shibsp/handler/impl/SessionInitiator.cpp
index acbf9c31..7460a14c 100644
--- a/shibsp/handler/impl/SessionInitiator.cpp
+++ b/shibsp/handler/impl/SessionInitiator.cpp
@@ -21,12 +21,14 @@
#include "internal.h"
#include "exceptions.h"
#include "Agent.h"
+#include "AgentConfig.h"
#include "SPRequest.h"
#include "handler/AbstractHandler.h"
#include "handler/HandlerConfiguration.h"
#include "logging/Category.h"
#include "remoting/RemotingService.h"
#include "util/Misc.h"
+#include "util/URLEncoder.h"
using namespace shibsp;
using namespace boost::property_tree;
@@ -97,7 +99,7 @@ pair<bool,long> SessionInitiator::run(SPRequest& request, bool isHandler) const
// that this is a request in resoonse to a discovery round trip and will impact how
// the request to the hub is made, to ensure a loop back to a DS is avoided.
const char* param = request.getParameter("DS");
- bool discovery = param && !strcmp(param, "1");
+ bool discoveryDone = param && !strcmp(param, "1");
// Check for a state parameter in the query string.
param = request.getParameter("state");
@@ -108,7 +110,7 @@ pair<bool,long> SessionInitiator::run(SPRequest& request, bool isHandler) const
// handler can be derived from "this" URL since this is a re-entrant call to this handler,
// i.e., we know this is the right URL to use because "it already was" originally.
handlerBaseURL = request.getHandlerURL(request.getRequestURL());
- if (!discovery) {
+ if (!discoveryDone) {
handler = handlerBaseURL + m_path;
}
}
@@ -119,7 +121,7 @@ pair<bool,long> SessionInitiator::run(SPRequest& request, bool isHandler) const
// handler is derived from the target resource.
handlerBaseURL = request.getHandlerURL(target.c_str());
- if (!discovery) {
+ if (!discoveryDone) {
handler = handlerBaseURL + m_path;
}
}
@@ -146,7 +148,10 @@ pair<bool,long> SessionInitiator::run(SPRequest& request, bool isHandler) const
// Will be set unless discovery was already attempted.
if (!handler.empty()) {
- input.addmember("handler").unsafe_string(handler.c_str());
+ // Decorate the handler URL with the signal parameter and then any recognized/allowed custom parameters.
+ handler += "?DS=1";
+ // TODO: the other parameters
+ input.addmember("disco_return_url").string(AgentConfig::getConfig().getURLEncoder().encode(handler.c_str()));
}
if (state.empty()) {
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list