]>
Commit | Line | Data |
---|---|---|
f5691f9c | 1 | /* |
bbc27441 | 2 | * Copyright (C) 1996-2014 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" |
5817ee13 | 10 | #include "auth/ntlm/auth_ntlm.h" |
616cfc4c | 11 | #include "auth/ntlm/Scheme.h" |
582c2af2 | 12 | #include "Debug.h" |
5817ee13 | 13 | #include "helper.h" |
f5691f9c | 14 | |
c6cf8dee | 15 | Auth::Scheme::Pointer Auth::Ntlm::Scheme::_instance = NULL; |
d6374be6 | 16 | |
c6cf8dee | 17 | Auth::Scheme::Pointer |
d6374be6 | 18 | Auth::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 | ||
27 | char const * | |
d6374be6 | 28 | Auth::Ntlm::Scheme::type() const |
f5691f9c | 29 | { |
30 | return "ntlm"; | |
31 | } | |
32 | ||
5817ee13 | 33 | void |
c6cf8dee | 34 | Auth::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 | ||
9f3d2b2e | 43 | Auth::Config * |
d6374be6 | 44 | Auth::Ntlm::Scheme::createConfig() |
5817ee13 | 45 | { |
372fccd6 | 46 | Auth::Ntlm::Config *ntlmCfg = new Auth::Ntlm::Config; |
9f3d2b2e | 47 | return dynamic_cast<Auth::Config*>(ntlmCfg); |
5817ee13 | 48 | } |