authenticateCachedUsersList()
{
auto aucp_compare = [=](const Auth::User::Pointer lhs, const Auth::User::Pointer rhs) {
- return lhs->SBufUserKey() < rhs->SBufUserKey();
+ return lhs->userKey() < rhs->userKey();
};
std::vector<Auth::User::Pointer> v1, v2, rv, u1, u2;
if (Auth::Config::Find("basic") != nullptr)
void username(char const *); ///< set stored username and userKey
// NP: key is set at the same time as username_. Until then both are empty/NULL.
- const char *userKey() {return !userKey_.isEmpty() ? userKey_.c_str() : NULL;}
- // user key as a SBuf
- const SBuf SBufUserKey() const {return userKey_;}
+ const SBuf userKey() const {return userKey_;}
/**
* How long these credentials are still valid for.
void
UserNameCache::insert(Auth::User::Pointer anAuth_user)
{
- debugs(29, 6, "adding " << anAuth_user->SBufUserKey());
- store_[anAuth_user->SBufUserKey()] = anAuth_user;
+ debugs(29, 6, "adding " << anAuth_user->userKey());
+ store_[anAuth_user->userKey()] = anAuth_user;
}
// generates the list of cached usernames in a format that is convenient
/* now lookup and see if we have a matching auth_user structure in memory. */
Auth::User::Pointer auth_user;
- if (!(auth_user = Auth::Basic::User::Cache()->lookup(lb->SBufUserKey()))) {
+ if (!(auth_user = Auth::Basic::User::Cache()->lookup(lb->userKey()))) {
/* the user doesn't exist in the username cache yet */
/* save the credentials */
debugs(29, 9, HERE << "Creating new user '" << lb->username() << "'");
/* connection is authenticated */
debugs(29, 4, HERE << "authenticated user " << auth_user_request->user()->username());
auto local_auth_user = lm_request->user();
- auto cached_user = Auth::Negotiate::User::Cache()->lookup(auth_user_request->user()->SBufUserKey());
+ auto cached_user = Auth::Negotiate::User::Cache()->lookup(auth_user_request->user()->userKey());
if (!cached_user) {
local_auth_user->addToNameCache();
} else {
debugs(29, 4, HERE << "authenticated user " << auth_user_request->user()->username());
/* see if this is an existing user */
auto local_auth_user = lm_request->user();
- auto cached_user = Auth::Ntlm::User::Cache()->lookup(auth_user_request->user()->SBufUserKey());
+ auto cached_user = Auth::Ntlm::User::Cache()->lookup(auth_user_request->user()->userKey());
if (!cached_user) {
local_auth_user->addToNameCache();
} else {