/*
- * Copyright (C) 1996-2016 The Squid Software Foundation and contributors
+ * 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.
#include "Store.h"
#include "wordlist.h"
-/**
- \defgroup AuthNegotiateInternal Negotiate Authenticator Internals
- \ingroup AuthNegotiateAPI
- */
-
-/* Negotiate Scheme */
static AUTHSSTATS authenticateNegotiateStats;
-/// \ingroup AuthNegotiateInternal
statefulhelper *negotiateauthenticators = NULL;
-/// \ingroup AuthNegotiateInternal
static int authnegotiate_initialised = 0;
-/// \ingroup AuthNegotiateInternal
static hash_table *proxy_auth_cache = NULL;
void
void
Auth::Negotiate::Config::done()
{
- Auth::Config::done();
+ Auth::SchemeConfig::done();
authnegotiate_initialised = 0;
debugs(29, DBG_IMPORTANT, "Reconfigure: Negotiate authentication configuration cleared.");
}
-bool
-Auth::Negotiate::Config::dump(StoreEntry * entry, const char *name, Auth::Config * scheme) const
-{
- if (!Auth::Config::dump(entry, name, scheme))
- return false;
-
- storeAppendPrintf(entry, "%s negotiate keep_alive %s\n", name, keep_alive ? "on" : "off");
- return true;
-}
-
-Auth::Negotiate::Config::Config() : keep_alive(1)
-{ }
-
-void
-Auth::Negotiate::Config::parse(Auth::Config * scheme, int n_configured, char *param_str)
-{
- if (strcmp(param_str, "program") == 0) {
- if (authenticateProgram)
- wordlistDestroy(&authenticateProgram);
-
- parse_wordlist(&authenticateProgram);
-
- requirePathnameExists("auth_param negotiate program", authenticateProgram->key);
- } else if (strcmp(param_str, "keep_alive") == 0) {
- parse_onoff(&keep_alive);
- } else
- Auth::Config::parse(scheme, n_configured, param_str);
-}
-
const char *
Auth::Negotiate::Config::type() const
{
* Called AFTER parsing the config file
*/
void
-Auth::Negotiate::Config::init(Auth::Config *)
+Auth::Negotiate::Config::init(Auth::SchemeConfig *)
{
if (authenticateProgram) {
return false;
}
-/* Negotiate Scheme */
-
void
Auth::Negotiate::Config::fixHeader(Auth::UserRequest::Pointer auth_user_request, HttpReply *rep, Http::HdrType reqType, HttpRequest * request)
{
Auth::UserRequest::Pointer
Auth::Negotiate::Config::decode(char const *proxy_auth, const char *aRequestRealm)
{
- Auth::Negotiate::User *newUser = new Auth::Negotiate::User(Auth::Config::Find("negotiate"), aRequestRealm);
+ Auth::Negotiate::User *newUser = new Auth::Negotiate::User(Auth::SchemeConfig::Find("negotiate"), aRequestRealm);
Auth::UserRequest *auth_user_request = new Auth::Negotiate::UserRequest();
assert(auth_user_request->user() == NULL);