32 , m_dispatcher(dispatcher)
39 , m_dispatcher(dispatcher)
40 , m_authenticator(&authenticator)
48 const ndn::mgmt::StatusDatasetHandler& handler)
50 m_dispatcher.addStatusDataset(makeRelPrefix(verb),
51 ndn::mgmt::makeAcceptAllAuthorization(),
55 ndn::mgmt::PostNotification
58 return m_dispatcher.addNotificationStream(makeRelPrefix(verb));
66 auto sigInfo = interest.getSignatureInfo();
69 sigInfo.emplace(interest.getName().at(ndn::signed_interest::POS_SIG_INFO).blockFromValue());
71 return sigInfo->getKeyLocator().getName().toUri();
73 catch (
const tlv::Error&) {
78 ndn::mgmt::Authorization
79 ManagerBase::makeAuthorization(
const std::string& verb)
81 BOOST_ASSERT(m_authenticator !=
nullptr);
Provides ControlCommand authorization according to NFD's configuration file.
ndn::mgmt::Authorization makeAuthorization(const std::string &module, const std::string &verb)
Returns an Authorization function for module/verb command.
ndn::mgmt::PostNotification registerNotificationStream(const std::string &verb)
void registerStatusDatasetHandler(const std::string &verb, const ndn::mgmt::StatusDatasetHandler &handler)
static std::string extractSigner(const Interest &interest)
Extracts the name from the KeyLocator of a ControlCommand request.
ManagerBase(std::string_view module, Dispatcher &dispatcher)