]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/auth/Gadgets.h
5 * SQUID Web Proxy Cache http://www.squid-cache.org/
6 * ----------------------------------------------------------
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.
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.
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.
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.
33 #ifndef SQUID_AUTH_GADGETS_H
34 #define SQUID_AUTH_GADGETS_H
38 #include "auth/Config.h"
39 #include "auth/User.h"
46 * This is used to link AuthUsers objects into the username cache.
47 * Because some schemes may link in aliases to a user,
48 * the link is not part of the AuthUser structure itself.
50 * Code must not hold onto copies of these objects.
51 * They may exist only so long as the AuthUser being referenced
52 * is recorded in the cache. Any caller using hash_remove_link
53 * must then delete the AuthUserHashPointer.
55 class AuthUserHashPointer
: public hash_link
57 /* first two items must be same as hash_link */
60 MEMPROXY_CLASS(AuthUserHashPointer
);
62 AuthUserHashPointer(AuthUser::Pointer
);
63 ~AuthUserHashPointer() { auth_user
= NULL
; };
65 AuthUser::Pointer
user() const;
68 AuthUser::Pointer auth_user
;
71 MEMPROXY_CLASS_INLINE(AuthUserHashPointer
);
79 \todo this should be a generic cachemgr API type ?
81 typedef void AUTHSSTATS(StoreEntry
*);
84 extern void authenticateInit(Auth::authConfig
*);
87 * Remove all idle authentication state. Intended for use by reconfigure.
89 * Removes the username cache contents and global configuration state.
90 * Stops just short of detaching the auth components completely.
92 * Currently active requests should finish. Howevee new requests will not use
93 * authentication unless something causes the global config to be rebuilt.
94 * Such as a configure load action adding config and re-running authenticateInit().
96 extern void authenticateReset(void);
98 extern void authenticateRotate(void);
101 extern void authenticateFreeProxyAuthUserACLResults(void *data
);
103 extern int authenticateActiveSchemeCount(void);
105 extern int authenticateSchemeCount(void);
108 extern void authenticateOnCloseConnection(ConnStateData
* conn
);
110 #endif /* SQUID_AUTH_GADGETS_H */