+/*
+ * 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 "AccessLogEntry.h"
-#include "auth/ntlm/auth_ntlm.h"
+#include "auth/ntlm/Config.h"
#include "auth/ntlm/UserRequest.h"
#include "auth/State.h"
#include "cbdata.h"
#include "client_side.h"
+#include "fatal.h"
#include "format/Format.h"
#include "globals.h"
+#include "helper.h"
+#include "helper/Reply.h"
#include "HttpMsg.h"
#include "HttpRequest.h"
#include "MemBuf.h"
}
void
-Auth::Ntlm::UserRequest::module_start(HttpRequest *req, AccessLogEntry::Pointer &al, AUTHCB * handler, void *data)
+Auth::Ntlm::UserRequest::startHelperLookup(HttpRequest *, AccessLogEntry::Pointer &al, AUTHCB * handler, void *data)
{
static char buf[MAX_AUTHTOKEN_LEN];
void
Auth::Ntlm::UserRequest::authenticate(HttpRequest * aRequest, ConnStateData * conn, http_hdr_type type)
{
- assert(this);
-
/* Check that we are in the client side, where we can generate
* auth challenges */
}
void
-Auth::Ntlm::UserRequest::HandleReply(void *data, const HelperReply &reply)
+Auth::Ntlm::UserRequest::HandleReply(void *data, const Helper::Reply &reply)
{
Auth::StateData *r = static_cast<Auth::StateData *>(data);
assert(reply.whichServer == lm_request->authserver);
switch (reply.result) {
- case HelperReply::TT:
+ case Helper::TT:
/* we have been given a blob to send to the client */
safe_free(lm_request->server_blob);
lm_request->request->flags.mustKeepalive = true;
}
break;
- case HelperReply::Okay: {
+ case Helper::Okay: {
/* we're finished, release the helper */
const char *userLabel = reply.notes.findFirst("user");
if (!userLabel) {
}
break;
- case HelperReply::Error: {
+ case Helper::Error: {
/* authentication failure (wrong password, etc.) */
const char *errNote = reply.notes.find("message");
if (errNote != NULL)
}
break;
- case HelperReply::Unknown:
+ case Helper::Unknown:
debugs(29, DBG_IMPORTANT, "ERROR: NTLM Authentication Helper '" << reply.whichServer << "' crashed!.");
- /* continue to the next case */
+ /* continue to the next case */
- case HelperReply::BrokenHelper: {
+ case Helper::TimedOut:
+ case Helper::BrokenHelper: {
/* TODO kick off a refresh process. This can occur after a YR or after
* a KK. If after a YR release the helper and resubmit the request via
* Authenticate NTLM start.
* If after a KK deny the user's request w/ 407 and mark the helper as
* Needing YR. */
const char *errNote = reply.notes.find("message");
- if (reply.result == HelperReply::Unknown)
+ if (reply.result == Helper::Unknown)
auth_user_request->denyMessage("Internal Error");
else if (errNote != NULL)
auth_user_request->denyMessage(errNote);
r->handler(r->data);
delete r;
}
+