Added marker interface for assertion types.
[shibboleth/cpp-opensaml.git] / samltest / saml2 / binding / SAML2ArtifactTest.h
index dc968ef..e763ff3 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
- *  Copyright 2001-2005 Internet2\r
+ *  Copyright 2001-2007 Internet2\r
  * \r
  * Licensed under the Apache License, Version 2.0 (the "License");\r
  * you may not use this file except in compliance with the License.\r
@@ -38,7 +38,7 @@ public:
     void testSAML2Artifact() {\r
         try {\r
             QName idprole(samlconstants::SAML20MD_NS, IDPSSODescriptor::LOCAL_NAME);\r
-            SecurityPolicy policy(m_rules2, m_metadata, &idprole, m_trust);\r
+            SecurityPolicy policy(m_rules2, m_metadata, &idprole, m_trust, false);\r
 \r
             // Read message to use from file.\r
             string path = data_path + "saml2/binding/SAML2Response.xml";\r
@@ -73,7 +73,7 @@ public:
             // Test the results.\r
             TSM_ASSERT_EQUALS("RelayState was not the expected result.", relayState, "state");\r
             TSM_ASSERT("SAML Response not decoded successfully.", response.get());\r
-            TSM_ASSERT("Message was not verified.", policy.getIssuer()!=NULL);\r
+            TSM_ASSERT("Message was not verified.", policy.isSecure());\r
             auto_ptr_char entityID(policy.getIssuer()->getName());\r
             TSM_ASSERT("Issuer was not expected.", !strcmp(entityID.get(),"https://idp.example.org/"));\r
             TSM_ASSERT_EQUALS("Assertion count was not correct.", response->getAssertions().size(), 1);\r
@@ -122,6 +122,7 @@ public:
         sc->setValue(StatusCode::SUCCESS);\r
         response->marshall();\r
         SchemaValidators.validate(response.get());\r
+        policy.evaluate(*(response.get()), this);\r
         return response.release();\r
     }\r
 };\r