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