]> git.ipfire.org Git - thirdparty/squid.git/blame - src/auth/basic/Scheme.cc
Bug 5428: Warn if pkg-config is not found (#1902)
[thirdparty/squid.git] / src / auth / basic / Scheme.cc
CommitLineData
f5691f9c 1/*
b8ae064d 2 * Copyright (C) 1996-2023 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/basic/Config.h"
616cfc4c 11#include "auth/basic/Scheme.h"
675b8408
AR
12#include "debug/Messages.h"
13#include "debug/Stream.h"
5817ee13
AJ
14#include "helper.h"
15
aee3523a 16Auth::Scheme::Pointer Auth::Basic::Scheme::_instance = nullptr;
f5691f9c 17
c6cf8dee 18Auth::Scheme::Pointer
d6374be6 19Auth::Basic::Scheme::GetInstance()
f5691f9c 20{
aee3523a 21 if (_instance == nullptr) {
d6374be6 22 _instance = new Auth::Basic::Scheme();
5817ee13
AJ
23 AddScheme(_instance);
24 }
25 return _instance;
f5691f9c 26}
27
28char const *
c6cf8dee 29Auth::Basic::Scheme::type() const
f5691f9c 30{
31 return "basic";
32}
33
5817ee13 34void
c6cf8dee 35Auth::Basic::Scheme::shutdownCleanup()
5817ee13 36{
aee3523a 37 if (_instance == nullptr)
d6374be6 38 return;
5817ee13 39
aee3523a 40 _instance = nullptr;
c59baaa8 41 debugs(29, Critical(12), "Shutdown: Basic authentication.");
5817ee13
AJ
42}
43
dc79fed8 44Auth::SchemeConfig *
d6374be6 45Auth::Basic::Scheme::createConfig()
5817ee13 46{
372fccd6 47 Auth::Basic::Config *newCfg = new Auth::Basic::Config;
dc79fed8 48 return dynamic_cast<Auth::SchemeConfig*>(newCfg);
5817ee13 49}
f53969cc 50