]>
Commit | Line | Data |
---|---|---|
bbc27441 | 1 | /* |
ef57eb7b | 2 | * Copyright (C) 1996-2016 The Squid Software Foundation and contributors |
bbc27441 AJ |
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 | ||
94439e4e | 9 | #ifndef __AUTH_BASIC_H__ |
10 | #define __AUTH_BASIC_H__ | |
5817ee13 | 11 | |
a0026a6c AJ |
12 | #if HAVE_AUTH_MODULE_BASIC |
13 | ||
dc79fed8 | 14 | #include "auth/SchemeConfig.h" |
3ad63615 | 15 | #include "auth/Gadgets.h" |
2d2b0bb7 | 16 | #include "auth/UserRequest.h" |
24438ec5 | 17 | #include "helper/forward.h" |
94439e4e | 18 | |
bb8909c3 A |
19 | namespace Auth |
20 | { | |
21 | namespace Basic | |
22 | { | |
62e76326 | 23 | |
372fccd6 | 24 | /** Basic authentication configuration data */ |
dc79fed8 | 25 | class Config : public Auth::SchemeConfig |
62e76326 | 26 | { |
e6ccf245 | 27 | public: |
372fccd6 | 28 | Config(); |
f5691f9c | 29 | virtual bool active() const; |
30 | virtual bool configured() const; | |
d4806c91 | 31 | virtual Auth::UserRequest::Pointer decode(char const *proxy_auth, const char *requestRealm); |
f5691f9c | 32 | virtual void done(); |
0bcb6908 | 33 | virtual void rotateHelpers(); |
dc79fed8 | 34 | virtual bool dump(StoreEntry *, const char *, Auth::SchemeConfig *) const; |
789217a2 | 35 | virtual void fixHeader(Auth::UserRequest::Pointer, HttpReply *, Http::HdrType, HttpRequest *); |
dc79fed8 AJ |
36 | virtual void init(Auth::SchemeConfig *); |
37 | virtual void parse(Auth::SchemeConfig *, int, char *); | |
c7baff40 | 38 | void decode(char const *httpAuthHeader, Auth::UserRequest::Pointer); |
15fab853 | 39 | virtual void registerWithCacheManager(void); |
f5691f9c | 40 | virtual const char * type() const; |
372fccd6 AJ |
41 | |
42 | public: | |
94439e4e | 43 | time_t credentialsTTL; |
64658378 | 44 | int casesensitive; |
f741d2f6 | 45 | int utf8; |
431aae42 AJ |
46 | |
47 | private: | |
48 | char * decodeCleartext(const char *httpAuthHeader); | |
94439e4e | 49 | }; |
50 | ||
372fccd6 AJ |
51 | } // namespace Basic |
52 | } // namespace Auth | |
53 | ||
fe0a0419 AJ |
54 | extern helper *basicauthenticators; |
55 | ||
a0026a6c | 56 | #endif /* HAVE_AUTH_MODULE_BASIC */ |
56a49fda | 57 | #endif /* __AUTH_BASIC_H__ */ |
f53969cc | 58 |