SchemeConfig.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2019 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 #ifndef SQUID_SRC_AUTH_SCHEMECONFIG_H
10 #define SQUID_SRC_AUTH_SCHEMECONFIG_H
11 
12 #if USE_AUTH
13 
14 #include "AccessLogEntry.h"
15 #include "auth/forward.h"
16 #include "auth/UserRequest.h"
17 #include "helper/ChildConfig.h"
18 
19 class StoreEntry;
20 class HttpReply;
21 class HttpRequest;
22 class wordlist;
23 
24 /* for Http::HdrType parameters-by-value */
25 #include "HttpHeader.h"
26 
27 namespace Format
28 {
29 class Format;
30 }
31 
32 namespace Auth
33 {
34 
47 {
48 
49 public:
50  static UserRequest::Pointer CreateAuthUser(const char *proxy_auth, AccessLogEntry::Pointer &al);
51 
52  static SchemeConfig *Find(const char *proxy_auth);
55  static SchemeConfig *GetParsed(const char *proxy_auth);
56  SchemeConfig() : authenticateChildren(20) {}
57 
58  virtual ~SchemeConfig() {}
59 
66  virtual bool active() const = 0;
67 
78  virtual UserRequest::Pointer decode(char const *proxy_auth, const char *requestRealm) = 0;
79 
87  virtual void done();
88 
97  virtual bool configured() const = 0;
98 
103  virtual void rotateHelpers(void) = 0;
104 
110  virtual bool dump(StoreEntry *, const char *, SchemeConfig *) const;
111 
113  virtual void fixHeader(UserRequest::Pointer, HttpReply *, Http::HdrType, HttpRequest *) = 0;
114 
116  virtual void init(SchemeConfig *) = 0;
117 
119  virtual void registerWithCacheManager(void);
120 
122  virtual void parse(SchemeConfig *, int, char *);
123 
125  virtual const char * type() const = 0;
126 
127 public:
129  wordlist *authenticateProgram = nullptr;
131  Format::Format *keyExtras = nullptr;
132  int keep_alive = 1;
133  int utf8 = 0;
134 
135 protected:
138 };
139 
140 } // namespace Auth
141 
142 #endif /* USE_AUTH */
143 #endif /* SQUID_SRC_AUTH_SCHEMECONFIG_H */
144 
String keyExtrasLine
The format of the request to the auth helper.
Definition: SchemeConfig.h:130
SBuf realm
RFC 7235 section 2.2 - Protection Space (Realm)
Definition: SchemeConfig.h:137
int type
Definition: errorpage.cc:152
Definition: SBuf.h:86
static struct node * parse(FILE *fp)
Definition: parse.c:995
Helper::ChildConfig authenticateChildren
Definition: SchemeConfig.h:128
virtual ~SchemeConfig()
Definition: SchemeConfig.h:58
HTTP Authentication.
Definition: Config.h:18

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors