]> git.ipfire.org Git - thirdparty/squid.git/blame - src/auth/ntlm/User.cc
Auth::User::userKey now returns SBuf
[thirdparty/squid.git] / src / auth / ntlm / User.cc
CommitLineData
bbc27441 1/*
bde978a6 2 * Copyright (C) 1996-2015 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
f7f3304a 9#include "squid.h"
aa110616
AJ
10#include "auth/Config.h"
11#include "auth/ntlm/User.h"
e1568a40 12#include "auth/UserNameCache.h"
aa110616
AJ
13#include "Debug.h"
14
d4806c91 15Auth::Ntlm::User::User(Auth::Config *aConfig, const char *aRequestRealm) :
f53969cc 16 Auth::User(aConfig, aRequestRealm)
aa110616 17{
aa110616
AJ
18}
19
20Auth::Ntlm::User::~User()
21{
22 debugs(29, 5, HERE << "doing nothing to clear NTLM scheme data for '" << this << "'");
23}
24
25int32_t
26Auth::Ntlm::User::ttl() const
27{
28 return -1; // NTLM credentials cannot be cached.
29}
f53969cc 30
e1568a40
FC
31CbcPointer<Auth::UserNameCache>
32Auth::Ntlm::User::Cache()
33{
46b1e6bf 34 static CbcPointer<Auth::UserNameCache> p(new Auth::UserNameCache("ntlm"));
e1568a40
FC
35 return p;
36}
283c905d
FC
37
38void
39Auth::Ntlm::User::addToNameCache()
40{
283c905d
FC
41 Cache()->insert(this);
42}