diff --git a/core/manager-base.cpp b/core/manager-base.cpp
index bad25b9..02190a2 100644
--- a/core/manager-base.cpp
+++ b/core/manager-base.cpp
@@ -99,5 +99,4 @@
   handler(*command, prefix, interest, parameters, done);
 }
 
-
 } // namespace nfd
diff --git a/core/manager-base.hpp b/core/manager-base.hpp
index 31de566..8ace6bb 100644
--- a/core/manager-base.hpp
+++ b/core/manager-base.hpp
@@ -82,27 +82,7 @@
   ndn::mgmt::PostNotification
   registerNotificationStream(const std::string& verb);
 
-PUBLIC_WITH_TESTS_ELSE_PROTECTED: // command validation
-  /**
-   * @brief validate a request for ControlCommand.
-   *
-   * This is called by the dispatcher.
-   *
-   * @pre params != null
-   * @pre typeid(*params) == typeid(ndn::nfd::ControlParameters)
-   *
-   * @param prefix the top prefix
-   * @param interest a request for ControlCommand
-   * @param params the parameters for ControlCommand
-   * @param accept callback of successful validation, take the requester string as a argument
-   * @param reject callback of failure in validation, take the action code as a argument
-   */
-  virtual void
-  authorize(const Name& prefix, const Interest& interest,
-            const ndn::mgmt::ControlParameters* params,
-            ndn::mgmt::AcceptContinuation accept,
-            ndn::mgmt::RejectContinuation reject) = 0;
-
+PUBLIC_WITH_TESTS_ELSE_PROTECTED:
   /**
    * @brief extract a requester from a ControlCommand request
    *
@@ -115,7 +95,13 @@
   extractRequester(const Interest& interest,
                    ndn::mgmt::AcceptContinuation accept);
 
-PUBLIC_WITH_TESTS_ELSE_PRIVATE: // helpers
+PUBLIC_WITH_TESTS_ELSE_PRIVATE:
+  /**
+   * @return an authorization function for specified management module and verb
+   */
+  virtual ndn::mgmt::Authorization
+  makeAuthorization(const std::string& verb) = 0;
+
   /**
    * @brief validate the @p parameters for a given @p command
    *
@@ -167,7 +153,7 @@
 
   m_dispatcher.addControlCommand<ControlParameters>(
     makeRelPrefix(verb),
-    bind(&ManagerBase::authorize, this, _1, _2, _3, _4, _5),
+    makeAuthorization(verb),
     bind(&ManagerBase::validateParameters, cref(*command), _1),
     bind(&ManagerBase::handleCommand, command, handler, _1, _2, _3, _4));
 }
diff --git a/daemon/mgmt/nfd-manager-base.cpp b/daemon/mgmt/nfd-manager-base.cpp
index c0ecaae..b30eca7 100644
--- a/daemon/mgmt/nfd-manager-base.cpp
+++ b/daemon/mgmt/nfd-manager-base.cpp
@@ -36,18 +36,20 @@
   m_validator.addSupportedPrivilege(module);
 }
 
-void
-NfdManagerBase::authorize(const Name& prefix, const Interest& interest,
-                          const ndn::mgmt::ControlParameters* params,
-                          ndn::mgmt::AcceptContinuation accept,
-                          ndn::mgmt::RejectContinuation reject)
+ndn::mgmt::Authorization
+NfdManagerBase::makeAuthorization(const std::string& verb)
 {
-  BOOST_ASSERT(params != nullptr);
-  BOOST_ASSERT(typeid(*params) == typeid(ndn::nfd::ControlParameters));
+  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));
 
-  m_validator.validate(interest,
-                       bind([&interest, this, accept] { extractRequester(interest, accept); }),
-                       bind([reject] { reject(ndn::mgmt::RejectReply::STATUS403); }));
+    m_validator.validate(interest,
+                         bind([&interest, this, accept] { extractRequester(interest, accept); }),
+                         bind([reject] { reject(ndn::mgmt::RejectReply::STATUS403); }));
+  };
 }
 
 } // namespace nfd
diff --git a/daemon/mgmt/nfd-manager-base.hpp b/daemon/mgmt/nfd-manager-base.hpp
index c7f30ff..49a3ea2 100644
--- a/daemon/mgmt/nfd-manager-base.hpp
+++ b/daemon/mgmt/nfd-manager-base.hpp
@@ -52,25 +52,8 @@
                  const std::string& module);
 
 PUBLIC_WITH_TESTS_ELSE_PRIVATE: // command validation
-  /**
-   * @brief validate a request for ControlCommand.
-   *
-   * This is called by the dispatcher.
-   *
-   * @pre params != null
-   * @pre typeid(*params) == typeid(ndn::nfd::ControlParameters)
-   *
-   * @param prefix the top prefix
-   * @param interest a request for ControlCommand
-   * @param params the parameters for ControlCommand
-   * @param accept callback of successful validation, take the requester string as a argument
-   * @param reject callback of failure in validation, take the action code as a argument
-   */
-  virtual void
-  authorize(const Name& prefix, const Interest& interest,
-            const ndn::mgmt::ControlParameters* params,
-            ndn::mgmt::AcceptContinuation accept,
-            ndn::mgmt::RejectContinuation reject) override;
+  virtual ndn::mgmt::Authorization
+  makeAuthorization(const std::string& verb) override;
 
 private:
   CommandValidator& m_validator;
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
diff --git a/rib/rib-manager.hpp b/rib/rib-manager.hpp
index 998a284..a27d353 100644
--- a/rib/rib-manager.hpp
+++ b/rib/rib-manager.hpp
@@ -107,28 +107,8 @@
   void
   setFaceForSelfRegistration(const Interest& request, ControlParameters& parameters);
 
