]>
Commit | Line | Data |
---|---|---|
bbc27441 | 1 | /* |
ef57eb7b | 2 | * Copyright (C) 1996-2016 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_BASIC_USER_H |
10 | #define _SQUID_AUTH_BASIC_USER_H | |
11 | ||
a0026a6c AJ |
12 | #if HAVE_AUTH_MODULE_BASIC |
13 | ||
aa110616 AJ |
14 | #include "auth/User.h" |
15 | #include "auth/UserRequest.h" | |
16 | ||
aa110616 AJ |
17 | namespace Auth |
18 | { | |
19 | ||
20 | class Config; | |
bf929433 | 21 | class QueueNode; |
aa110616 AJ |
22 | |
23 | namespace Basic | |
24 | { | |
25 | ||
26 | /** User credentials for the Basic authentication protocol */ | |
27 | class User : public Auth::User | |
28 | { | |
aa110616 AJ |
29 | MEMPROXY_CLASS(Auth::Basic::User); |
30 | ||
741c2986 | 31 | public: |
d4806c91 | 32 | User(Auth::Config *, const char *requestRealm); |
39bfd3eb | 33 | virtual ~User(); |
aa110616 | 34 | bool authenticated() const; |
aa110616 | 35 | bool valid() const; |
de76457e | 36 | |
aa110616 AJ |
37 | /** Update the cached password for a username. */ |
38 | void updateCached(User *from); | |
6c6d9beb | 39 | virtual int32_t ttl() const override; |
aa110616 | 40 | |
46b1e6bf | 41 | /* Auth::User API */ |
638cfbc4 | 42 | static CbcPointer<Auth::CredentialsCache> Cache(); |
283c905d | 43 | virtual void addToNameCache() override; |
e1568a40 | 44 | |
aa110616 AJ |
45 | char *passwd; |
46 | ||
bf929433 | 47 | QueueNode *queue; |
aa110616 AJ |
48 | |
49 | private: | |
c7baff40 | 50 | Auth::UserRequest::Pointer currentRequest; |
aa110616 AJ |
51 | }; |
52 | ||
aa110616 AJ |
53 | } // namespace Basic |
54 | } // namespace Auth | |
55 | ||
a0026a6c | 56 | #endif /* HAVE_AUTH_MODULE_BASIC */ |
aa110616 | 57 | #endif /* _SQUID_AUTH_BASIC_USER_H */ |
f53969cc | 58 |