10 #ifndef __PION_HTTP_BASIC_AUTH_HEADER__ 11 #define __PION_HTTP_BASIC_AUTH_HEADER__ 15 #include <pion/config.hpp> 16 #include <pion/http/auth.hpp> 32 basic_auth(user_manager_ptr userManager,
const std::string& realm=
"PION");
49 virtual bool handle_request(
const http::request_ptr& http_request_ptr,
const tcp::connection_ptr& tcp_conn);
59 virtual void set_option(
const std::string& name,
const std::string& value);
70 void handle_unauthorized(
const http::request_ptr& http_request_ptr,
const tcp::connection_ptr& tcp_conn);
77 static bool parse_authorization(std::string
const &authorization, std::string &credentials);
82 static bool parse_credentials(std::string
const &credentials, std::string &username, std::string &password);
88 static const unsigned int CACHE_EXPIRATION;
95 boost::posix_time::ptime m_cache_cleanup_time;
98 user_cache_type m_user_cache;
101 mutable boost::mutex m_cache_mutex;
virtual ~basic_auth()
virtual destructor