Enforce final disposition of policy.
[shibboleth/cpp-opensaml.git] / saml / saml2 / binding / impl / SAML2SOAPClient.cpp
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