diff options
Diffstat (limited to 'net/http/http_auth.h')
-rw-r--r-- | net/http/http_auth.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/net/http/http_auth.h b/net/http/http_auth.h index 8d1ecc5..faa5e93 100644 --- a/net/http/http_auth.h +++ b/net/http/http_auth.h @@ -106,10 +106,16 @@ class HttpAuth { public: ChallengeTokenizer(std::string::const_iterator begin, std::string::const_iterator end) - : props_(begin, end, ','), valid_(true), expect_base64_token_(false) { + : props_(begin, end, ','), valid_(true), begin_(begin), end_(end), + expect_base64_token_(false) { Init(begin, end); } + // Get the original text. + std::string challenge_text() const { + return std::string(begin_, end_); + } + // Get the auth scheme of the challenge. std::string::const_iterator scheme_begin() const { return scheme_begin_; } std::string::const_iterator scheme_end() const { return scheme_end_; } @@ -164,6 +170,9 @@ class HttpAuth { HttpUtil::ValuesIterator props_; bool valid_; + std::string::const_iterator begin_; + std::string::const_iterator end_; + std::string::const_iterator scheme_begin_; std::string::const_iterator scheme_end_; |