14 #ifndef HTTPDIGESTAUTHORIZATION_H 15 #define HTTPDIGESTAUTHORIZATION_H 32 class HTTPDigestAuthorization :
public HTTPAuthorization {
34 HTTPDigestAuthorization(
const Tokens &tokens,
const URLSpec &url,
36 virtual ~HTTPDigestAuthorization();
38 virtual const std::string &get_mechanism()
const;
39 virtual bool is_valid();
41 virtual std::string generate(HTTPEnum::Method method,
const std::string &request_path,
42 const std::string &username,
const std::string &body);
58 static int match_qop_token(
const std::string &token);
60 std::string calc_request_digest(
const std::string &username,
const std::string &password,
61 HTTPEnum::Method method,
62 const std::string &request_path,
const std::string &body);
63 std::string calc_h(
const std::string &data)
const;
64 std::string calc_kd(
const std::string &secret,
const std::string &data)
const;
65 std::string get_a1(
const std::string &username,
const std::string &password);
66 std::string get_a2(HTTPEnum::Method method,
const std::string &request_path,
67 const std::string &body);
68 std::string get_hex_nonce_count()
const;
70 static std::string calc_md5(
const std::string &source);
71 INLINE
static char hexdigit(
int value);
84 static const std::string _mechanism;
87 std::ostream &operator << (std::ostream &out, HTTPDigestAuthorization::Algorithm algorithm);
88 std::ostream &operator << (std::ostream &out, HTTPDigestAuthorization::Qop qop);
92 #endif // HAVE_OPENSSL PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A container for a URL, e.g.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.