[cpp-sp] 01/02: Capture handler pointer after move into map.

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

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

    Capture handler pointer after move into map.
---
 shibsp/handler/impl/DefaultHandlerConfiguration.cpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/shibsp/handler/impl/DefaultHandlerConfiguration.cpp b/shibsp/handler/impl/DefaultHandlerConfiguration.cpp
index a10dfbe5..abe6458c 100644
--- a/shibsp/handler/impl/DefaultHandlerConfiguration.cpp
+++ b/shibsp/handler/impl/DefaultHandlerConfiguration.cpp
@@ -103,8 +103,9 @@ DefaultHandlerConfiguration::DefaultHandlerConfiguration(const char* pathname)
 
         // Save off a single SessionInitiator.
         if (*type == SESSION_INITIATOR_HANDLER) {
-            m_sessionInitiator = handler.get();
-        } else if (*type == TOKEN_CONSUMER_HANDLER) {
+            m_sessionInitiator = m_handlerMap[handlerPath].get();
+        }
+        else if (*type == TOKEN_CONSUMER_HANDLER) {
             DDF tokenConsumer(nullptr);
             // String value of DDF is the handler location.
             tokenConsumer.string(handlerPath.c_str());
@@ -145,7 +146,7 @@ const Handler& DefaultHandlerConfiguration::getSessionInitiator() const
     if (m_sessionInitiator) {
         return *m_sessionInitiator;
     }
-    throw runtime_error("No SessionInitiator configured?");
+    throw ConfigurationException("No SessionInitiator configured.");
 }
 
 DDF DefaultHandlerConfiguration::getTokenConsumerInfo(const char* handlerURL) const

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


More information about the commits mailing list