]> git.ipfire.org Git - thirdparty/squid.git/blob - src/auth/negotiate/Scheme.cc
SourceFormat Enforcement
[thirdparty/squid.git] / src / auth / negotiate / Scheme.cc
1 /*
2 * Copyright (C) 1996-2015 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/negotiate/Config.h"
11 #include "auth/negotiate/Scheme.h"
12 #include "Debug.h"
13 #include "helper.h"
14
15 Auth::Scheme::Pointer Auth::Negotiate::Scheme::_instance = NULL;
16
17 Auth::Scheme::Pointer
18 Auth::Negotiate::Scheme::GetInstance()
19 {
20 if (_instance == NULL) {
21 _instance = new Auth::Negotiate::Scheme();
22 AddScheme(_instance);
23 }
24 return _instance;
25 }
26
27 char const *
28 Auth::Negotiate::Scheme::type() const
29 {
30 return "negotiate";
31 }
32
33 void
34 Auth::Negotiate::Scheme::shutdownCleanup()
35 {
36 if (_instance == NULL)
37 return;
38
39 _instance = NULL;
40 debugs(29, DBG_CRITICAL, "Shutdown: Negotiate authentication.");
41 }
42
43 Auth::Config *
44 Auth::Negotiate::Scheme::createConfig()
45 {
46 Auth::Negotiate::Config *negotiateCfg = new Auth::Negotiate::Config;
47 return dynamic_cast<Auth::Config*>(negotiateCfg);
48 }
49