UserRequest.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2023 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_DIGEST_USERREQUEST_H
10#define _SQUID_SRC_AUTH_DIGEST_USERREQUEST_H
11
12#if HAVE_AUTH_MODULE_DIGEST
13
14#include "auth/digest/Config.h"
15#include "auth/UserRequest.h"
16
17class ConnStateData;
18class HttpReply;
19class HttpRequest;
20
21namespace Auth
22{
23namespace Digest
24{
25
29class UserRequest : public Auth::UserRequest
30{
31 MEMPROXY_CLASS(Auth::Digest::UserRequest);
32
33public:
34 UserRequest();
35 ~UserRequest() override;
36
37 int authenticated() const override;
38 void authenticate(HttpRequest * request, ConnStateData * conn, Http::HdrType type) override;
39 Direction module_direction() override;
40 void addAuthenticationInfoHeader(HttpReply * rep, int accel) override;
41#if WAITING_FOR_TE
42 virtual void addAuthenticationInfoTrailer(HttpReply * rep, int accel);
43#endif
44
45 void startHelperLookup(HttpRequest *request, AccessLogEntry::Pointer &al, AUTHCB *, void *) override;
46 const char *credentialsStr() override;
47
48 char *noncehex; /* "dcd98b7102dd2f0e8b11d0f600bfb0c093" */
49 char *cnonce; /* "0a4f113b" */
50 char *realm; /* = "testrealm@host.com" */
51 char *pszPass; /* = "Circle Of Life" */
52 char *algorithm; /* = "md5" */
53 char nc[9]; /* = "00000001" */
54 char *pszMethod; /* = "GET" */
55 char *qop; /* = "auth" */
56 char *uri; /* = "/dir/index.html" */
57 char *response;
58
59 struct {
60 bool authinfo_sent;
61 bool invalid_password;
62 bool helper_queried;
63 } flags;
64 digest_nonce_h *nonce;
65
66private:
67 static HLPCB HandleReply;
68};
69
70} // namespace Digest
71} // namespace Auth
72
73#endif /* HAVE_AUTH_MODULE_DIGEST */
74#endif /* _SQUID_SRC_AUTH_DIGEST_USERREQUEST_H */
75
#define MEMPROXY_CLASS(CLASS)
int conn
the current server connection FD
Definition: Transport.cc:26
void AUTHCB(void *)
Definition: UserRequest.h:57
static void authenticate(int socket_fd, const char *username, const char *passwd)
void HLPCB(void *, const Helper::Reply &)
Definition: forward.h:33
HTTP Authentication.
Definition: Config.h:19
Direction
Definition: UserRequest.h:64

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors