]> git.ipfire.org Git - thirdparty/squid.git/blob - src/auth/basic/Config.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / auth / basic / Config.h
1 /*
2 * Copyright (C) 1996-2016 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 __AUTH_BASIC_H__
10 #define __AUTH_BASIC_H__
11
12 #if HAVE_AUTH_MODULE_BASIC
13
14 #include "auth/Config.h"
15 #include "auth/Gadgets.h"
16 #include "auth/UserRequest.h"
17 #include "helper/forward.h"
18
19 namespace Auth
20 {
21 namespace Basic
22 {
23
24 /** Basic authentication configuration data */
25 class Config : public Auth::Config
26 {
27 public:
28 Config();
29 virtual bool active() const;
30 virtual bool configured() const;
31 virtual Auth::UserRequest::Pointer decode(char const *proxy_auth, const char *requestRealm);
32 virtual void done();
33 virtual void rotateHelpers();
34 virtual bool dump(StoreEntry *, const char *, Auth::Config *) const;
35 virtual void fixHeader(Auth::UserRequest::Pointer, HttpReply *, Http::HdrType, HttpRequest *);
36 virtual void init(Auth::Config *);
37 virtual void parse(Auth::Config *, int, char *);
38 void decode(char const *httpAuthHeader, Auth::UserRequest::Pointer);
39 virtual void registerWithCacheManager(void);
40 virtual const char * type() const;
41
42 public:
43 time_t credentialsTTL;
44 int casesensitive;
45 int utf8;
46
47 private:
48 char * decodeCleartext(const char *httpAuthHeader);
49 };
50
51 } // namespace Basic
52 } // namespace Auth
53
54 extern helper *basicauthenticators;
55
56 #endif /* HAVE_AUTH_MODULE_BASIC */
57 #endif /* __AUTH_BASIC_H__ */
58