security: Add configuration based validator

Change-Id: Ic5837f4b02a613966c0a2e969c974ebd0786f769
diff --git a/src/nrd.hpp b/src/nrd.hpp
index 7e1473e..49df0b5 100644
--- a/src/nrd.hpp
+++ b/src/nrd.hpp
@@ -15,7 +15,8 @@
 class Nrd
 {
 public:
-  Nrd();
+  explicit
+  Nrd(const std::string& validatorConfig);
 
   void
   onRibRequest(const Interest& request);
@@ -35,6 +36,14 @@
   sendResponse(const Name& name,
                uint32_t code,
                const std::string& text);
+
+  void
+  onRibRequestValidated(const shared_ptr<const Interest>& request);
+
+  void
+  onRibRequestValidationFailed(const shared_ptr<const Interest>& request,
+                               const std::string& failureInfo);
+
   void
   onCommandError(uint32_t code, const std::string& error,
                  const ndn::Interest& interest,
@@ -66,8 +75,9 @@
                  PrefixRegOptions& extractedOptions);
 private:
   Rib m_managedRib;
-  ndn::Face m_face;
+  ndn::shared_ptr<ndn::Face> m_face;
   ndn::KeyChain m_keyChain;
+  ndn::ValidatorConfig m_validator;
   shared_ptr<nfd::Controller> m_nfdController;
 
   typedef boost::function<void(Nrd*,