]> git.ipfire.org Git - thirdparty/squid.git/blob - src/auth/digest/UserRequest.h
Boilerplate: update copyright blurbs on src/
[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/digest/auth_digest.h"
13 #include "auth/UserRequest.h"
14 #include "MemPool.h"
15
16 class ConnStateData;
17 class HttpReply;
18 class HttpRequest;
19
20 namespace Auth
21 {
22 namespace Digest
23 {
24
25 /**
26 * The UserRequest structure is what follows the http_request around
27 */
28 class UserRequest : public Auth::UserRequest
29 {
30
31 public:
32 MEMPROXY_CLASS(Auth::Digest::UserRequest);
33
34 UserRequest();
35 virtual ~UserRequest();
36
37 virtual int authenticated() const;
38 virtual void authenticate(HttpRequest * request, ConnStateData * conn, http_hdr_type type);
39 virtual Direction module_direction();
40 virtual void addAuthenticationInfoHeader(HttpReply * rep, int accel);
41 #if WAITING_FOR_TE
42 virtual void addAuthenticationInfoTrailer(HttpReply * rep, int accel);
43 #endif
44
45 virtual void startHelperLookup(HttpRequest *request, AccessLogEntry::Pointer &al, AUTHCB *, void *);
46 virtual const char *credentialsStr();
47
48 char *nonceb64; /* "dcd98b7102dd2f0e8b11d0f600bfb0c093" */
49 char *cnonce; /* "0a4f113b" */
50 char *realm; /* = "testrealm@host.com" */
51 char *pszPass; /* = "Circle Of Life" */
52 char *algorithm; /* = "md5" */
53 char nc[9]; /* = "00000001" */
54 char *pszMethod; /* = "GET" */
55 char *qop; /* = "auth" */
56 char *uri; /* = "/dir/index.html" */
57 char *response;
58
59 struct {
60 bool authinfo_sent;
61 bool invalid_password;
62 bool helper_queried;
63 } flags;
64 digest_nonce_h *nonce;
65
66 private:
67 static HLPCB HandleReply;
68 };
69
70 } // namespace Digest
71 } // namespace Auth
72
73 MEMPROXY_CLASS_INLINE(Auth::Digest::UserRequest);
74
75 #endif /* _SQUID_SRC_AUTH_DIGEST_USERREQUEST_H */