Scheme.cc
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
3 *
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.
7 */
8
9#include "squid.h"
10#include "auth/basic/Config.h"
11#include "auth/basic/Scheme.h"
12#include "debug/Messages.h"
13#include "debug/Stream.h"
14#include "helper.h"
15
16Auth::Scheme::Pointer Auth::Basic::Scheme::_instance = nullptr;
17
19Auth::Basic::Scheme::GetInstance()
20{
21 if (_instance == nullptr) {
22 _instance = new Auth::Basic::Scheme();
23 AddScheme(_instance);
24 }
25 return _instance;
26}
27
28char const *
29Auth::Basic::Scheme::type() const
30{
31 return "basic";
32}
33
34void
35Auth::Basic::Scheme::shutdownCleanup()
36{
37 if (_instance == nullptr)
38 return;
39
40 _instance = nullptr;
41 debugs(29, Critical(12), "Shutdown: Basic authentication.");
42}
43
45Auth::Basic::Scheme::createConfig()
46{
48 return dynamic_cast<Auth::SchemeConfig*>(newCfg);
49}
50
class SquidConfig Config
Definition: SquidConfig.cc:12
#define Critical(id)
Definition: Messages.h:92
#define debugs(SECTION, LEVEL, CONTENT)
Definition: Stream.h:194

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors