/*
- * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
*/
#include "squid.h"
-#include "auth/Config.h"
+#include "auth/CredentialsCache.h"
#include "auth/negotiate/User.h"
+#include "auth/SchemeConfig.h"
#include "Debug.h"
-Auth::Negotiate::User::User(Auth::Config *aConfig, const char *aRequestRealm) :
+Auth::Negotiate::User::User(Auth::SchemeConfig *aConfig, const char *aRequestRealm) :
Auth::User(aConfig, aRequestRealm)
{
}
return -1; // Negotiate cannot be cached.
}
+CbcPointer<Auth::CredentialsCache>
+Auth::Negotiate::User::Cache()
+{
+ static CbcPointer<Auth::CredentialsCache> p(new Auth::CredentialsCache("negotiate", "GC Negotiate user credentials"));
+ return p;
+}
+
+void
+Auth::Negotiate::User::addToNameCache()
+{
+ Cache()->insert(userKey(), this);
+}
+