]> git.ipfire.org Git - thirdparty/squid.git/blob - src/auth/Config.h
Source Format Enforcement (#1234)
[thirdparty/squid.git] / src / auth / Config.h
1 /*
2 * Copyright (C) 1996-2023 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 public:
24 Config() = default;
25 Config(Config &&) = delete; // no support for copying of any kind
26 ~Config() = default;
27
28 /// set of auth_params directives
29 Auth::ConfigVector schemes;
30
31 /// set of auth_schemes directives
32 std::vector<Auth::SchemesConfig> schemeLists;
33
34 /// the ACL list for auth_schemes directives
35 acl_access *schemeAccess = nullptr;
36
37 /// the authenticate_cache_garbage_interval
38 time_t garbageCollectInterval = 0;
39
40 // TODO replace this directive with per-Scheme 'credentialsttl'
41 // and make Scheme::expirestime the real time-when-expires.
42 /// the authenticate_ttl
43 time_t credentialsTtl = 0;
44
45 /// the authenticate_ip_ttl
46 time_t ipTtl = 0;
47 };
48
49 extern Auth::Config TheConfig;
50
51 } // namespace Auth
52
53 #endif /* USE_AUTH */
54 #endif /* SQUID_SRC_AUTH_CONFIG_H */
55