]> git.ipfire.org Git - thirdparty/squid.git/blob - src/auth/basic/User.h
Docs: Copyright updates for 2018 (#114)
[thirdparty/squid.git] / src / auth / basic / User.h
1 /*
2 * Copyright (C) 1996-2018 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_BASIC_USER_H
10 #define _SQUID_AUTH_BASIC_USER_H
11
12 #if HAVE_AUTH_MODULE_BASIC
13
14 #include "auth/User.h"
15 #include "auth/UserRequest.h"
16
17 namespace Auth
18 {
19
20 class SchemeConfig;
21 class QueueNode;
22
23 namespace Basic
24 {
25
26 /** User credentials for the Basic authentication protocol */
27 class User : public Auth::User
28 {
29 MEMPROXY_CLASS(Auth::Basic::User);
30
31 public:
32 User(Auth::SchemeConfig *, const char *requestRealm);
33 virtual ~User();
34 bool authenticated() const;
35 bool valid() const;
36
37 /** Update the cached password for a username. */
38 void updateCached(User *from);
39 virtual int32_t ttl() const override;
40
41 /* Auth::User API */
42 static CbcPointer<Auth::CredentialsCache> Cache();
43 virtual void addToNameCache() override;
44
45 char *passwd;
46
47 QueueNode *queue;
48
49 private:
50 Auth::UserRequest::Pointer currentRequest;
51 };
52
53 } // namespace Basic
54 } // namespace Auth
55
56 #endif /* HAVE_AUTH_MODULE_BASIC */
57 #endif /* _SQUID_AUTH_BASIC_USER_H */
58