]> git.ipfire.org Git - thirdparty/squid.git/blob - src/auth/negotiate/User.cc
677a92223c0543258abf1037dd2ce9cb6f7c8ecd
[thirdparty/squid.git] / src / auth / negotiate / User.cc
1 /*
2 * Copyright (C) 1996-2019 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 #include "squid.h"
10 #include "auth/CredentialsCache.h"
11 #include "auth/negotiate/User.h"
12 #include "auth/SchemeConfig.h"
13 #include "Debug.h"
14
15 Auth::Negotiate::User::User(Auth::SchemeConfig *aConfig, const char *aRequestRealm) :
16 Auth::User(aConfig, aRequestRealm)
17 {
18 }
19
20 Auth::Negotiate::User::~User()
21 {
22 debugs(29, 5, HERE << "doing nothing to clear Negotiate scheme data for '" << this << "'");
23 }
24
25 int32_t
26 Auth::Negotiate::User::ttl() const
27 {
28 return -1; // Negotiate cannot be cached.
29 }
30
31 CbcPointer<Auth::CredentialsCache>
32 Auth::Negotiate::User::Cache()
33 {
34 static CbcPointer<Auth::CredentialsCache> p(new Auth::CredentialsCache("negotiate", "GC Negotiate user credentials"));
35 return p;
36 }
37
38 void
39 Auth::Negotiate::User::addToNameCache()
40 {
41 Cache()->insert(userKey(), this);
42 }
43