]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/auth/Gadgets.h
2 * Copyright (C) 1996-2014 The Squid Software Foundation and contributors
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.
9 #ifndef SQUID_AUTH_GADGETS_H
10 #define SQUID_AUTH_GADGETS_H
14 #include "auth/Config.h"
15 #include "auth/User.h"
22 * This is used to link AuthUsers objects into the username cache.
23 * Because some schemes may link in aliases to a user,
24 * the link is not part of the AuthUser structure itself.
26 * Code must not hold onto copies of these objects.
27 * They may exist only so long as the AuthUser being referenced
28 * is recorded in the cache. Any caller using hash_remove_link
29 * must then delete the AuthUserHashPointer.
31 class AuthUserHashPointer
: public hash_link
33 /* first two items must be same as hash_link */
36 MEMPROXY_CLASS(AuthUserHashPointer
);
38 AuthUserHashPointer(Auth::User::Pointer
);
39 ~AuthUserHashPointer() { auth_user
= NULL
; };
41 Auth::User::Pointer
user() const;
44 Auth::User::Pointer auth_user
;
47 MEMPROXY_CLASS_INLINE(AuthUserHashPointer
);
58 \todo this should be a generic cachemgr API type ?
60 typedef void AUTHSSTATS(StoreEntry
*);
63 void authenticateInit(Auth::ConfigVector
*);
66 * Remove all idle authentication state. Intended for use by reconfigure.
68 * Removes the username cache contents and global configuration state.
69 * Stops just short of detaching the auth components completely.
71 * Currently active requests should finish. Howevee new requests will not use
72 * authentication unless something causes the global config to be rebuilt.
73 * Such as a configure load action adding config and re-running authenticateInit().
75 void authenticateReset(void);
77 void authenticateRotate(void);
80 void authenticateFreeProxyAuthUserACLResults(void *data
);
82 int authenticateActiveSchemeCount(void);
84 int authenticateSchemeCount(void);
87 void authenticateOnCloseConnection(ConnStateData
* conn
);
90 #endif /* SQUID_AUTH_GADGETS_H */