]> git.ipfire.org Git - thirdparty/squid.git/blame - src/auth/negotiate/Scheme.cc
Source Format Enforcement (#532)
[thirdparty/squid.git] / src / auth / negotiate / Scheme.cc
CommitLineData
6bf4f823 1/*
77b1029d 2 * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
6bf4f823 3 *
bbc27441
AJ
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
6bf4f823 7 */
8
f7f3304a 9#include "squid.h"
12daeef6 10#include "auth/negotiate/Config.h"
616cfc4c 11#include "auth/negotiate/Scheme.h"
582c2af2 12#include "Debug.h"
5817ee13 13#include "helper.h"
6bf4f823 14
c6cf8dee 15Auth::Scheme::Pointer Auth::Negotiate::Scheme::_instance = NULL;
d6374be6 16
c6cf8dee 17Auth::Scheme::Pointer
d6374be6 18Auth::Negotiate::Scheme::GetInstance()
6bf4f823 19{
5817ee13 20 if (_instance == NULL) {
d6374be6 21 _instance = new Auth::Negotiate::Scheme();
5817ee13
AJ
22 AddScheme(_instance);
23 }
24 return _instance;
6bf4f823 25}
26
27char const *
d6374be6 28Auth::Negotiate::Scheme::type() const
6bf4f823 29{
30 return "negotiate";
31}
32
5817ee13 33void
c6cf8dee 34Auth::Negotiate::Scheme::shutdownCleanup()
5817ee13 35{
d6374be6
AJ
36 if (_instance == NULL)
37 return;
5817ee13 38
d6374be6
AJ
39 _instance = NULL;
40 debugs(29, DBG_CRITICAL, "Shutdown: Negotiate authentication.");
5817ee13
AJ
41}
42
dc79fed8 43Auth::SchemeConfig *
d6374be6 44Auth::Negotiate::Scheme::createConfig()
5817ee13 45{
372fccd6 46 Auth::Negotiate::Config *negotiateCfg = new Auth::Negotiate::Config;
dc79fed8 47 return dynamic_cast<Auth::SchemeConfig*>(negotiateCfg);
5817ee13 48}
f53969cc 49