]> git.ipfire.org Git - thirdparty/squid.git/blob - src/authenticate.h
f2d1170eed310f2b52f21aca93aa9b1b3eead4fa
[thirdparty/squid.git] / src / authenticate.h
1 /*
2 * $Id: authenticate.h,v 1.17 2008/02/26 21:49:34 amosjeffries Exp $
3 *
4 *
5 * SQUID Web Proxy Cache http://www.squid-cache.org/
6 * ----------------------------------------------------------
7 *
8 * Squid is the result of efforts by numerous individuals from
9 * the Internet community; see the CONTRIBUTORS file for full
10 * details. Many organizations have provided support for Squid's
11 * development; see the SPONSORS file for full details. Squid is
12 * Copyrighted (C) 2001 by the Regents of the University of
13 * California; see the COPYRIGHT file for full details. Squid
14 * incorporates software developed and/or copyrighted by other
15 * sources; see the CREDITS file for full details.
16 *
17 * This program is free software; you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License as published by
19 * the Free Software Foundation; either version 2 of the License, or
20 * (at your option) any later version.
21 *
22 * This program is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 * GNU General Public License for more details.
26 *
27 * You should have received a copy of the GNU General Public License
28 * along with this program; if not, write to the Free Software
29 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
30 *
31 */
32
33 #ifndef SQUID_AUTHENTICATE_H
34 #define SQUID_AUTHENTICATE_H
35
36 #include "client_side.h"
37
38 class AuthUser;
39
40 /**
41 \ingroup AuthAPI
42 *
43 * This is used to link auth_users into the username cache.
44 * Because some schemes may link in aliases to a user,
45 * the link is not part of the AuthUser structure itself.
46 *
47 \todo Inheritance in a struct? this should be a class.
48 */
49 struct AuthUserHashPointer : public hash_link
50 {
51 /* first two items must be same as hash_link */
52
53 public:
54 static void removeFromCache (void *anAuthUserHashPointer);
55 MEMPROXY_CLASS(AuthUserHashPointer);
56
57 AuthUserHashPointer (AuthUser *);
58
59 AuthUser *user() const;
60
61 private:
62 AuthUser *auth_user;
63 };
64
65 MEMPROXY_CLASS_INLINE(AuthUserHashPointer) /**DOCS_NOSEMI*/
66
67 class ConnStateData;
68
69 class AuthScheme;
70
71 /**
72 \ingroup AuthAPI
73 \todo this should be a generic cachemgr API type ?
74 */
75 typedef void AUTHSSTATS(StoreEntry *);
76
77 /**
78 \ingroup AuthAPI
79 * subsumed by the C++ interface
80 \todo does 'subsumed' mean deprecated use a C++ API call?
81 */
82 extern void authenticateAuthUserMerge(auth_user_t *, auth_user_t *);
83
84 /// \ingroup AuthAPI
85 extern void authenticateInit(authConfig *);
86 /// \ingroup AuthAPI
87 extern void authenticateRegisterWithCacheManager(authConfig * config, CacheManager & manager);
88 /// \ingroup AuthAPI
89 extern void authenticateShutdown(void);
90 /// \ingroup AuthAPI
91 extern int authenticateAuthUserInuse(auth_user_t * auth_user);
92
93 /// \ingroup AuthAPI
94 extern void authenticateFreeProxyAuthUserACLResults(void *data);
95 /// \ingroup AuthAPI
96 extern int authenticateActiveSchemeCount(void);
97 /// \ingroup AuthAPI
98 extern int authenticateSchemeCount(void);
99
100 /// \ingroup AuthAPI
101 extern void authenticateUserCacheRestart(void);
102 /// \ingroup AuthAPI
103 extern void authenticateOnCloseConnection(ConnStateData * conn);
104
105 #endif /* SQUID_AUTHENTICATE_H */