]> git.ipfire.org Git - thirdparty/squid.git/blob - src/auth/digest/User.h
Merged from trunk rev.14335
[thirdparty/squid.git] / src / auth / digest / User.h
1 /*
2 * Copyright (C) 1996-2015 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_AUTH_DIGEST_USER_H
10 #define _SQUID_AUTH_DIGEST_USER_H
11
12 #include "auth/digest/Config.h"
13 #include "auth/User.h"
14 #include "rfc2617.h"
15
16 namespace Auth
17 {
18 namespace Digest
19 {
20
21 /** User credentials for the Digest authentication protocol */
22 class User : public Auth::User
23 {
24 MEMPROXY_CLASS(Auth::Digest::User);
25
26 public:
27 User(Auth::Config *, const char *requestRealm);
28 virtual ~User();
29 int authenticated() const;
30 virtual int32_t ttl() const override;
31
32 /* Auth::User API */
33 static CbcPointer<Auth::CredentialsCache> Cache();
34 virtual void addToNameCache() override;
35
36 HASH HA1;
37 int HA1created;
38
39 /* what nonces have been allocated to this user */
40 dlink_list nonces;
41
42 digest_nonce_h * currentNonce();
43 };
44
45 } // namespace Digest
46 } // namespace Auth
47
48 #endif /* _SQUID_AUTH_DIGEST_USER_H */
49