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> 26 class FUNAPI_DLL_VISIBILITY
ApiService :
public boost::noncopyable {
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,
67 static void RegisterHandler(
69 const boost::regex &re,
70 const Handler &handler);
80 static void RegisterHandler2(
82 const boost::regex &re,
83 const Handler2 &handler);
93 static void RegisterHandler3(
95 const boost::regex &re,
96 const Handler3 &handler);
98 struct FUNAPI_DLL_VISIBILITY
JwtVerifier : boost::noncopyable {
100 virtual ~JwtVerifier();
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(
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:123
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
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
Method
Enum type representing HTTP methods.
Definition: http_util.h:34
Definition: api_service.h:98
Data structure to hold HTTP request.
Definition: http_util.h:109