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