2 * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
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.
9 #ifndef SQUID_SRC_AUTH_QUEUENODE_H
10 #define SQUID_SRC_AUTH_QUEUENODE_H
12 #include "auth/forward.h"
19 * A queue of auth requests waiting for verification to occur.
21 * Certain authentication schemes such a Basic and Bearer auth
22 * permit credentials tokens to be repeated from multiple sources
23 * simultaneously. This queue node allows multiple validation
24 * queries to be collapsed into one backend helper lookup.
25 * CBDATA and handlers stored in these queue nodes can be notified
26 * all at once with a result when the lookup completes.
30 MEMPROXY_CLASS(Auth::QueueNode
);
33 // we store CBDATA here, copy is not safe
34 QueueNode(const QueueNode
&);
35 QueueNode
&operator =(const QueueNode
&);
38 QueueNode(Auth::UserRequest
*aRequest
, AUTHCB
*aHandler
, void *aData
) :
40 auth_user_request(aRequest
),
42 data(cbdataReference(aData
)) {}
44 cbdataReferenceDone(data
);
46 QueueNode
*tmp
= next
->next
;
53 Auth::QueueNode
*next
;
54 Auth::UserRequest::Pointer auth_user_request
;
61 #endif /* SQUID_SRC_AUTH_QUEUENODE_H */