]> git.ipfire.org Git - thirdparty/squid.git/blob - src/auth/ntlm/UserRequest.h
Boilerplate: update copyright blurbs on src/
[thirdparty/squid.git] / src / auth / ntlm / 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_NTLM_USERREQUEST_H
10 #define _SQUID_SRC_AUTH_NTLM_USERREQUEST_H
11
12 #include "auth/ntlm/auth_ntlm.h"
13 #include "auth/UserRequest.h"
14 #include "MemPool.h"
15
16 class ConnStateData;
17 class HttpReply;
18 class HttpRequest;
19 class helper_stateful_server;
20
21 namespace Auth
22 {
23 namespace Ntlm
24 {
25
26 class UserRequest : public Auth::UserRequest
27 {
28
29 public:
30 MEMPROXY_CLASS(Auth::Ntlm::UserRequest);
31
32 UserRequest();
33 virtual ~UserRequest();
34 virtual int authenticated() const;
35 virtual void authenticate(HttpRequest * request, ConnStateData * conn, http_hdr_type type);
36 virtual Auth::Direction module_direction();
37 virtual void startHelperLookup(HttpRequest *req, AccessLogEntry::Pointer &al, AUTHCB *, void *);
38 virtual const char *credentialsStr();
39
40 virtual const char * connLastHeader();
41
42 /* we need to store the helper server between requests */
43 helper_stateful_server *authserver;
44 virtual void releaseAuthServer(); ///< Release authserver NTLM helpers properly when finished or abandoning.
45
46 /* our current blob to pass to the client */
47 char *server_blob;
48
49 /* our current blob to pass to the server */
50 char *client_blob;
51
52 /* currently waiting for helper response */
53 unsigned char waiting;
54
55 /* need access to the request flags to mess around on pconn failure */
56 HttpRequest *request;
57
58 private:
59 static HLPCB HandleReply;
60 };
61
62 } // namespace Ntlm
63 } // namespace Auth
64
65 MEMPROXY_CLASS_INLINE(Auth::Ntlm::UserRequest);
66
67 #endif /* _SQUID_SRC_AUTH_NTLM_USERREQUEST_H */