Fix parameter name to match doc comment.
[shibboleth/cpp-opensaml.git] / saml / binding / MessageDecoder.h
index d797f83..9f3905d 100644 (file)
@@ -23,9 +23,9 @@
 #ifndef __saml_decoder_h__
 #define __saml_decoder_h__
 
-#include <saml/binding/GenericRequest.h>
 #include <saml/binding/SecurityPolicy.h>
 #include <xmltooling/XMLObject.h>
+#include <xmltooling/io/GenericRequest.h>
 
 namespace opensaml {
     
@@ -54,6 +54,15 @@ namespace opensaml {
         virtual ~MessageDecoder() {}
 
         /**
+         * Indicates whether a web browser or similar user agent delivered the message.
+         *
+         * @return true iff the message was delivered by a user agent
+         */
+        virtual bool isUserAgentPresent() const {
+            return true;
+        }
+
+        /**
          * Interface to caller-supplied artifact resolution mechanism.
          * 
          * Resolving artifacts requires internally performing a SOAP-based
@@ -134,7 +143,7 @@ namespace opensaml {
          */
         virtual xmltooling::XMLObject* decode(
             std::string& relayState,
-            const GenericRequest& genericRequest,
+            const xmltooling::GenericRequest& genericRequest,
             SecurityPolicy& policy
             ) const=0;
 
@@ -143,6 +152,21 @@ namespace opensaml {
 
         /** Pointer to an ArtifactResolver implementation. */
         const ArtifactResolver* m_artifactResolver;
+
+        /**
+         * Extracts policy-relevant message details.
+         * 
+         * @param message   the incoming message
+         * @param request   the protocol request
+         * @param protocol  the protocol family in use
+         * @param policy    SecurityPolicy to provide various components and track message data
+         */
+        virtual void extractMessageDetails (
+            const xmltooling::XMLObject& message,
+            const xmltooling::GenericRequest& request,
+            const XMLCh* protocol,
+            SecurityPolicy& policy
+            ) const=0;
     };
 
     /**