]>
Commit | Line | Data |
---|---|---|
8000a965 | 1 | /* |
bbc27441 | 2 | * Copyright (C) 1996-2014 The Squid Software Foundation and contributors |
8000a965 | 3 | * |
bbc27441 AJ |
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. | |
8000a965 | 7 | */ |
8 | ||
9 | #ifndef SQUID_ACLPROXYAUTH_H | |
10 | #define SQUID_ACLPROXYAUTH_H | |
2f1431ea AJ |
11 | |
12 | #if USE_AUTH | |
13 | ||
b0a35f41 | 14 | #include "acl/Acl.h" |
b0a35f41 | 15 | #include "acl/Checklist.h" |
602d9612 | 16 | #include "acl/Data.h" |
225b7b10 | 17 | |
62e76326 | 18 | class ProxyAuthLookup : public ACLChecklist::AsyncState |
19 | { | |
20 | ||
21 | public: | |
225b7b10 | 22 | static ProxyAuthLookup *Instance(); |
d6d0eb11 | 23 | virtual void checkForAsync(ACLChecklist *) const; |
62e76326 | 24 | |
25 | private: | |
225b7b10 | 26 | static ProxyAuthLookup instance_; |
4c535e87 | 27 | static void LookupDone(void *data); |
225b7b10 | 28 | }; |
29 | ||
62e76326 | 30 | class ACLProxyAuth : public ACL |
31 | { | |
62e76326 | 32 | public: |
b001e822 | 33 | MEMPROXY_CLASS(ACLProxyAuth); |
8000a965 | 34 | |
35 | ~ACLProxyAuth(); | |
5dee515e | 36 | ACLProxyAuth(ACLData<char const *> *, char const *); |
d6d0eb11 AJ |
37 | ACLProxyAuth(ACLProxyAuth const &); |
38 | ACLProxyAuth &operator =(ACLProxyAuth const &); | |
62e76326 | 39 | |
8000a965 | 40 | virtual char const *typeString() const; |
8000a965 | 41 | virtual void parse(); |
42 | virtual bool isProxyAuth() const {return true;} | |
62e76326 | 43 | |
8000a965 | 44 | virtual int match(ACLChecklist *checklist); |
8966008b | 45 | virtual SBufList dump() const; |
d6d0eb11 AJ |
46 | virtual bool valid() const; |
47 | virtual bool empty() const; | |
225b7b10 | 48 | virtual bool requiresRequest() const {return true;} |
62e76326 | 49 | |
7d20e140 | 50 | virtual ACL *clone() const; |
225b7b10 | 51 | virtual int matchForCache(ACLChecklist *checklist); |
62e76326 | 52 | |
53 | private: | |
225b7b10 | 54 | static Prototype UserRegistryProtoype; |
55 | static ACLProxyAuth UserRegistryEntry_; | |
56 | static Prototype RegexRegistryProtoype; | |
57 | static ACLProxyAuth RegexRegistryEntry_; | |
58 | int matchProxyAuth(ACLChecklist *); | |
5dee515e | 59 | ACLData<char const *> *data; |
3841dd46 | 60 | char const *type_; |
8000a965 | 61 | }; |
62 | ||
d85b8894 | 63 | MEMPROXY_CLASS_INLINE(ACLProxyAuth); |
b001e822 | 64 | |
2f1431ea | 65 | #endif /* USE_AUTH */ |
8000a965 | 66 | #endif /* SQUID_ACLPROXYAUTH_H */ |