]> git.ipfire.org Git - thirdparty/squid.git/blob - src/auth/digest/UserRequest.h
merge from trunk
[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/digest/auth_digest.h"
5 #include "auth/UserRequest.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(HttpRequest *request, AccessLogEntry::Pointer &al, AUTHCB *, void *);
38 virtual const char *credentialsStr();
39
40 char *nonceb64; /* "dcd98b7102dd2f0e8b11d0f600bfb0c093" */
41 char *cnonce; /* "0a4f113b" */
42 char *realm; /* = "testrealm@host.com" */
43 char *pszPass; /* = "Circle Of Life" */
44 char *algorithm; /* = "md5" */
45 char nc[9]; /* = "00000001" */
46 char *pszMethod; /* = "GET" */
47 char *qop; /* = "auth" */
48 char *uri; /* = "/dir/index.html" */
49 char *response;
50
51 struct {
52 bool authinfo_sent;
53 bool invalid_password;
54 bool helper_queried;
55 } flags;
56 digest_nonce_h *nonce;
57
58 private:
59 static HLPCB HandleReply;
60 };
61
62 } // namespace Digest
63 } // namespace Auth
64
65 MEMPROXY_CLASS_INLINE(Auth::Digest::UserRequest);
66
67 #endif /* _SQUID_SRC_AUTH_DIGEST_USERREQUEST_H */