NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
command-authenticator.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26 #ifndef NFD_DAEMON_MGMT_COMMAND_AUTHENTICATOR_HPP
27 #define NFD_DAEMON_MGMT_COMMAND_AUTHENTICATOR_HPP
28 
29 #include "core/config-file.hpp"
30 #include <ndn-cxx/mgmt/dispatcher.hpp>
31 
32 namespace ndn {
33 namespace security {
34 namespace v2 {
35 class Validator;
36 } // namespace v2
37 } // namespace security
38 } // namespace ndn
39 
40 namespace nfd {
41 
44 class CommandAuthenticator : public enable_shared_from_this<CommandAuthenticator>, noncopyable
45 {
46 public:
47  static shared_ptr<CommandAuthenticator>
48  create();
49 
50  void
51  setConfigFile(ConfigFile& configFile);
52 
59  makeAuthorization(const std::string& module, const std::string& verb);
60 
61 private:
63 
67  void
68  processConfig(const ConfigSection& section, bool isDryRun, const std::string& filename);
69 
70 private:
72  std::unordered_map<std::string, shared_ptr<ndn::security::v2::Validator>> m_validators;
73 };
74 
75 } // namespace nfd
76 
77 #endif // NFD_DAEMON_MGMT_COMMAND_AUTHENTICATOR_HPP
Copyright (c) 2011-2015 Regents of the University of California.
configuration file parsing utility
Definition: config-file.hpp:58
void setConfigFile(ConfigFile &configFile)
Copyright (c) 2011-2015 Regents of the University of California.
Definition: ndn-common.hpp:40
ndn::mgmt::Authorization makeAuthorization(const std::string &module, const std::string &verb)
boost::property_tree::ptree ConfigSection
a config file section
provides ControlCommand authorization according to NFD configuration file
static shared_ptr< CommandAuthenticator > create()
std::function< void(const Name &prefix, const Interest &interest, const ControlParameters *params, const AcceptContinuation &accept, const RejectContinuation &reject)> Authorization
a function that performs authorization
Definition: dispatcher.hpp:77
Interface for validating data and interest packets.
Definition: validator.hpp:61