1 /* 2 * Copyright (C) 1996-2021 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 /* DEBUG: section 82 External ACL */ 10 11 #ifndef SQUID_EXTERNALACLENTRY_H 12 #define SQUID_EXTERNALACLENTRY_H 13 14 #include "acl/Acl.h" 15 #include "acl/forward.h" 16 #include "hash.h" 17 #include "Notes.h" 18 #include "SquidString.h" 19 20 class external_acl; 21 /****************************************************************** 22 * ExternalACLEntryData 23 * Core data that ExternalACLEntry manages. 24 * Not meant to be used as remote storage at any point: 25 * stack or static or composition use only. 26 */ 27 28 class ExternalACLEntryData 29 { 30 31 public: ExternalACLEntryData()32 ExternalACLEntryData() : result(ACCESS_DUNNO) {} 33 34 allow_t result; 35 36 /// list of all kv-pairs returned by the helper 37 NotePairs notes; 38 39 #if USE_AUTH 40 // TODO use an AuthUser to hold this info 41 String user; 42 String password; 43 #endif 44 String message; 45 String tag; 46 String log; 47 }; 48 49 /******************************************************************* 50 * external_acl cache entry 51 * Used opaque in the interface 52 */ 53 54 class ExternalACLEntry: public hash_link, public RefCountable 55 { 56 MEMPROXY_CLASS(ExternalACLEntry); 57 58 public: 59 ExternalACLEntry(); 60 ~ExternalACLEntry(); 61 62 void update(ExternalACLEntryData const &); 63 dlink_node lru; 64 allow_t result; 65 time_t date; 66 67 /// list of all kv-pairs returned by the helper 68 NotePairs notes; 69 70 #if USE_AUTH 71 String user; 72 String password; 73 #endif 74 String message; 75 String tag; 76 String log; 77 external_acl *def; 78 }; 79 80 #endif 81 82