core: change ManagerBase::authorize to makeAuthorization

refs #2063

Change-Id: I0e6faced6e4e1733362e3ec018e2ee60fcefafa1
diff --git a/rib/rib-manager.cpp b/rib/rib-manager.cpp
index dd0abca..d49f625 100644
--- a/rib/rib-manager.cpp
+++ b/rib/rib-manager.cpp
@@ -293,23 +293,23 @@
   }
 }
 
-void
-RibManager::authorize(const Name& prefix, const Interest& interest,
-                      const ndn::mgmt::ControlParameters* params,
-                      ndn::mgmt::AcceptContinuation accept,
-                      ndn::mgmt::RejectContinuation reject)
+ndn::mgmt::Authorization
+RibManager::makeAuthorization(const std::string& verb)
 {
-  BOOST_ASSERT(params != nullptr);
-  BOOST_ASSERT(typeid(*params) == typeid(ndn::nfd::ControlParameters));
-  BOOST_ASSERT(prefix == LOCAL_HOST_TOP_PREFIX || prefix == LOCAL_HOP_TOP_PREFIX);
+  return [this] (const Name& prefix, const Interest& interest,
+                 const ndn::mgmt::ControlParameters* params,
+                 const ndn::mgmt::AcceptContinuation& accept,
+                 const ndn::mgmt::RejectContinuation& reject) {
+    BOOST_ASSERT(params != nullptr);
+    BOOST_ASSERT(typeid(*params) == typeid(ndn::nfd::ControlParameters));
+    BOOST_ASSERT(prefix == LOCAL_HOST_TOP_PREFIX || prefix == LOCAL_HOP_TOP_PREFIX);
 
-  auto& validator = [this, &prefix] () -> ndn::ValidatorConfig & {
-    return prefix == LOCAL_HOST_TOP_PREFIX ? m_localhostValidator : m_localhopValidator;
-  }();
-
-  validator.validate(interest,
-                     bind([&interest, this, accept] { extractRequester(interest, accept); }),
-                     bind([reject] { reject(ndn::mgmt::RejectReply::STATUS403); }));
+    ndn::ValidatorConfig& validator = prefix == LOCAL_HOST_TOP_PREFIX ?
+                                      m_localhostValidator : m_localhopValidator;
+    validator.validate(interest,
+                       bind([&interest, this, accept] { extractRequester(interest, accept); }),
+                       bind([reject] { reject(ndn::mgmt::RejectReply::STATUS403); }));
+  };
 }
 
 void