]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/auth/basic/User.h
Source Format Enforcement (#763)
[thirdparty/squid.git] / src / auth / basic / User.h
index 9e424fc06c6d82f1f9617dd6f5548577672ff208..85c5a7681c21180a177956c3e86039ee8378d602 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1996-2014 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.
@@ -9,13 +9,15 @@
 #ifndef _SQUID_AUTH_BASIC_USER_H
 #define _SQUID_AUTH_BASIC_USER_H
 
+#if HAVE_AUTH_MODULE_BASIC
+
 #include "auth/User.h"
 #include "auth/UserRequest.h"
 
 namespace Auth
 {
 
-class Config;
+class SchemeConfig;
 class QueueNode;
 
 namespace Basic
@@ -27,14 +29,18 @@ class User : public Auth::User
     MEMPROXY_CLASS(Auth::Basic::User);
 
 public:
-    User(Auth::Config *, const char *requestRealm);
-    ~User();
+    User(Auth::SchemeConfig *, const char *requestRealm);
+    virtual ~User();
     bool authenticated() const;
     bool valid() const;
 
     /** Update the cached password for a username. */
     void updateCached(User *from);
-    virtual int32_t ttl() const;
+    virtual int32_t ttl() const override;
+
+    /* Auth::User API */
+    static CbcPointer<Auth::CredentialsCache> Cache();
+    virtual void addToNameCache() override;
 
     char *passwd;
 
@@ -47,5 +53,6 @@ private:
 } // namespace Basic
 } // namespace Auth
 
+#endif /* HAVE_AUTH_MODULE_BASIC */
 #endif /* _SQUID_AUTH_BASIC_USER_H */