26#ifndef MYSQLROUTER_HTTP_AUTH_INCLUDED 
   27#define MYSQLROUTER_HTTP_AUTH_INCLUDED 
   30#include <system_error> 
   44  static std::string quote(
const std::string &
str);
 
   62      const std::string &scheme, 
const std::string &token,
 
   63      const std::vector<std::pair<std::string, std::string>> params)
 
   64      : scheme_{scheme}, token_{token}, params_{params} {}
 
   71  std::string 
str() 
const;
 
   78  std::string 
scheme()
 const { 
return scheme_; }
 
   85  std::string 
token()
 const { 
return token_; }
 
   92  std::vector<std::pair<std::string, std::string>> 
params() { 
return params_; }
 
   97  std::vector<std::pair<std::string, std::string>> 
params_;
 
  113      const std::string &scheme, 
const std::string &token,
 
  114      const std::vector<std::pair<std::string, std::string>> params)
 
  115      : scheme_{scheme}, token_{token}, params_{params} {}
 
  127                                         std::error_code &ec);
 
  134  std::string 
str() 
const;
 
  141  std::string 
scheme()
 const { 
return scheme_; }
 
  148  std::string 
token()
 const { 
return token_; }
 
  155  std::vector<std::pair<std::string, std::string>> 
params() { 
return params_; }
 
  160  std::vector<std::pair<std::string, std::string>> 
params_;
 
Authentication Challenge.
Definition: http_auth.h:56
 
std::vector< std::pair< std::string, std::string > > params()
parameters of the challenge message.
Definition: http_auth.h:92
 
HttpAuthChallenge(const std::string &scheme, const std::string &token, const std::vector< std::pair< std::string, std::string > > params)
construct challenge message.
Definition: http_auth.h:61
 
std::string scheme_
Definition: http_auth.h:95
 
std::vector< std::pair< std::string, std::string > > params_
Definition: http_auth.h:97
 
std::string token_
Definition: http_auth.h:96
 
std::string token() const
token of the challenge message.
Definition: http_auth.h:85
 
std::string scheme() const
authentication scheme.
Definition: http_auth.h:78
 
Authorization message.
Definition: http_auth.h:107
 
std::string token_
Definition: http_auth.h:159
 
HttpAuthCredentials(const std::string &scheme, const std::string &token, const std::vector< std::pair< std::string, std::string > > params)
construct Authorization message from fields.
Definition: http_auth.h:112
 
std::string scheme() const
authentication scheme of the Authorization message.
Definition: http_auth.h:141
 
std::string token() const
token part of the Authorization message.
Definition: http_auth.h:148
 
std::string scheme_
Definition: http_auth.h:158
 
std::vector< std::pair< std::string, std::string > > params()
params part of the Authorization message.
Definition: http_auth.h:155
 
std::vector< std::pair< std::string, std::string > > params_
Definition: http_auth.h:160
 
Quoted String.
Definition: http_auth.h:42
 
#define HTTP_SERVER_EXPORT
Definition: http_server_export.h:40
 
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1057
 
std::vector< T, ut::allocator< T > > vector
Specialization of vector which uses allocator.
Definition: ut0new.h:2879