]> git.ipfire.org Git - thirdparty/squid.git/blob - src/auth/Config.h
Docs: Copyright updates for 2018 (#114)
[thirdparty/squid.git] / src / auth / Config.h
1 /*
2 * Copyright (C) 1996-2018 The Squid Software Foundation and contributors
3 *
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.
7 */
8
9 #ifndef SQUID_SRC_AUTH_CONFIG_H
10 #define SQUID_SRC_AUTH_CONFIG_H
11
12 #if USE_AUTH
13
14 #include "acl/forward.h"
15 #include "auth/SchemeConfig.h"
16 #include "auth/SchemesConfig.h"
17
18 namespace Auth
19 {
20
21 class Config
22 {
23 explicit Config(const Config &) = delete;
24 explicit Config(const Config *) = delete;
25
26 public:
27 Config() = default;
28 explicit Config(Config &&) = default;
29 ~Config() { assert(!schemeAccess); }
30
31 /// set of auth_params directives
32 Auth::ConfigVector schemes;
33
34 /// set of auth_schemes directives
35 std::vector<Auth::SchemesConfig> schemeLists;
36
37 /// the ACL list for auth_schemes directives
38 acl_access *schemeAccess = nullptr;
39
40 /// the authenticate_cache_garbage_interval
41 time_t garbageCollectInterval = 0;
42
43 // TODO replace this directive with per-Scheme 'credentialsttl'
44 // and make Scheme::expirestime the real time-when-expires.
45 /// the authenticate_ttl
46 time_t credentialsTtl = 0;
47
48 /// the authenticate_ip_ttl
49 time_t ipTtl = 0;
50 };
51
52 extern Auth::Config TheConfig;
53
54 } // namespace Auth
55
56 #endif /* USE_AUTH */
57 #endif /* SQUID_SRC_AUTH_CONFIG_H */
58