Scheme.h
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#ifndef SQUID_AUTH_SCHEME_H
10#define SQUID_AUTH_SCHEME_H
11
12#if USE_AUTH
13
14#include "auth/forward.h"
15#include "base/RefCount.h"
16
17namespace Auth
18{
19
27class Scheme : public RefCountable
28{
29public:
31 typedef std::vector<Scheme::Pointer>::iterator iterator;
32 typedef std::vector<Scheme::Pointer>::const_iterator const_iterator;
33
34public:
35 Scheme() : initialised (false) {};
36 ~Scheme() override {};
37
38 static void AddScheme(Scheme::Pointer);
39
48 static void FreeAll();
49
53 static Scheme::Pointer Find(const char *);
54
55 /* per scheme methods */
56 virtual char const *type() const = 0;
57 virtual void shutdownCleanup() = 0;
59
60 // Not implemented
61 Scheme(Scheme const &);
63
64 static std::vector<Scheme::Pointer> &GetSchemes();
65
66protected:
68
69private:
70 static std::vector<Scheme::Pointer> *_Schemes;
71};
72
73} // namespace Auth
74
75#endif /* USE_AUTH */
76#endif /* SQUID_AUTH_SCHEME_H */
77
#define RefCountable
The locking interface for use on Reference-Counted classes.
Definition: Lock.h:66
static void FreeAll()
Definition: Scheme.cc:60
bool initialised
Definition: Scheme.h:67
Scheme(Scheme const &)
virtual Auth::SchemeConfig * createConfig()=0
RefCount< Scheme > Pointer
Definition: Scheme.h:30
virtual void shutdownCleanup()=0
static std::vector< Scheme::Pointer > & GetSchemes()
Definition: Scheme.cc:44
virtual char const * type() const =0
static Scheme::Pointer Find(const char *)
Definition: Scheme.cc:33
~Scheme() override
Definition: Scheme.h:36
std::vector< Scheme::Pointer >::iterator iterator
Definition: Scheme.h:31
Scheme & operator=(Scheme const &)
std::vector< Scheme::Pointer >::const_iterator const_iterator
Definition: Scheme.h:32
static std::vector< Scheme::Pointer > * _Schemes
Definition: Scheme.h:70
static void AddScheme(Scheme::Pointer)
Definition: Scheme.cc:20
HTTP Authentication.
Definition: Config.h:19

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors