]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/auth/digest/User.h
Source Format Enforcement (#763)
[thirdparty/squid.git] / src / auth / digest / User.h
index 8d09ff302b5ab92f55573e9a3ccbf51ca87e3ce6..507677b21484a16256bec416625ebae25ff03a12 100644 (file)
@@ -1,7 +1,19 @@
+/*
+ * 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.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
+
 #ifndef _SQUID_AUTH_DIGEST_USER_H
 #define _SQUID_AUTH_DIGEST_USER_H
 
+#if HAVE_AUTH_MODULE_DIGEST
+
+#include "auth/digest/Config.h"
 #include "auth/User.h"
+#include "rfc2617.h"
 
 namespace Auth
 {
@@ -11,14 +23,17 @@ namespace Digest
 /** User credentials for the Digest authentication protocol */
 class User : public Auth::User
 {
-public:
     MEMPROXY_CLASS(Auth::Digest::User);
 
-    User(Auth::Config *, const char *requestRealm);
-    ~User();
+public:
+    User(Auth::SchemeConfig *, const char *requestRealm);
+    virtual ~User();
     int authenticated() const;
+    virtual int32_t ttl() const override;
 
-    virtual int32_t ttl() const;
+    /* Auth::User API */
+    static CbcPointer<Auth::CredentialsCache> Cache();
+    virtual void addToNameCache() override;
 
     HASH HA1;
     int HA1created;
@@ -29,9 +44,9 @@ public:
     digest_nonce_h * currentNonce();
 };
 
-MEMPROXY_CLASS_INLINE(Auth::Digest::User);
-
 } // namespace Digest
 } // namespace Auth
 
+#endif /* HAVE_AUTH_MODULE_DIGEST */
 #endif /* _SQUID_AUTH_DIGEST_USER_H */
+