]> git.ipfire.org Git - thirdparty/squid.git/blob - src/auth/digest/UserRequest.h
Merged from parent (large-rock r12530 including trunk r12732; v3.3.3+).
[thirdparty/squid.git] / src / auth / digest / UserRequest.h
1 #ifndef _SQUID_SRC_AUTH_DIGEST_USERREQUEST_H
2 #define _SQUID_SRC_AUTH_DIGEST_USERREQUEST_H
3
4 #include "auth/UserRequest.h"
5 #include "auth/digest/auth_digest.h"
6 #include "MemPool.h"
7
8 class ConnStateData;
9 class HttpReply;
10 class HttpRequest;
11
12 namespace Auth
13 {
14 namespace Digest
15 {
16
17 /**
18 * The UserRequest structure is what follows the http_request around
19 */
20 class UserRequest : public Auth::UserRequest
21 {
22
23 public:
24 MEMPROXY_CLASS(Auth::Digest::UserRequest);
25
26 UserRequest();
27 virtual ~UserRequest();
28
29 virtual int authenticated() const;
30 virtual void authenticate(HttpRequest * request, ConnStateData * conn, http_hdr_type type);
31 virtual Direction module_direction();
32 virtual void addAuthenticationInfoHeader(HttpReply * rep, int accel);
33 #if WAITING_FOR_TE
34 virtual void addAuthenticationInfoTrailer(HttpReply * rep, int accel);
35 #endif
36
37 virtual void module_start(AUTHCB *, void *);
38
39 char *nonceb64; /* "dcd98b7102dd2f0e8b11d0f600bfb0c093" */
40 char *cnonce; /* "0a4f113b" */
41 char *realm; /* = "testrealm@host.com" */
42 char *pszPass; /* = "Circle Of Life" */
43 char *algorithm; /* = "md5" */
44 char nc[9]; /* = "00000001" */
45 char *pszMethod; /* = "GET" */
46 char *qop; /* = "auth" */
47 char *uri; /* = "/dir/index.html" */
48 char *response;
49
50 struct {
51 bool authinfo_sent;
52 bool invalid_password;
53 bool helper_queried;
54 } flags;
55 digest_nonce_h *nonce;
56
57 private:
58 static HLPCB HandleReply;
59 };
60
61 } // namespace Digest
62 } // namespace Auth
63
64 MEMPROXY_CLASS_INLINE(Auth::Digest::UserRequest);
65
66 #endif /* _SQUID_SRC_AUTH_DIGEST_USERREQUEST_H */