Switch encoders to metadata-based recipient parameter.
[shibboleth/cpp-opensaml.git] / samltest / saml1 / binding / SAML1ArtifactTest.h
index 5ae1dc8..d7ddf2c 100644 (file)
@@ -62,7 +62,10 @@ public:
                 SAMLConfig::getConfig().MessageEncoderManager.newPlugin(samlconstants::SAML1_PROFILE_BROWSER_ARTIFACT, NULL)\r
                 );\r
             encoder->setArtifactGenerator(this);\r
-            encoder->encode(*this,toSend.get(),"https://sp.example.org/SAML/SSO","https://sp.example.org/","state",cred);\r
+            Locker locker(m_metadata);\r
+            encoder->encode(\r
+                *this,toSend.get(),"https://sp.example.org/SAML/SSO",m_metadata->getEntityDescriptor("https://sp.example.org/"),"state",cred\r
+                );\r
             toSend.release();\r
             \r
             // Decode message.\r
@@ -71,7 +74,6 @@ public:
                 SAMLConfig::getConfig().MessageDecoderManager.newPlugin(samlconstants::SAML1_PROFILE_BROWSER_ARTIFACT, NULL)\r
                 );\r
             decoder->setArtifactResolver(this);\r
-            Locker locker(m_metadata);\r
             auto_ptr<Response> response(dynamic_cast<Response*>(decoder->decode(relayState,*this,policy)));\r
             \r
             // Test the results.\r
@@ -92,11 +94,11 @@ public:
         }\r
     }\r
 \r
-    SAMLArtifact* generateSAML1Artifact(const char* relyingParty) const {\r
+    SAMLArtifact* generateSAML1Artifact(const EntityDescriptor* relyingParty) const {\r
         return new SAMLArtifactType0001(SAMLConfig::getConfig().hashSHA1("https://idp.example.org/"));\r
     }\r
     \r
-    saml2p::SAML2Artifact* generateSAML2Artifact(const char* relyingParty) const {\r
+    saml2p::SAML2Artifact* generateSAML2Artifact(const EntityDescriptor* relyingParty) const {\r
         throw BindingException("Not implemented.");\r
     }\r
     \r