Fixing the no-attribute again to match SAML requirments.
authordousti <dousti@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Fri, 14 Jun 2002 13:35:52 +0000 (13:35 +0000)
committerdousti <dousti@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Fri, 14 Jun 2002 13:35:52 +0000 (13:35 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@116 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/aa/AASaml.java

index 30dd93a..c33ead1 100755 (executable)
@@ -74,11 +74,9 @@ public class AASaml {
                                               sub.getConfirmationMethods(),
                                               sub.getConfirmationData());
             
-           SAMLStatement[] statements = null;
-           if(attrs != null && attrs.length > 0){
-               statements = new SAMLStatement[1];
-               statements[0] = new SAMLAttributeStatement(rSubject, attrs);
-           }
+           SAMLStatement[] statements = new SAMLStatement[1];
+           statements[0] = new SAMLAttributeStatement(rSubject, attrs);
+           
 
            Date now = new Date();
            Date  then = null;
@@ -94,15 +92,19 @@ public class AASaml {
            }
            SAMLCondition[] conditions = new SAMLCondition[1];
            conditions[0] = new SAMLAudienceRestrictionCondition(policies);
-           SAMLAssertion sAssertion = new SAMLAssertion(myName,
+
+           SAMLAssertion[] assertions= null;
+           if(attrs != null && attrs.length > 0){
+               SAMLAssertion sAssertion = new SAMLAssertion(myName,
                                             now,
                                             then,
                                             conditions,
                                             statements,
                                             /* sig */ null);
-           SAMLAssertion[] assertions= new SAMLAssertion[1];
-           assertions[0] = sAssertion;
-       
+               assertions= new SAMLAssertion[1];
+               assertions[0] = sAssertion;
+           }
+
            sResp = new SAMLResponse(reqID,
                                     /* recipient URL*/ null,
                                     /* sig */ null,