[cpp-sp] 02/02: Replace more literals.

Scott Cantor cantor.2 at osu.edu
Tue Jun 17 18:37:52 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=37f48bc94bd26729c1736b766290f5c44e05841d

commit 37f48bc94bd26729c1736b766290f5c44e05841d
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Jun 17 14:37:46 2025 -0400

    Replace more literals.
---
 shibsp/Agent.cpp                         | 2 +-
 shibsp/RequestMapper.h                   | 1 +
 shibsp/exceptions.cpp                    | 2 +-
 shibsp/handler/impl/SessionInitiator.cpp | 5 +++--
 shibsp/impl/XMLRequestMapper.cpp         | 1 +
 5 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/shibsp/Agent.cpp b/shibsp/Agent.cpp
index 96955cd1..6a4f0343 100644
--- a/shibsp/Agent.cpp
+++ b/shibsp/Agent.cpp
@@ -230,7 +230,7 @@ pair<bool,long> Agent::doAuthentication(SPRequest& request, bool handler) const
 
             // No session, but we require one. Initiate a new session.
             const HandlerConfiguration& handlerConfig = request.getAgent().getHandlerConfiguration(
-                request.getRequestSettings().first->getString("handlerConfigID"));
+                request.getRequestSettings().first->getString(RequestMapper::HANDLER_CONFIG_ID_PROP_NAME));
 
             // Dispatch to SessionInitiator. This MUST handle the request, or we want to fail here.
             // Used to fall through into doExport, but this is a cleaner exit path.
diff --git a/shibsp/RequestMapper.h b/shibsp/RequestMapper.h
index f3348cda..80e41dc5 100644
--- a/shibsp/RequestMapper.h
+++ b/shibsp/RequestMapper.h
@@ -55,6 +55,7 @@ namespace shibsp {
         typedef std::pair<const PropertySet*,AccessControl*> Settings;
 
         static const char APPLICATION_ID_PROP_NAME[];
+        static const char HANDLER_CONFIG_ID_PROP_NAME[];
         static const char ATTRIBUTE_CONFIG_ID_PROP_NAME[];
         static const char SESSION_HOOK_PROP_NAME[];
         static const char LIFETIME_PROP_NAME[];
diff --git a/shibsp/exceptions.cpp b/shibsp/exceptions.cpp
index fc162b6d..71fcee24 100644
--- a/shibsp/exceptions.cpp
+++ b/shibsp/exceptions.cpp
@@ -100,7 +100,7 @@ string AgentException::toQueryString() const
 void AgentException::log(const SPRequest& request, Priority::Value priority) const
 {
     ostringstream msg;
-    msg << what() << ": [";
+    msg << what() << " [";
 
     // Dump properties and status code.
     msg << "status=" << getStatusCode();
diff --git a/shibsp/handler/impl/SessionInitiator.cpp b/shibsp/handler/impl/SessionInitiator.cpp
index d049b0ea..499c6161 100644
--- a/shibsp/handler/impl/SessionInitiator.cpp
+++ b/shibsp/handler/impl/SessionInitiator.cpp
@@ -129,7 +129,8 @@ pair<bool,long> SessionInitiator::run(SPRequest& request, bool isHandler) const
         DDFJanitor inputJanitor(input);
 
         input.structure();
-        input.addmember("application").string(settings->getString("applicationId", "default"));
+        input.addmember("application").string(settings->getString(
+            RequestMapper::APPLICATION_ID_PROP_NAME, RequestMapper::APPLICATION_ID_PROP_DEFAULT));
         input.addmember("handler").unsafe_string(handler.c_str());
         if (state.empty()) {
             input.addmember("target").unsafe_string(target.c_str());
@@ -140,7 +141,7 @@ pair<bool,long> SessionInitiator::run(SPRequest& request, bool isHandler) const
 
         // Add copy of token consumer structure.
         DDF dup = request.getAgent().getHandlerConfiguration(
-            settings->getString("handlerConfigID")).getTokenConsumerInfo(handlerBaseURL);
+            settings->getString(RequestMapper::HANDLER_CONFIG_ID_PROP_NAME)).getTokenConsumerInfo(handlerBaseURL);
         input.add(dup);
 
         DDF wrapped = wrapRequest(request, m_remotedHeaders,
diff --git a/shibsp/impl/XMLRequestMapper.cpp b/shibsp/impl/XMLRequestMapper.cpp
index dc904de8..69edf4b7 100644
--- a/shibsp/impl/XMLRequestMapper.cpp
+++ b/shibsp/impl/XMLRequestMapper.cpp
@@ -156,6 +156,7 @@ void SHIBSP_API shibsp::registerRequestMappers()
 }
 
 const char RequestMapper::APPLICATION_ID_PROP_NAME[] = "applicationId";
+const char RequestMapper::HANDLER_CONFIG_ID_PROP_NAME[] = "handlerConfigId";
 const char RequestMapper::ATTRIBUTE_CONFIG_ID_PROP_NAME[] = "attributeConfigId";
 const char RequestMapper::SESSION_HOOK_PROP_NAME[] = "sessionHook";
 const char RequestMapper::LIFETIME_PROP_NAME[] = "lifetime";

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list