]>
Commit | Line | Data |
---|---|---|
5bfc3dbd | 1 | /* |
b8ae064d | 2 | * Copyright (C) 1996-2023 The Squid Software Foundation and contributors |
5bfc3dbd EB |
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 | ||
dc79fed8 | 14 | #include "auth/SchemeConfig.h" |
5bfc3dbd EB |
15 | |
16 | namespace Auth | |
17 | { | |
18 | ||
19 | /** | |
5bfc3dbd EB |
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 | |
d6e94bda | 33 | Auth::ConfigVector authConfigs; |
5bfc3dbd EB |
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 | ||
5bfc3dbd EB |
45 | } // namespace Auth |
46 | ||
47 | #endif /* USE_AUTH */ | |
48 | #endif /* SQUID_SCHEMES_CONFIG_H */ | |
49 |