]> git.ipfire.org Git - thirdparty/squid.git/blob - src/auth/digest/UserRequest.h
SourceLayout: shuffle memory pool allocators to mem/libmem.la
[thirdparty/squid.git] / src / auth / digest / UserRequest.h
1 /*
2 * Copyright (C) 1996-2014 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9 #ifndef _SQUID_SRC_AUTH_DIGEST_USERREQUEST_H
10 #define _SQUID_SRC_AUTH_DIGEST_USERREQUEST_H
11
12 #include "auth/UserRequest.h"
13
14 class ConnStateData;
15 class HttpReply;
16 class HttpRequest;
17
18 namespace Auth
19 {
20 namespace Digest
21 {
22
23 /**
24 * The UserRequest structure is what follows the http_request around
25 */
26 class UserRequest : public Auth::UserRequest
27 {
28 MEMPROXY_CLASS(Auth::Digest::UserRequest);
29
30 public:
31 UserRequest();
32 virtual ~UserRequest();
33
34 virtual int authenticated() const;
35 virtual void authenticate(HttpRequest * request, ConnStateData * conn, http_hdr_type type);
36 virtual Direction module_direction();
37 virtual void addAuthenticationInfoHeader(HttpReply * rep, int accel);
38 #if WAITING_FOR_TE
39 virtual void addAuthenticationInfoTrailer(HttpReply * rep, int accel);
40 #endif
41
42 virtual void startHelperLookup(HttpRequest *request, AccessLogEntry::Pointer &al, AUTHCB *, void *);
43 virtual const char *credentialsStr();
44
45 char *nonceb64; /* "dcd98b7102dd2f0e8b11d0f600bfb0c093" */
46 char *cnonce; /* "0a4f113b" */
47 char *realm; /* = "testrealm@host.com" */
48 char *pszPass; /* = "Circle Of Life" */
49 char *algorithm; /* = "md5" */
50 char nc[9]; /* = "00000001" */
51 char *pszMethod; /* = "GET" */
52 char *qop; /* = "auth" */
53 char *uri; /* = "/dir/index.html" */
54 char *response;
55
56 struct {
57 bool authinfo_sent;
58 bool invalid_password;
59 bool helper_queried;
60 } flags;
61 digest_nonce_h *nonce;
62
63 private:
64 static HLPCB HandleReply;
65 };
66
67 } // namespace Digest
68 } // namespace Auth
69
70 #endif /* _SQUID_SRC_AUTH_DIGEST_USERREQUEST_H */