[shibboleth-sp2] 37/89: SSPCPP-692 - Provide HandlerURL as a environment/header value

Ferenc Wágner wferi at moszumanska.debian.org
Thu Sep 1 09:24:06 UTC 2016


This is an automated email from the git hooks/post-receive script.

wferi pushed a commit to branch master
in repository shibboleth-sp2.

commit fa6d1e994825447f67e2f1ec406425dbb2d6930c
Author: Scott Cantor <cantor.2 at osu.edu>
Date:   Tue May 31 16:11:27 2016 -0400

    SSPCPP-692 - Provide HandlerURL as a environment/header value
    
    https://issues.shibboleth.net/jira/browse/SSPCPP-692
---
 shibsp/ServiceProvider.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/shibsp/ServiceProvider.cpp b/shibsp/ServiceProvider.cpp
index 3ac5236..3d38c4f 100644
--- a/shibsp/ServiceProvider.cpp
+++ b/shibsp/ServiceProvider.cpp
@@ -158,6 +158,7 @@ namespace shibsp {
         app.clearHeader(request, "Shib-AuthnContext-Class", "HTTP_SHIB_AUTHNCONTEXT_CLASS");
         app.clearHeader(request, "Shib-AuthnContext-Decl", "HTTP_SHIB_AUTHNCONTEXT_DECL");
         app.clearHeader(request, "Shib-Assertion-Count", "HTTP_SHIB_ASSERTION_COUNT");
+        app.clearHeader(request, "Shib-Handler", "HTTP_SHIB_HANDLER");
         app.clearAttributeHeaders(request);
         request.clearHeader("REMOTE_USER", "HTTP_REMOTE_USER");
     }
@@ -320,11 +321,14 @@ pair<bool,long> ServiceProvider::doAuthentication(SPRequest& request, bool handl
                     return make_pair(true, request.sendRedirect(loc.c_str()));
                 }
             }
+            app->setHeader(request, "Shib-Handler", handlerURL);
         }
         else {
             // No session.  Maybe that's acceptable?
-            if ((!requireSession.first || !requireSession.second) && !requireSessionWith.first)
+            if ((!requireSession.first || !requireSession.second) && !requireSessionWith.first) {
+                app->setHeader(request, "Shib-Handler", handlerURL);
                 return make_pair(true, request.returnOK());
+            }
 
             // No session, but we require one. Initiate a new session using the indicated method.
             const SessionInitiator* initiator=nullptr;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-shibboleth/shibboleth-sp2.git



More information about the Pkg-shibboleth-devel mailing list