]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/auth/negotiate/User.cc
Docs: Copyright updates for 2018 (#114)
[thirdparty/squid.git] / src / auth / negotiate / User.cc
index 729fa645c5be22999ca983380bb2dad095f8a43c..d8d43dbbbe86323ec169d9fccc416dc933a33783 100644 (file)
@@ -1,12 +1,20 @@
-#include "config.h"
-#include "auth/Config.h"
+/*
+ * Copyright (C) 1996-2018 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
+
+#include "squid.h"
+#include "auth/CredentialsCache.h"
 #include "auth/negotiate/User.h"
+#include "auth/SchemeConfig.h"
 #include "Debug.h"
 
-Auth::Negotiate::User::User(Auth::Config *aConfig) :
-        Auth::User(aConfig)
+Auth::Negotiate::User::User(Auth::SchemeConfig *aConfig, const char *aRequestRealm) :
+    Auth::User(aConfig, aRequestRealm)
 {
-    proxy_auth_list.head = proxy_auth_list.tail = NULL;
 }
 
 Auth::Negotiate::User::~User()
@@ -19,3 +27,17 @@ Auth::Negotiate::User::ttl() const
 {
     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);
+}
+