-private: // command validation
-  /**
-   * @brief validate a request for ControlCommand.
-   *
-   * This is called by the dispatcher.
-   *
-   * @pre params != null
-   * @pre typeid(*params) == typeid(ndn::nfd::ControlParameters)
-   *
-   * @param prefix the top prefix
-   * @param interest a request for ControlCommand
-   * @param params the parameters for ControlCommand
-   * @param accept callback of successful validation, take the requester string as a argument
-   * @param reject callback of failure in validation, take the action code as a argument
-   *
-   * use m_localhostValidator / m_localhopValidator to validate commands according to @p prefix.
-   */
-  virtual void
-  authorize(const Name& prefix, const Interest& interest,
-            const ndn::mgmt::ControlParameters* params,
-            ndn::mgmt::AcceptContinuation accept,
-            ndn::mgmt::RejectContinuation reject) override;
+  virtual ndn::mgmt::Authorization
+  makeAuthorization(const std::string& verb) override;
 
 private: // Face monitor
   void
diff --git a/tests/core/manager-base.t.cpp b/tests/core/manager-base.t.cpp
index 7ebe95e..6e696ff 100644
--- a/tests/core/manager-base.t.cpp
+++ b/tests/core/manager-base.t.cpp
@@ -56,15 +56,19 @@
 public:
   ManagerTester(Dispatcher& dispatcher,
                 const std::string& module)
-    : ManagerBase(dispatcher, module) {
+    : ManagerBase(dispatcher, module)
+  {
   }
 
-  virtual void
-  authorize(const Name& prefix, const Interest& interest,
-            const ndn::mgmt::ControlParameters* params,
-            ndn::mgmt::AcceptContinuation accept,
-            ndn::mgmt::RejectContinuation reject) {
-    extractRequester(interest, accept);
+  virtual ndn::mgmt::Authorization
+  makeAuthorization(const std::string& verb) override
+  {
+    return [this] (const Name& prefix, const Interest& interest,
+                   const ndn::mgmt::ControlParameters* params,
+                   ndn::mgmt::AcceptContinuation accept,
+                   ndn::mgmt::RejectContinuation reject) {
+      accept("requester");
+    };
   }
 };
 
diff --git a/tests/daemon/mgmt/nfd-manager-base.t.cpp b/tests/daemon/mgmt/nfd-manager-base.t.cpp
index 410f41c..340c9ec 100644
--- a/tests/daemon/mgmt/nfd-manager-base.t.cpp
+++ b/tests/daemon/mgmt/nfd-manager-base.t.cpp
@@ -57,6 +57,8 @@
 
 BOOST_AUTO_TEST_CASE(CommandAuthorization)
 {
+  ndn::mgmt::Authorization authorize = m_manager.makeAuthorization("test-verb");
+
   bool didAcceptCallbackFire = false;
   bool didRejectCallbackFire = false;
   auto testAuthorization = [&] {
@@ -66,9 +68,9 @@
     auto command = makeControlCommandRequest("/localhost/nfd/test-module/test-verb",
                                              ControlParameters());
     ndn::nfd::ControlParameters params;
-    m_manager.authorize("/top/prefix", *command, &params,
-                        bind([&] { didAcceptCallbackFire = true; }),
-                        bind([&] { didRejectCallbackFire = true; }));
+    authorize("/top/prefix", *command, &params,
+              bind([&] { didAcceptCallbackFire = true; }),
+              bind([&] { didRejectCallbackFire = true; }));
   };
 
   testAuthorization();
