9 #ifndef INCLUDE_FUNAPI_MANAGEMENT_API_SERVICE_H_
10 #define INCLUDE_FUNAPI_MANAGEMENT_API_SERVICE_H_
12 #include <boost/function.hpp>
13 #include <boost/noncopyable.hpp>
14 #include <boost/regex.hpp>
28 typedef boost::smatch MatchResult;
31 typedef boost::function<void(
37 typedef boost::function<
38 void(Ptr<http::Response> ret,
45 typedef boost::function<
46 void(Ptr<http::Response> ret,
54 typedef boost::function<
56 const MatchResult ¶ms,
68 const http::Method &method,
69 const boost::regex &re,
81 const http::Method &method,
82 const boost::regex &re,
94 const http::Method &method,
95 const boost::regex &re,
101 virtual bool Verify(
const std::string &jwt,
fun::Json *claim)
const = 0;
103 static Ptr<JwtVerifier> Create(
const std::string &public_key_pem_path);
106 typedef boost::function<
109 const MatchResult ¶ms,
112 static void RegisterJwtEnabledHandler(
113 const http::Method &method,
114 const boost::regex &re,
115 const JwtEnabledHandler &handler,
116 const Ptr<JwtVerifier> &jwt_verifier);
121 #endif // INCLUDE_FUNAPI_MANAGEMENT_API_SERVICE_H_
Data structure to hold HTTP request.
Definition: http_util.h:122
static void RegisterHandler2(const http::Method &method, const boost::regex &re, const Handler2 &handler)
Register API handler for the given path regular expression.
boost::function< void(Ptr< http::Response > ret, const http::Request2 &request, const MatchResult ¶ms)> Handler2
Definition: api_service.h:48
boost::function< void(Ptr< http::Response > ret, const http::Request &request, const MatchResult ¶ms)> Handler
Definition: api_service.h:40
Definition: api_service.h:26
boost::function< void(const http::Request2 &request, const MatchResult ¶ms, const ResponseWriter &finisher)> Handler3
Definition: api_service.h:57
static void RegisterHandler(const http::Method &method, const boost::regex &re, const Handler &handler)
Register API handler for the given path regular expression.
boost::function< void(const Ptr< http::Response > &)> ResponseWriter ASSERT_NO_ROLLBACK
Functor to send a http response and finish a http request processing.
Definition: api_service.h:32
Definition: deploy_api_service.h:31
static void RegisterHandler3(const http::Method &method, const boost::regex &re, const Handler3 &handler)
Register API handler for the given path regular expression.
Definition: api_service.h:98
Data structure to hold HTTP request.
Definition: http_util.h:108