mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-25 18:22:59 +02:00
fixed GH #478: HTTPCredentials and HTTPAuthenticationParams support multiple WWW-Authenticate headers
This commit is contained in:
@@ -46,7 +46,7 @@ public:
|
||||
explicit HTTPAuthenticationParams(const HTTPRequest& request);
|
||||
/// See fromRequest() documentation.
|
||||
|
||||
explicit HTTPAuthenticationParams(const HTTPResponse& response);
|
||||
HTTPAuthenticationParams(const HTTPResponse& response, const std::string& header = WWW_AUTHENTICATE);
|
||||
/// See fromResponse() documentation.
|
||||
|
||||
virtual ~HTTPAuthenticationParams();
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
/// Throws a InvalidArgumentException if authentication scheme is
|
||||
/// unknown or invalid.
|
||||
|
||||
void fromResponse(const HTTPResponse& response);
|
||||
void fromResponse(const HTTPResponse& response, const std::string& header = WWW_AUTHENTICATE);
|
||||
/// Extracts authentication information from the response and creates
|
||||
/// HTTPAuthenticationParams by parsing it.
|
||||
///
|
||||
@@ -91,6 +91,8 @@ public:
|
||||
/// request or response authentication header.
|
||||
|
||||
static const std::string REALM;
|
||||
static const std::string WWW_AUTHENTICATE;
|
||||
static const std::string PROXY_AUTHENTICATE;
|
||||
|
||||
private:
|
||||
void parse(std::string::const_iterator first, std::string::const_iterator last);
|
||||
|
||||
@@ -52,6 +52,9 @@ public:
|
||||
~HTTPDigestCredentials();
|
||||
/// Destroys the HTTPDigestCredentials.
|
||||
|
||||
void reset();
|
||||
/// Resets the HTTPDigestCredentials object to a clean state.
|
||||
|
||||
void setUsername(const std::string& username);
|
||||
/// Sets the username.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user