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