Add relying paty as audience of assertions, SIDP-201
authorlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Thu, 19 Jun 2008 06:02:25 +0000 (06:02 +0000)
committerlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Thu, 19 Jun 2008 06:02:25 +0000 (06:02 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/branches/REL_2@2740 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/main/java/edu/internet2/middleware/shibboleth/idp/profile/saml1/AbstractSAML1ProfileHandler.java

index 9c5c2b7..d17589c 100644 (file)
@@ -289,12 +289,16 @@ public abstract class AbstractSAML1ProfileHandler extends AbstractSAMLProfileHan
 
         Collection<String> audiences;
 
-        // add audience restrictions
+        AudienceRestrictionCondition audienceRestriction = audienceRestrictionConditionBuilder.buildObject();
+        Audience audience = audienceBuilder.buildObject();
+        audience.setUri(requestContext.getInboundMessageIssuer());
+        audienceRestriction.getAudiences().add(audience);
+        
+        // add other audience restrictions
         audiences = profileConfig.getAssertionAudiences();
         if (audiences != null && audiences.size() > 0) {
-            AudienceRestrictionCondition audienceRestriction = audienceRestrictionConditionBuilder.buildObject();
             for (String audienceUri : audiences) {
-                Audience audience = audienceBuilder.buildObject();
+                audience = audienceBuilder.buildObject();
                 audience.setUri(audienceUri);
                 audienceRestriction.getAudiences().add(audience);
             }