temporary fix for SIDP-72 so Nate can continue testing
authorlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Wed, 12 Dec 2007 12:22:13 +0000 (12:22 +0000)
committerlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Wed, 12 Dec 2007 12:22:13 +0000 (12:22 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@2494 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/idp/profile/saml2/AbstractSAML2ProfileHandler.java

index 4ce8fb9..a29ef50 100644 (file)
@@ -302,11 +302,14 @@ public abstract class AbstractSAML2ProfileHandler extends AbstractSAMLProfileHan
         Collection<String> audiences;
 
         // add audience restrictions
+        AudienceRestriction audienceRestriction = audienceRestrictionBuilder.buildObject();
+        //TODO we should only do this for certain outgoing bindings, not globally
+        Audience audience = audienceBuilder.buildObject();
+        audience.setAudienceURI(requestContext.getInboundMessageIssuer());
         audiences = profileConfig.getAssertionAudiences();
         if (audiences != null && audiences.size() > 0) {
-            AudienceRestriction audienceRestriction = audienceRestrictionBuilder.buildObject();
             for (String audienceUri : audiences) {
-                Audience audience = audienceBuilder.buildObject();
+                audience = audienceBuilder.buildObject();
                 audience.setAudienceURI(audienceUri);
                 audienceRestriction.getAudiences().add(audience);
             }
@@ -317,7 +320,6 @@ public abstract class AbstractSAML2ProfileHandler extends AbstractSAMLProfileHan
         audiences = profileConfig.getProxyAudiences();
         if (audiences != null && audiences.size() > 0) {
             ProxyRestriction proxyRestriction = proxyRestrictionBuilder.buildObject();
-            Audience audience;
             for (String audienceUri : audiences) {
                 audience = audienceBuilder.buildObject();
                 audience.setAudienceURI(audienceUri);