]> git.ipfire.org Git - thirdparty/squid.git/blob - src/auth/SchemesConfig.h
Docs: Copyright updates for 2018 (#114)
[thirdparty/squid.git] / src / auth / SchemesConfig.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_SCHEMES_CONFIG_H
10 #define SQUID_SCHEMES_CONFIG_H
11
12 #if USE_AUTH
13
14 #include "auth/SchemeConfig.h"
15
16 namespace Auth
17 {
18
19 /**
20 * Stores authentication schemes list, configured by auth_schemes
21 * directive.
22 */
23 class SchemesConfig
24 {
25 public:
26 SchemesConfig(const char *s, const bool q) : schemes(s), quoted(q), rawSchemes(schemes.c_str()) {}
27 /// Expands special "ALL" scheme name (if provided), removes
28 /// duplicates and fills authConfigs vector.
29 void expand();
30
31 public:
32 /// corresponding vector of Auth::Config objects
33 Auth::ConfigVector authConfigs;
34
35 private:
36 /// raw auth schemes list (may have duplicates)
37 SBuf schemes;
38 const bool quoted;
39
40 public:
41 /// optimization for storing schemes.c_str()
42 const char *rawSchemes;
43 };
44
45 } // namespace Auth
46
47 #endif /* USE_AUTH */
48 #endif /* SQUID_SCHEMES_CONFIG_H */
49