]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Converted Basic auth to UserNameCache lookup
authorFrancesco Chemolli <kinkie@squid-cache.org>
Thu, 3 Sep 2015 16:56:10 +0000 (18:56 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Thu, 3 Sep 2015 16:56:10 +0000 (18:56 +0200)
src/auth/basic/Config.cc

index abbf0b76513ad6ce532ca46dc3a1d0bb89d48685..c409417f54e5b28bc386f18c71e1af8a09f85d37 100644 (file)
@@ -19,6 +19,7 @@
 #include "auth/basic/UserRequest.h"
 #include "auth/Gadgets.h"
 #include "auth/State.h"
+#include "auth/UserNameCache.h"
 #include "cache_cf.h"
 #include "charset.h"
 #include "helper.h"
@@ -246,7 +247,7 @@ Auth::Basic::Config::decode(char const *proxy_auth, const char *aRequestRealm)
     /* now lookup and see if we have a matching auth_user structure in memory. */
     Auth::User::Pointer auth_user;
 
-    if ((auth_user = findUserInCache(lb->userKey(), Auth::AUTH_BASIC)) == NULL) {
+    if (!(auth_user = Auth::Basic::User::Cache()->lookup(lb->SBUserKey()))) {
         /* the user doesn't exist in the username cache yet */
         /* save the credentials */
         debugs(29, 9, HERE << "Creating new user '" << lb->username() << "'");