]> git.ipfire.org Git - thirdparty/squid.git/blob - src/auth/digest/UserRequest.h
SourceLayout: Add enum Direction for AuthUserRequests state logics
[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 /**
13 * The AuthDigestUserRequest structure is what follows the http_request around
14 */
15 class AuthDigestUserRequest : public AuthUserRequest
16 {
17
18 public:
19 MEMPROXY_CLASS(AuthDigestUserRequest);
20
21 AuthDigestUserRequest();
22 virtual ~AuthDigestUserRequest();
23
24 virtual int authenticated() const;
25 virtual void authenticate(HttpRequest * request, ConnStateData * conn, http_hdr_type type);
26 virtual Auth::Direction module_direction();
27 virtual void addHeader(HttpReply * rep, int accel);
28 #if WAITING_FOR_TE
29
30 virtual void addTrailer(HttpReply * rep, int accel);
31 #endif
32
33 virtual void module_start(RH *, void *);
34
35 char *nonceb64; /* "dcd98b7102dd2f0e8b11d0f600bfb0c093" */
36 char *cnonce; /* "0a4f113b" */
37 char *realm; /* = "testrealm@host.com" */
38 char *pszPass; /* = "Circle Of Life" */
39 char *algorithm; /* = "md5" */
40 char nc[9]; /* = "00000001" */
41 char *pszMethod; /* = "GET" */
42 char *qop; /* = "auth" */
43 char *uri; /* = "/dir/index.html" */
44 char *response;
45
46 struct {
47 unsigned int authinfo_sent:1;
48 unsigned int invalid_password:1;
49 unsigned int helper_queried:1;
50 } flags;
51 digest_nonce_h *nonce;
52
53 private:
54 static HLPCB HandleReply;
55 };
56
57 MEMPROXY_CLASS_INLINE(AuthDigestUserRequest);
58
59 #endif /* _SQUID_SRC_AUTH_DIGEST_USERREQUEST_H */