25#ifndef MYSQLROUTER_HTTP_AUTH_INCLUDED
26#define MYSQLROUTER_HTTP_AUTH_INCLUDED
29#include <system_error>
43 static std::string quote(
const std::string &
str);
61 const std::string &scheme,
const std::string &token,
62 const std::vector<std::pair<std::string, std::string>> params)
63 : scheme_{scheme}, token_{token}, params_{params} {}
70 std::string
str()
const;
77 std::string
scheme()
const {
return scheme_; }
84 std::string
token()
const {
return token_; }
91 std::vector<std::pair<std::string, std::string>>
params() {
return params_; }
96 std::vector<std::pair<std::string, std::string>>
params_;
112 const std::string &scheme,
const std::string &token,
113 const std::vector<std::pair<std::string, std::string>> params)
114 : scheme_{scheme}, token_{token}, params_{params} {}
126 std::error_code &ec);
133 std::string
str()
const;
140 std::string
scheme()
const {
return scheme_; }
147 std::string
token()
const {
return token_; }
154 std::vector<std::pair<std::string, std::string>>
params() {
return params_; }
159 std::vector<std::pair<std::string, std::string>>
params_;
Authentication Challenge.
Definition: http_auth.h:55
std::vector< std::pair< std::string, std::string > > params()
parameters of the challenge message.
Definition: http_auth.h:91
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:60
std::string scheme_
Definition: http_auth.h:94
std::vector< std::pair< std::string, std::string > > params_
Definition: http_auth.h:96
std::string token_
Definition: http_auth.h:95
std::string token() const
token of the challenge message.
Definition: http_auth.h:84
std::string scheme() const
authentication scheme.
Definition: http_auth.h:77
Authorization message.
Definition: http_auth.h:106
std::string token_
Definition: http_auth.h:158
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:111
std::string scheme() const
authentication scheme of the Authorization message.
Definition: http_auth.h:140
std::string token() const
token part of the Authorization message.
Definition: http_auth.h:147
std::string scheme_
Definition: http_auth.h:157
std::vector< std::pair< std::string, std::string > > params()
params part of the Authorization message.
Definition: http_auth.h:154
std::vector< std::pair< std::string, std::string > > params_
Definition: http_auth.h:159
Quoted String.
Definition: http_auth.h:41
#define HTTP_SERVER_EXPORT
Definition: http_server_export.h:39
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1065
std::vector< T, ut::allocator< T > > vector
Specialization of vector which uses allocator.
Definition: ut0new.h:2873