Ark Server API (ASE) - Wiki
|
#include <HTTPAuthenticationParams.h>
Public Member Functions | |
HTTPAuthenticationParams () | |
HTTPAuthenticationParams (const std::string &authInfo) | |
Creates an empty authentication parameters collection. | |
HTTPAuthenticationParams (const HTTPRequest &request) | |
See fromAuthInfo() documentation. | |
HTTPAuthenticationParams (const HTTPResponse &response, const std::string &header=WWW_AUTHENTICATE) | |
See fromRequest() documentation. | |
virtual | ~HTTPAuthenticationParams () |
See fromResponse() documentation. | |
HTTPAuthenticationParams & | operator= (const HTTPAuthenticationParams &authParams) |
Destroys the HTTPAuthenticationParams. | |
void | fromAuthInfo (const std::string &authInfo) |
Assigns the content of another HTTPAuthenticationParams. | |
void | fromRequest (const HTTPRequest &request) |
void | fromResponse (const HTTPResponse &response, const std::string &header=WWW_AUTHENTICATE) |
void | setRealm (const std::string &realm) |
const std::string & | getRealm () const |
Sets the "realm" parameter to the provided string. | |
std::string | toString () const |
Public Member Functions inherited from Poco::Net::NameValueCollection | |
NameValueCollection () | |
NameValueCollection (const NameValueCollection &nvc) | |
Creates an empty NameValueCollection. | |
NameValueCollection (NameValueCollection &&nvc) noexcept | |
Creates a NameValueCollection by copying another one. | |
virtual | ~NameValueCollection () |
Creates a NameValueCollection by moving another one. | |
NameValueCollection & | operator= (const NameValueCollection &nvc) |
Destroys the NameValueCollection. | |
NameValueCollection & | operator= (NameValueCollection &&nvc) noexcept |
Assigns the name-value pairs of another NameValueCollection to this one. | |
void | swap (NameValueCollection &nvc) |
Moves the name-value pairs of another NameValueCollection to this one. | |
const std::string & | operator[] (const std::string &name) const |
Swaps the NameValueCollection with another one. | |
void | set (const std::string &name, const std::string &value) |
void | add (const std::string &name, const std::string &value) |
Sets the value of the (first) name-value pair with the given name. | |
const std::string & | get (const std::string &name) const |
Adds a new name-value pair with the given name and value. | |
const std::string & | get (const std::string &name, const std::string &defaultValue) const |
bool | has (const std::string &name) const |
ConstIterator | find (const std::string &name) const |
ConstIterator | begin () const |
ConstIterator | end () const |
bool | empty () const |
std::size_t | size () const |
Returns true iff the header does not have any content. | |
void | erase (const std::string &name) |
void | clear () |
Removes all name-value pairs with the given name. | |
Static Public Attributes | |
static const std::string | REALM |
static const std::string | NTLM |
static const std::string | WWW_AUTHENTICATE |
static const std::string | PROXY_AUTHENTICATE |
Private Member Functions | |
void | parse (std::string::const_iterator first, std::string::const_iterator last) |
Additional Inherited Members | |
Public Types inherited from Poco::Net::NameValueCollection | |
using | HeaderMap = Poco::ListMap<std::string, std::string> |
using | Iterator = HeaderMap::Iterator |
using | ConstIterator = HeaderMap::ConstIterator |
Collection of name-value pairs of HTTP authentication header (i.e. "realm", "qop", "nonce" in case of digest authentication header).
For NTLM, the base64-encoded NTLM message is available from the "NTLM" property.
Definition at line 33 of file HTTPAuthenticationParams.h.
Poco::Net::HTTPAuthenticationParams::HTTPAuthenticationParams | ( | ) |
|
explicit |
Creates an empty authentication parameters collection.
|
explicit |
See fromAuthInfo() documentation.
Poco::Net::HTTPAuthenticationParams::HTTPAuthenticationParams | ( | const HTTPResponse & | response, |
const std::string & | header = WWW_AUTHENTICATE ) |
See fromRequest() documentation.
|
virtual |
See fromResponse() documentation.
void Poco::Net::HTTPAuthenticationParams::fromAuthInfo | ( | const std::string & | authInfo | ) |
Assigns the content of another HTTPAuthenticationParams.
void Poco::Net::HTTPAuthenticationParams::fromRequest | ( | const HTTPRequest & | request | ) |
Creates an HTTPAuthenticationParams by parsing authentication information.
void Poco::Net::HTTPAuthenticationParams::fromResponse | ( | const HTTPResponse & | response, |
const std::string & | header = WWW_AUTHENTICATE ) |
Extracts authentication information from the request and creates HTTPAuthenticationParams by parsing it.
Throws a NotAuthenticatedException if no authentication information is contained in request. Throws a InvalidArgumentException if authentication scheme is unknown or invalid.
const std::string & Poco::Net::HTTPAuthenticationParams::getRealm | ( | ) | const |
Sets the "realm" parameter to the provided string.
HTTPAuthenticationParams & Poco::Net::HTTPAuthenticationParams::operator= | ( | const HTTPAuthenticationParams & | authParams | ) |
Destroys the HTTPAuthenticationParams.
|
private |
void Poco::Net::HTTPAuthenticationParams::setRealm | ( | const std::string & | realm | ) |
Extracts authentication information from the response and creates HTTPAuthenticationParams by parsing it.
Throws a NotAuthenticatedException if no authentication information is contained in response. Throws a InvalidArgumentException if authentication scheme is unknown or invalid.
std::string Poco::Net::HTTPAuthenticationParams::toString | ( | ) | const |
Returns value of the "realm" parameter.
Throws NotFoundException is there is no "realm" set in the HTTPAuthenticationParams.
|
static |
Definition at line 95 of file HTTPAuthenticationParams.h.
|
static |
Definition at line 97 of file HTTPAuthenticationParams.h.
|
static |
Formats the HTTPAuthenticationParams for inclusion in HTTP request or response authentication header.
Definition at line 94 of file HTTPAuthenticationParams.h.
|
static |
Definition at line 96 of file HTTPAuthenticationParams.h.