]> git.ipfire.org Git - thirdparty/squid.git/blame - src/auth/ntlm/Scheme.cc
Source Format Enforcement (#532)
[thirdparty/squid.git] / src / auth / ntlm / Scheme.cc
CommitLineData
f5691f9c 1/*
77b1029d 2 * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
f5691f9c 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.
f5691f9c 7 */
8
f7f3304a 9#include "squid.h"
12daeef6 10#include "auth/ntlm/Config.h"
616cfc4c 11#include "auth/ntlm/Scheme.h"
582c2af2 12#include "Debug.h"
5817ee13 13#include "helper.h"
f5691f9c 14
c6cf8dee 15Auth::Scheme::Pointer Auth::Ntlm::Scheme::_instance = NULL;
d6374be6 16
c6cf8dee 17Auth::Scheme::Pointer
d6374be6 18Auth::Ntlm::Scheme::GetInstance()
f5691f9c 19{
5817ee13 20 if (_instance == NULL) {
d6374be6 21 _instance = new Auth::Ntlm::Scheme();
5817ee13
AJ
22 AddScheme(_instance);
23 }
24 return _instance;
f5691f9c 25}
26
27char const *
d6374be6 28Auth::Ntlm::Scheme::type() const
f5691f9c 29{
30 return "ntlm";
31}
32
5817ee13 33void
c6cf8dee 34Auth::Ntlm::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: NTLM authentication.");
5817ee13
AJ
41}
42
dc79fed8 43Auth::SchemeConfig *
d6374be6 44Auth::Ntlm::Scheme::createConfig()
5817ee13 45{
372fccd6 46 Auth::Ntlm::Config *ntlmCfg = new Auth::Ntlm::Config;
dc79fed8 47 return dynamic_cast<Auth::SchemeConfig*>(ntlmCfg);
5817ee13 48}
f53969cc 49