Add policy rules for SAML 1 SSO and SAML 2 Bearer confirmation, with unit tests.
[shibboleth/cpp-opensaml.git] / saml / binding / SecurityPolicy.h
index 2dd16c2..6a5aac7 100644 (file)
@@ -160,6 +160,16 @@ namespace opensaml {
         }
 
         /**
+         * Returns the message identifier to which the message being evaluated
+         * is a response.
+         *
+         * @return correlated message identifier
+         */
+        const XMLCh* getCorrelationID() const {
+            return m_correlationID;
+        }
+
+        /**
          * Gets a mutable array of installed policy rules.
          *
          * <p>If adding rules, their lifetime must be at least as long as the policy object.
@@ -242,6 +252,16 @@ namespace opensaml {
         }
 
         /**
+         * Sets the message identifier to which the message being evaluated
+         * is a response.
+         *
+         * @param correlationID correlated message identifier
+         */
+        void setCorrelationID(const XMLCh* correlationID) {
+            m_correlationID = correlationID;
+        }
+
+        /**
          * Evaluates the policy against the given request and message,
          * possibly populating message information in the policy object.
          *
@@ -450,6 +470,7 @@ namespace opensaml {
 
         // contextual information
         mutable time_t m_ts;
+        const XMLCh* m_correlationID;
         std::vector<const XMLCh*> m_audiences;
     };