Factor out application ID when remoting.
authorcantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Wed, 30 May 2007 03:19:37 +0000 (03:19 +0000)
committercantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Wed, 30 May 2007 03:19:37 +0000 (03:19 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/trunk@2268 cb58f699-b61c-0410-a6fe-9272a202ed29

shibsp/handler/impl/AssertionConsumerService.cpp
shibsp/handler/impl/AssertionLookup.cpp
shibsp/handler/impl/RemotedHandler.cpp
shibsp/handler/impl/SAML2ArtifactResolution.cpp

index c176cf0..285b0a6 100644 (file)
@@ -90,7 +90,6 @@ pair<bool,long> AssertionConsumerService::run(SPRequest& request, bool isHandler
             DDF out,in = wrap(request);
             DDFJanitor jin(in), jout(out);
             
-            in.addmember("application_id").string(request.getApplication().getId());
             try {
                 out=request.getServiceProvider().getListenerService()->send(in);
             }
index 5b8f006..86e9657 100644 (file)
@@ -113,7 +113,6 @@ pair<bool,long> AssertionLookup::run(SPRequest& request, bool isHandler) const
             DDF out,in = wrap(request, NULL, true);
             DDFJanitor jin(in), jout(out);
             
-            in.addmember("application_id").string(request.getApplication().getId());
             out=request.getServiceProvider().getListenerService()->send(in);
             return unwrap(request, out);
         }
@@ -179,8 +178,8 @@ pair<bool,long> AssertionLookup::processMessage(const Application& application,
         throw FatalProfileException("Assertion not found.");
     }
 
-    stringstream s;\r
-    s << *assertion;\r
+    stringstream s;
+    s << *assertion;
     httpResponse.setContentType("application/samlassertion+xml");
     return make_pair(true, httpResponse.sendResponse(s));
 #else
index b83ccfd..477bdd7 100644 (file)
@@ -21,6 +21,7 @@
  */
 
 #include "internal.h"
+#include "Application.h"
 #include "exceptions.h"
 #include "ServiceProvider.h"
 #include "handler/RemotedHandler.h"
@@ -238,6 +239,7 @@ RemotedHandler::~RemotedHandler()
 DDF RemotedHandler::wrap(const SPRequest& request, const vector<string>* headers, bool certs) const
 {
     DDF in = DDF(m_address.c_str()).structure();
+    in.addmember("application_id").string(request.getApplication().getId());
     in.addmember("scheme").string(request.getScheme());
     in.addmember("hostname").string(request.getHostname());
     in.addmember("port").integer(request.getPort());
index c6de827..12d6004 100644 (file)
@@ -149,7 +149,6 @@ pair<bool,long> SAML2ArtifactResolution::run(SPRequest& request, bool isHandler)
             DDF out,in = wrap(request, NULL, true);
             DDFJanitor jin(in), jout(out);
             
-            in.addmember("application_id").string(request.getApplication().getId());
             out=request.getServiceProvider().getListenerService()->send(in);
             return unwrap(request, out);
         }