cleanup, add checks to arguments and responses, add log statements
[java-idp.git] / src / edu / internet2 / middleware / shibboleth / serviceprovider / ShibBinding.java
index 2dc50f1..f95ca89 100644 (file)
@@ -37,13 +37,12 @@ import org.opensaml.SAMLAssertion;
 import org.opensaml.SAMLAuthorityBinding;
 import org.opensaml.SAMLBinding;
 import org.opensaml.SAMLBindingFactory;
+import org.opensaml.SAMLCondition;
 import org.opensaml.SAMLException;
 import org.opensaml.SAMLRequest;
 import org.opensaml.SAMLResponse;
 import org.opensaml.SAMLSOAPHTTPBinding;
 import org.opensaml.TrustException;
-import org.opensaml.provider.SOAPHTTPBindingProvider;
-
 import edu.internet2.middleware.shibboleth.common.Trust;
 import edu.internet2.middleware.shibboleth.metadata.AttributeAuthorityDescriptor;
 import edu.internet2.middleware.shibboleth.metadata.Endpoint;
@@ -85,7 +84,7 @@ public class ShibBinding {
         */
        public 
        ShibBinding(
-                       String applicationId) throws NoSuchProviderException {
+                       String applicationId)  {
                this.applicationId=applicationId;
        }
 
@@ -199,7 +198,11 @@ public class ShibBinding {
                while (assertions.hasNext()) {
                        SAMLAssertion assertion = (SAMLAssertion) assertions.next();
                        
-                       // TODO Dropped some logic validating conditions
+                       Iterator conditions = assertion.getConditions();
+                       while (conditions.hasNext()) {
+                               SAMLCondition condition = (SAMLCondition) conditions.next();
+                               // TODO C++ only seems to validate that the audience string is present
+                       }
                        
                        if (assertion.isSigned() && 
                                !appinfo.validate(assertion,role)) {