X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=saml%2Fsaml2%2Fbinding%2Fimpl%2FSAML2ArtifactDecoder.cpp;h=ae7545af0b0237c729d36cdda5aac46961528458;hb=9d61992f725e8b73421e9262a711f4cbdd782b18;hp=17a22ecc76e56176e36cc323b96c77e241b3ff0b;hpb=1c199e2d851bf77015ce0b1d80ac2cc6ef60cda3;p=shibboleth%2Fcpp-opensaml.git diff --git a/saml/saml2/binding/impl/SAML2ArtifactDecoder.cpp b/saml/saml2/binding/impl/SAML2ArtifactDecoder.cpp index 17a22ec..ae7545a 100644 --- a/saml/saml2/binding/impl/SAML2ArtifactDecoder.cpp +++ b/saml/saml2/binding/impl/SAML2ArtifactDecoder.cpp @@ -28,7 +28,7 @@ #include "saml2/metadata/Metadata.h" #include "saml2/metadata/MetadataProvider.h" -#include +#include #include #include #include @@ -37,8 +37,8 @@ using namespace opensaml::saml2md; using namespace opensaml::saml2p; using namespace opensaml::saml2; using namespace opensaml; +using namespace xmltooling::logging; using namespace xmltooling; -using namespace log4cpp; using namespace std; namespace opensaml { @@ -46,7 +46,7 @@ namespace opensaml { class SAML_DLLLOCAL SAML2ArtifactDecoder : public MessageDecoder { public: - SAML2ArtifactDecoder(const DOMElement* e) {} + SAML2ArtifactDecoder() {} virtual ~SAML2ArtifactDecoder() {} xmltooling::XMLObject* decode( @@ -56,9 +56,9 @@ namespace opensaml { ) const; }; - MessageDecoder* SAML_DLLLOCAL SAML2ArtifactDecoderFactory(const DOMElement* const & e) + MessageDecoder* SAML_DLLLOCAL SAML2ArtifactDecoderFactory(const pair& p) { - return new SAML2ArtifactDecoder(e); + return new SAML2ArtifactDecoder(); } }; }; @@ -152,11 +152,13 @@ XMLObject* SAML2ArtifactDecoder::decode( m_artifactResolver->resolve(*(artifact2.get()), dynamic_cast(*roledesc), policy) ); - // The policy should be enforced against the ArtifactResponse by the resolve step. + // The policy should be enforced against the ArtifactResponse by the resolve step. + // Reset only the message state. + policy.reset(true); // Extract payload and check that message. XMLObject* payload = response->getPayload(); - policy.evaluate(*payload, &genericRequest); + policy.evaluate(*payload, &genericRequest, samlconstants::SAML20P_NS); // Return the payload only. response.release();