Provides ControlCommand authorization according to NFD configuration file. More...
#include <command-authenticator.hpp>
Public Member Functions | |
void | setConfigFile (ConfigFile &configFile) |
ndn::mgmt::Authorization | makeAuthorization (const std::string &module, const std::string &verb) |
Static Public Member Functions | |
static shared_ptr< CommandAuthenticator > | create () |
Provides ControlCommand authorization according to NFD configuration file.
Definition at line 38 of file command-authenticator.hpp.
|
static |
Definition at line 100 of file command-authenticator.cpp.
References nfd::CommandAuthenticator.
Referenced by nfd::ignoreRibAndLogSections(), and ns3::ndn::L3Protocol::setCsReplacementPolicy().
void nfd::CommandAuthenticator::setConfigFile | ( | ConfigFile & | configFile | ) |
Definition at line 108 of file command-authenticator.cpp.
References nfd::ConfigFile::addSectionHandler(), websocketpp::http::status_code::found, nonstd::optional_lite::std11::move(), NDN_THROW, NFD_LOG_DEBUG, NFD_LOG_INFO, NFD_LOG_WARN, and ndn::to_string().
ndn::mgmt::Authorization nfd::CommandAuthenticator::makeAuthorization | ( | const std::string & | module, |
const std::string & | verb | ||
) |
module | management module name |
verb | command verb; currently it's ignored |
Definition at line 206 of file command-authenticator.cpp.
References websocketpp::extensions::permessage_deflate::mode::accept, ndn::Interest::getName(), nfd::getSignerFromTag(), ndn::command_interest::MIN_SIZE, NFD_LOG_DEBUG, ndn::Name::size(), and ndn::mgmt::STATUS403.
Referenced by nfd::ManagerBase::registerNotificationStream().