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/ntlm/Config.h"
11 #include "auth/ntlm/Scheme.h"
12 #include "base/RunnersRegistry.h"
13 #include "debug/Messages.h"
14 #include "debug/Stream.h"
15 #include "helper.h"
16 
18 {
19 public:
20  /* RegisteredRunner API */
21  void bootstrapConfig() override {
22  const char *type = Auth::Ntlm::Scheme::GetInstance()->type();
23  debugs(29, 2, "Initialized Authentication Scheme '" << type << "'");
24  }
25 };
26 
28 
30 Auth::Ntlm::Scheme::GetInstance()
31 {
32  static Auth::Scheme::Pointer _instance;
33 
34  if (!_instance) {
35  _instance = new Auth::Ntlm::Scheme();
36  AddScheme(_instance);
37  }
38  return _instance;
39 }
40 
41 char const *
42 Auth::Ntlm::Scheme::type() const
43 {
44  return "ntlm";
45 }
46 
47 void
48 Auth::Ntlm::Scheme::shutdownCleanup()
49 {
50  // TODO: destruct any active Ntlm::Config objects via runner
51  debugs(29, 2, "Shutdown: NTLM authentication.");
52 }
53 
55 Auth::Ntlm::Scheme::createConfig()
56 {
58  return dynamic_cast<Auth::SchemeConfig*>(ntlmCfg);
59 }
60 
void bootstrapConfig() override
Definition: Scheme.cc:21
DefineRunnerRegistrator(NtlmAuthRr)
#define debugs(SECTION, LEVEL, CONTENT)
Definition: Stream.h:192
class SquidConfig Config
Definition: SquidConfig.cc:12

 

Introduction

Documentation

Support

Miscellaneous