Switch encoders to metadata-based recipient parameter.
[shibboleth/cpp-opensaml.git] / samltest / saml2 / binding / SAML2ArtifactTest.h
index ee5b5f0..336e403 100644 (file)
@@ -64,7 +64,10 @@ public:
                 SAMLConfig::getConfig().MessageEncoderManager.newPlugin(samlconstants::SAML20_BINDING_HTTP_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);
+            encoder->encode(
+                *this,toSend.get(),"https://sp.example.org/SAML/SSO",m_metadata->getEntityDescriptor("https://sp.example.org/"),"state",cred
+                );
             toSend.release();\r
             \r
             // Decode message.\r
@@ -73,7 +76,6 @@ public:
                 SAMLConfig::getConfig().MessageDecoderManager.newPlugin(samlconstants::SAML20_BINDING_HTTP_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
@@ -94,11 +96,11 @@ public:
         }\r
     }\r
     \r
-    SAMLArtifact* generateSAML1Artifact(const char* relyingParty) const {\r
+    SAMLArtifact* generateSAML1Artifact(const EntityDescriptor* relyingParty) const {\r
         throw BindingException("Not implemented.");\r
     }\r
     \r
-    saml2p::SAML2Artifact* generateSAML2Artifact(const char* relyingParty) const {\r
+    saml2p::SAML2Artifact* generateSAML2Artifact(const EntityDescriptor* relyingParty) const {\r
         return new SAML2ArtifactType0004(SAMLConfig::getConfig().hashSHA1("https://idp.example.org/"),1);\r
     }\r
     \r