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