17 Auth::User(aConfig, aRequestRealm),
20 currentRequest(nullptr)
23Auth::Basic::User::~User()
29Auth::Basic::User::ttl()
const
34 int32_t basic_ttl = expiretime -
squid_curtime +
static_cast<Auth::Basic::Config*
>(config)->credentialsTTL;
37 return min(basic_ttl, global_ttl);
41Auth::Basic::User::authenticated()
const
43 if ((credentials() ==
Auth::Ok) && (expiretime +
static_cast<Auth::Basic::Config*
>(config)->credentialsTTL >
squid_curtime))
46 debugs(29, 4,
"User not authenticated or credentials need rechecking.");
52Auth::Basic::User::valid()
const
54 if (username() ==
nullptr)
56 if (passwd ==
nullptr)
62Auth::Basic::User::updateCached(Auth::Basic::User *from)
64 debugs(29, 9,
"Found user '" << from->username() <<
"' already in the user cache as '" <<
this <<
"'");
66 assert(strcmp(from->username(), username()) == 0);
68 if (strcmp(from->passwd, passwd)) {
69 debugs(29, 4,
"new password found. Updating in user master record and resetting auth state to unchecked");
72 passwd = from->passwd;
73 from->passwd =
nullptr;
77 debugs(29, 4,
"last attempt to authenticate this user failed, resetting auth state to unchecked");
83Auth::Basic::User::Cache()
90Auth::Basic::User::addToNameCache()
92 Cache()->insert(userKey(),
this);
time_t credentialsTtl
the authenticate_ttl
Cache of Auth::User credentials, keyed by Auth::User::userKey.
A const & min(A const &lhs, A const &rhs)
#define debugs(SECTION, LEVEL, CONTENT)