]> git.ipfire.org Git - thirdparty/squid.git/blob - src/auth/ntlm/UserRequest.h
SourceLayout: Add enum Direction for AuthUserRequests state logics
[thirdparty/squid.git] / src / auth / ntlm / UserRequest.h
1 #ifndef _SQUID_SRC_AUTH_NTLM_USERREQUEST_H
2 #define _SQUID_SRC_AUTH_NTLM_USERREQUEST_H
3
4 #include "auth/UserRequest.h"
5 #include "auth/ntlm/auth_ntlm.h"
6 #include "MemPool.h"
7
8 class ConnStateData;
9 class HttpReply;
10 class HttpRequest;
11 struct helper_stateful_server;
12
13 class AuthNTLMUserRequest : public AuthUserRequest
14 {
15
16 public:
17 MEMPROXY_CLASS(AuthNTLMUserRequest);
18
19 AuthNTLMUserRequest();
20 virtual ~AuthNTLMUserRequest();
21 virtual int authenticated() const;
22 virtual void authenticate(HttpRequest * request, ConnStateData * conn, http_hdr_type type);
23 virtual Auth::Direction module_direction();
24 virtual void onConnectionClose(ConnStateData *);
25 virtual void module_start(RH *, void *);
26
27 virtual const char * connLastHeader();
28
29 /* we need to store the helper server between requests */
30 helper_stateful_server *authserver;
31 void releaseAuthServer(void); ///< Release authserver NTLM helpers properly when finished or abandoning.
32
33 /* what connection is this associated with */
34 // ConnStateData * conn;
35
36 /* our current blob to pass to the client */
37 char *server_blob;
38
39 /* our current blob to pass to the server */
40 char *client_blob;
41
42 /* currently waiting for helper response */
43 unsigned char waiting;
44
45 /* need access to the request flags to mess around on pconn failure */
46 HttpRequest *request;
47
48 private:
49 static HLPSCB HandleReply;
50 };
51
52 MEMPROXY_CLASS_INLINE(AuthNTLMUserRequest);
53
54 #endif /* _SQUID_SRC_AUTH_NTLM_USERREQUEST_H */