]> git.ipfire.org Git - thirdparty/squid.git/blame - src/auth/ntlm/auth_ntlm.h
Major rewrite of proxy authentication to support other schemes than
[thirdparty/squid.git] / src / auth / ntlm / auth_ntlm.h
CommitLineData
94439e4e 1/*
2 * auth_ntlm.h
3 * Internal declarations for the ntlm auth module
4 */
5
6#ifndef __AUTH_NTLM_H__
7#define __AUTH_NTLM_H__
8
9#define DefaultAuthenticateChildrenMax 32 /* 32 processes */
10
11/* Generic */
12typedef struct {
13 void *data;
14 auth_user_request_t *auth_user_request;
15 RH *handler;
16} authenticateStateData;
17
18struct _ntlm_user {
19 /* what username did this connection get? */
20 char *username;
21 dlink_list proxy_auth_list;
22};
23
24struct _ntlm_request {
25 /* what negotiate string did the client use? */
26 char *ntlmnegotiate;
27 /* what challenge did we give the client? */
28 char *authchallenge;
29 /* what authenticate string did we get? */
30 char *ntlmauthenticate;
31 /*we need to store the NTLM helper between requests */
32 helper_stateful_server *authhelper;
33 /* how far through the authentication process are we? */
34 auth_state_t auth_state;
35};
36
37struct _ntlm_helper_state_t {
38 char *challenge; /* the challenge to use with this helper */
39 int starve; /* 0= normal operation. 1=don't hand out any more challenges */
40 int challengeuses; /* the number of times this challenge has been issued */
41 time_t renewed;
42};
43
44/* configuration runtime data */
45struct _auth_ntlm_config {
46 int authenticateChildren;
47 wordlist *authenticate;
48 int challengeuses;
49 time_t challengelifetime;
50#if 0
51 char *authenticate_ntlm_default_domain;
52#endif
53};
54
55typedef struct _ntlm_user ntlm_user_t;
56typedef struct _ntlm_request ntlm_request_t;
57typedef struct _ntlm_helper_state_t ntlm_helper_state_t;
58typedef struct _auth_ntlm_config auth_ntlm_config;
59
60extern MemPool *ntlm_helper_state_pool;
61extern MemPool *ntlm_user_pool;
62extern MemPool *ntlm_request_pool;
63
64#endif