Support for application-specific attribute IDs.
[shibboleth/sp.git] / shibsp / handler / impl / AssertionConsumerService.cpp
index 891dbe9..829208b 100644 (file)
@@ -41,10 +41,14 @@ using namespace xmltooling;
 using namespace log4cpp;
 using namespace std;
 
-AssertionConsumerService::AssertionConsumerService(const DOMElement* e, Category& log)
+AssertionConsumerService::AssertionConsumerService(const DOMElement* e, const char* appId, Category& log)
     : AbstractHandler(e, log), m_decoder(NULL), m_configNS(SHIB2SPCONFIG_NS),
         m_role(samlconstants::SAML20MD_NS, opensaml::saml2md::IDPSSODescriptor::LOCAL_NAME)
 {
+    string address(appId);
+    address += getString("Location").second;
+    address += "::run::ACS";
+    setAddress(address.c_str());
     if (SPConfig::getConfig().isEnabled(SPConfig::OutOfProcess))
         m_decoder = SAMLConfig::getConfig().MessageDecoderManager.newPlugin(getString("Binding").second,e);
 }
@@ -229,7 +233,7 @@ ResolutionContext* AssertionConsumerService::resolveAttributes(
     const Application& application,
     const HTTPRequest& httpRequest,
     const saml2md::EntityDescriptor* issuer,
-    const saml2::NameID& nameid,
+    const saml2::NameID* nameid,
     const vector<const Assertion*>* tokens
     ) const
 {
@@ -244,7 +248,7 @@ ResolutionContext* AssertionConsumerService::resolveAttributes(
         auto_ptr<ResolutionContext> ctx(
             resolver->createResolutionContext(application, httpRequest.getRemoteAddr().c_str(), issuer, nameid, tokens)
             );
-        resolver->resolveAttributes(*ctx.get());
+        resolver->resolveAttributes(*ctx.get(), application.getAttributeIds());
         return ctx.release();
     }
     catch (exception& ex) {