]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/auth/basic/User.h
Docs: Copyright updates for 2018 (#114)
[thirdparty/squid.git] / src / auth / basic / User.h
index 82c6242724c7b43da0ab3aa10e7d737bbbbae966..6bc2867b42fb3f0d45ff0c9e6874d4f55a323a42 100644 (file)
@@ -1,15 +1,24 @@
+/*
+ * 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.
+ */
+
 #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"
 
-class BasicAuthQueueNode;
-
 namespace Auth
 {
 
-class Config;
+class SchemeConfig;
+class QueueNode;
 
 namespace Basic
 {
@@ -17,32 +26,33 @@ namespace Basic
 /** User credentials for the Basic authentication protocol */
 class User : public Auth::User
 {
-public:
     MEMPROXY_CLASS(Auth::Basic::User);
 
-    User(Auth::Config *);
-    ~User();
+public:
+    User(Auth::SchemeConfig *, const char *requestRealm);
+    virtual ~User();
     bool authenticated() const;
-    void queueRequest(AuthUserRequest::Pointer auth_user_request, RH * handler, void *data);
-    void submitRequest(AuthUserRequest::Pointer auth_user_request, RH * handler, void *data);
-
     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;
 
-    BasicAuthQueueNode *auth_queue;
+    QueueNode *queue;
 
 private:
-    AuthUserRequest::Pointer currentRequest;
+    Auth::UserRequest::Pointer currentRequest;
 };
 
-MEMPROXY_CLASS_INLINE(Auth::Basic::User);
-
 } // namespace Basic
 } // namespace Auth
 
+#endif /* HAVE_AUTH_MODULE_BASIC */
 #endif /* _SQUID_AUTH_BASIC_USER_H */
+