]>
Commit | Line | Data |
---|---|---|
bbc27441 | 1 | /* |
4ac4a490 | 2 | * Copyright (C) 1996-2017 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 | ||
aa110616 AJ |
9 | #ifndef _SQUID_AUTH_DIGEST_USER_H |
10 | #define _SQUID_AUTH_DIGEST_USER_H | |
11 | ||
a0026a6c AJ |
12 | #if HAVE_AUTH_MODULE_DIGEST |
13 | ||
6ed36c20 | 14 | #include "auth/digest/Config.h" |
aa110616 | 15 | #include "auth/User.h" |
6ed36c20 | 16 | #include "rfc2617.h" |
aa110616 AJ |
17 | |
18 | namespace Auth | |
de76457e | 19 | { |
aa110616 AJ |
20 | namespace Digest |
21 | { | |
22 | ||
23 | /** User credentials for the Digest authentication protocol */ | |
24 | class User : public Auth::User | |
25 | { | |
aa110616 AJ |
26 | MEMPROXY_CLASS(Auth::Digest::User); |
27 | ||
741c2986 | 28 | public: |
dc79fed8 | 29 | User(Auth::SchemeConfig *, const char *requestRealm); |
39bfd3eb | 30 | virtual ~User(); |
aa110616 | 31 | int authenticated() const; |
6c6d9beb | 32 | virtual int32_t ttl() const override; |
aa110616 | 33 | |
46b1e6bf | 34 | /* Auth::User API */ |
638cfbc4 | 35 | static CbcPointer<Auth::CredentialsCache> Cache(); |
283c905d | 36 | virtual void addToNameCache() override; |
e1568a40 | 37 | |
aa110616 AJ |
38 | HASH HA1; |
39 | int HA1created; | |
40 | ||
41 | /* what nonces have been allocated to this user */ | |
42 | dlink_list nonces; | |
572d2e31 HN |
43 | |
44 | digest_nonce_h * currentNonce(); | |
aa110616 | 45 | }; |
de76457e | 46 | |
aa110616 AJ |
47 | } // namespace Digest |
48 | } // namespace Auth | |
49 | ||
a0026a6c | 50 | #endif /* HAVE_AUTH_MODULE_DIGEST */ |
aa110616 | 51 | #endif /* _SQUID_AUTH_DIGEST_USER_H */ |
f53969cc | 52 |