]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/auth/basic/UserRequest.cc
SourceFormat Enforcement
[thirdparty/squid.git] / src / auth / basic / UserRequest.cc
index aaebbd5de2f8edca841e547c5611e0056fd3f1c6..af87012806fbb50f19c32ddb5b6f111f3f40981d 100644 (file)
@@ -1,5 +1,13 @@
+/*
+ * Copyright (C) 1996-2015 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/basic/auth_basic.h"
+#include "auth/basic/Config.h"
 #include "auth/basic/User.h"
 #include "auth/basic/UserRequest.h"
 #include "auth/QueueNode.h"
@@ -7,7 +15,8 @@
 #include "charset.h"
 #include "Debug.h"
 #include "format/Format.h"
-#include "HelperReply.h"
+#include "helper.h"
+#include "helper/Reply.h"
 #include "HttpMsg.h"
 #include "HttpRequest.h"
 #include "MemBuf.h"
@@ -41,7 +50,7 @@ Auth::Basic::UserRequest::credentialsStr()
 /* log a basic user in
  */
 void
-Auth::Basic::UserRequest::authenticate(HttpRequest * request, ConnStateData * conn, http_hdr_type type)
+Auth::Basic::UserRequest::authenticate(HttpRequest *, ConnStateData *, http_hdr_type)
 {
     assert(user() != NULL);
 
@@ -61,8 +70,6 @@ Auth::Basic::UserRequest::authenticate(HttpRequest * request, ConnStateData * co
     /* Decode now takes care of finding the AuthUser struct in the cache */
     /* after external auth occurs anyway */
     user()->expiretime = current_time.tv_sec;
-
-    return;
 }
 
 Auth::Direction
@@ -93,7 +100,7 @@ Auth::Basic::UserRequest::module_direction()
 
 /* send the initial data to a basic authenticator module */
 void
-Auth::Basic::UserRequest::module_start(HttpRequest *request, AccessLogEntry::Pointer &al, AUTHCB * handler, void *data)
+Auth::Basic::UserRequest::startHelperLookup(HttpRequest *request, AccessLogEntry::Pointer &al, AUTHCB * handler, void *data)
 {
     assert(user()->auth_type == Auth::AUTH_BASIC);
     Auth::Basic::User *basic_auth = dynamic_cast<Auth::Basic::User *>(user().getRaw());
@@ -151,7 +158,7 @@ Auth::Basic::UserRequest::module_start(HttpRequest *request, AccessLogEntry::Poi
 }
 
 void
-Auth::Basic::UserRequest::HandleReply(void *data, const HelperReply &reply)
+Auth::Basic::UserRequest::HandleReply(void *data, const Helper::Reply &reply)
 {
     Auth::StateData *r = static_cast<Auth::StateData *>(data);
     void *cbdata;
@@ -170,7 +177,7 @@ Auth::Basic::UserRequest::HandleReply(void *data, const HelperReply &reply)
 
     assert(basic_auth != NULL);
 
-    if (reply.result == HelperReply::Okay)
+    if (reply.result == Helper::Okay)
         basic_auth->credentials(Auth::Ok);
     else {
         basic_auth->credentials(Auth::Failed);
@@ -199,3 +206,4 @@ Auth::Basic::UserRequest::HandleReply(void *data, const HelperReply &reply)
 
     delete r;
 }
+