#include "exceptions.h"
#include "binding/SecurityPolicyRule.h"
-#include <log4cpp/Category.hh>
+#include <xmltooling/logging.h>
#include <xmltooling/util/ReplayCache.h>
#include <xercesc/util/XMLUniDefs.hpp>
using namespace opensaml;
+using namespace xmltooling::logging;
using namespace xmltooling;
-using namespace log4cpp;
using namespace std;
namespace opensaml {
MessageFlowRule(const DOMElement* e);
virtual ~MessageFlowRule() {}
- void evaluate(const xmltooling::XMLObject& message, const GenericRequest* request, SecurityPolicy& policy) const;
+ const char* getType() const {
+ return MESSAGEFLOW_POLICY_RULE;
+ }
+ void evaluate(const XMLObject& message, const GenericRequest* request, SecurityPolicy& policy) const;
private:
bool m_checkReplay;
else {
if (issueInstant > now + skew) {
log.errorStream() << "rejected not-yet-valid message, timestamp (" << issueInstant <<
- "), newest allowed (" << now + skew << ")" << CategoryStream::ENDLINE;
+ "), newest allowed (" << now + skew << ")" << logging::eol;
throw SecurityPolicyException("Message rejected, was issued in the future.");
}
else if (issueInstant < now - skew - m_expires) {
log.errorStream() << "rejected expired message, timestamp (" << issueInstant <<
- "), oldest allowed (" << (now - skew - m_expires) << ")" << CategoryStream::ENDLINE;
+ "), oldest allowed (" << (now - skew - m_expires) << ")" << logging::eol;
throw SecurityPolicyException("Message expired, was issued too long ago.");
}
}