Multi-line svn commit, see body.
[shibboleth/cpp-opensaml.git] / saml / binding / SecurityPolicyRule.h
index 0f3090c..095e115 100644 (file)
@@ -43,16 +43,28 @@ namespace opensaml {
         virtual ~SecurityPolicyRule() {}
 
         /**
+         * Returns the rule's class/type.
+         *
+         * @return  the class/type of the object
+         */
+        virtual const char* getType() const=0;
+
+        /**
          * Evaluates the rule against the given request and message.
          * 
+         * <p>An exception will be raised if the message is invalid according to
+         * a policy rule.
+         * 
          * @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
-         *
-         * @throws BindingException raised if the message/request is not acceptable to the policy rule
          */
         virtual void evaluate(
-            const xmltooling::XMLObject& message, const GenericRequest* request, SecurityPolicy& policy
+            const xmltooling::XMLObject& message,
+            const xmltooling::GenericRequest* request,
+            const XMLCh* protocol,
+            SecurityPolicy& policy
             ) const=0;
     };
 
@@ -96,6 +108,15 @@ namespace opensaml {
     #define MESSAGEFLOW_POLICY_RULE  "MessageFlow"
 
     /**
+     * SecurityPolicyRule for disabling security.
+     * 
+     * Allows the message issuer to be authenticated regardless of the message or
+     * transport. Used mainly for debugging or in situations that I wouldn't care to
+     * comment on.
+     */
+    #define NULLSECURITY_POLICY_RULE  "NullSecurity"
+
+    /**
      * SecurityPolicyRule for protocol message "blob" signing.
      * 
      * Allows the message issuer to be authenticated using a non-XML digital signature