Authorization message.
More...
#include <http_auth.h>
|
| HttpAuthCredentials (const std::string &scheme, const std::string &token, const std::vector< std::pair< std::string, std::string > > params) |
| construct Authorization message from fields. More...
|
|
std::string | str () const |
| string representation of 'credentials'. More...
|
|
std::string | scheme () const |
| authentication scheme of the Authorization message. More...
|
|
std::string | token () const |
| token part of the Authorization message. More...
|
|
std::vector< std::pair< std::string, std::string > > | params () |
| params part of the Authorization message. More...
|
|
Authorization message.
sent from client to server.
- See also
- https://tools.ietf.org/html/rfc7235#section-4.2
◆ HttpAuthCredentials()
HttpAuthCredentials::HttpAuthCredentials |
( |
const std::string & |
scheme, |
|
|
const std::string & |
token, |
|
|
const std::vector< std::pair< std::string, std::string > > |
params |
|
) |
| |
|
inline |
construct Authorization message from fields.
◆ from_header()
HttpAuthCredentials HttpAuthCredentials::from_header |
( |
const std::string & |
hdr, |
|
|
std::error_code & |
ec |
|
) |
| |
|
static |
parse a 'credentials' field.
ec MUST be checked before using the return-value.
- Parameters
-
hdr | content of Authorization header |
ec | error code |
- Returns
- a HttpAuthCredentials message ... and error_code
◆ params()
std::vector< std::pair< std::string, std::string > > HttpAuthCredentials::params |
( |
| ) |
|
|
inline |
params part of the Authorization message.
for Bearer this is a list of params
◆ scheme()
std::string HttpAuthCredentials::scheme |
( |
| ) |
const |
|
inline |
authentication scheme of the Authorization message.
e.g.: Basic
◆ str()
std::string HttpAuthCredentials::str |
( |
| ) |
const |
string representation of 'credentials'.
according to RFC 7235
◆ token()
std::string HttpAuthCredentials::token |
( |
| ) |
const |
|
inline |
token part of the Authorization message.
for Basic this is a Base64 encoded strings.
◆ params_
std::vector<std::pair<std::string, std::string> > HttpAuthCredentials::params_ |
|
private |
◆ scheme_
std::string HttpAuthCredentials::scheme_ |
|
private |
◆ token_
std::string HttpAuthCredentials::token_ |
|
private |
The documentation for this class was generated from the following files: