Enforce final disposition of policy.
authorScott Cantor <cantor.2@osu.edu>
Sat, 24 Feb 2007 21:50:17 +0000 (21:50 +0000)
committerScott Cantor <cantor.2@osu.edu>
Sat, 24 Feb 2007 21:50:17 +0000 (21:50 +0000)
saml/saml1/binding/impl/SAML1SOAPClient.cpp
saml/saml2/binding/impl/SAML2SOAPClient.cpp

index 97114a0..d1d6ef4 100644 (file)
@@ -56,7 +56,7 @@ Response* SAML1SOAPClient::receiveSAML()
             // Check for SAML Response.
             Response* response = dynamic_cast<Response*>(body->getUnknownXMLObjects().front());
             if (response) {
-                
+
                 // Check InResponseTo.
                 if (m_correlate && response->getInResponseTo() && !XMLString::equals(m_correlate, response->getInResponseTo()))
                     throw BindingException("InResponseTo attribute did not correlate with the Request ID.");
@@ -70,6 +70,10 @@ Response* SAML1SOAPClient::receiveSAML()
                 }
                 
                 m_soaper.getPolicy().evaluate(*response);
+                
+                if (!m_soaper.getPolicy().isSecure())
+                    throw BindingException("Security policy could not authenticate the message.");
+                
                 env.release();
                 body->detach(); // frees Envelope
                 response->detach();   // frees Body
index 7ed6c1b..66189cc 100644 (file)
@@ -70,6 +70,9 @@ StatusResponseType* SAML2SOAPClient::receiveSAML()
                 }
                 
                 m_soaper.getPolicy().evaluate(*response);
+                if (!m_soaper.getPolicy().isSecure())
+                    throw BindingException("Security policy could not authenticate the message.");
+
                 env.release();
                 body->detach(); // frees Envelope
                 response->detach();   // frees Body