]>
Commit | Line | Data |
---|---|---|
bbc27441 | 1 | /* |
b8ae064d | 2 | * Copyright (C) 1996-2023 The Squid Software Foundation and contributors |
bbc27441 AJ |
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 | ||
ba42bf21 FC |
9 | #ifndef SQUID_SRC_AUTH_STATE_H |
10 | #define SQUID_SRC_AUTH_STATE_H | |
928f3421 | 11 | |
2f1431ea AJ |
12 | #if USE_AUTH |
13 | ||
928f3421 | 14 | #include "auth/UserRequest.h" |
1c756645 AJ |
15 | #include "cbdata.h" |
16 | ||
17 | namespace Auth | |
18 | { | |
928f3421 | 19 | |
928f3421 AJ |
20 | /** |
21 | * CBDATA state for NTLM, Negotiate, and Digest stateful authentication. | |
22 | */ | |
a9336c23 A |
23 | class StateData |
24 | { | |
5c2f68b7 AJ |
25 | CBDATA_CLASS(StateData); |
26 | ||
1c756645 | 27 | public: |
4c535e87 | 28 | StateData(const UserRequest::Pointer &r, AUTHCB *h, void *d) : |
f53969cc SM |
29 | data(cbdataReference(d)), |
30 | auth_user_request(r), | |
31 | handler(h) {} | |
1c756645 AJ |
32 | |
33 | ~StateData() { | |
aee3523a | 34 | auth_user_request = nullptr; |
1c756645 AJ |
35 | cbdataReferenceDone(data); |
36 | } | |
37 | ||
928f3421 | 38 | void *data; |
c7baff40 | 39 | UserRequest::Pointer auth_user_request; |
4c535e87 | 40 | AUTHCB *handler; |
1c756645 | 41 | }; |
928f3421 | 42 | |
1c756645 | 43 | } // namespace Auth |
928f3421 | 44 | |
2f1431ea | 45 | #endif /* USE_AUTH */ |
ba42bf21 | 46 | #endif /* SQUID_SRC_AUTH_STATE_H */ |
f53969cc | 47 |