Allow message-only policy rules, basic SAML SOAP client.
[shibboleth/cpp-opensaml.git] / saml / saml2 / binding / impl / SAML2RedirectDecoder.cpp
index 4ea64ff..d2abd41 100644 (file)
@@ -54,8 +54,6 @@ namespace opensaml {
 
 SAML2RedirectDecoder::SAML2RedirectDecoder(const DOMElement* e) {}
 
-SAML2RedirectDecoder::~SAML2RedirectDecoder() {}
-
 XMLObject* SAML2RedirectDecoder::decode(
     string& relayState,
     const GenericRequest& genericRequest,
@@ -145,7 +143,7 @@ XMLObject* SAML2RedirectDecoder::decode(
         }
 
         // Run through the policy.
-        policy.evaluate(genericRequest, *root);
+        policy.evaluate(*root, &genericRequest);
     }
     catch (XMLToolingException& ex) {
         // This is just to maximize the likelihood of attaching a source to the message for support purposes.
@@ -172,6 +170,5 @@ XMLObject* SAML2RedirectDecoder::decode(
         annotateException(&ex,provider);  // throws it
     }
 
-    xmlObject.release();
-    return root;
+    return xmlObject.release();
 }