#include <Scheme.h>

Inheritance diagram for Auth::Scheme:
Collaboration diagram for Auth::Scheme:

Public Types

typedef RefCount< SchemePointer
typedef std::vector< Scheme::Pointer >::iterator iterator
typedef std::vector< Scheme::Pointer >::const_iterator const_iterator

Public Member Functions

 Scheme ()
 ~Scheme () override
virtual char const * type () const =0
virtual void shutdownCleanup ()=0
virtual Auth::SchemeConfigcreateConfig ()=0
 Scheme (Scheme const &)
Schemeoperator= (Scheme const &)

Static Public Member Functions

static void AddScheme (Scheme::Pointer)
static void FreeAll ()
static Scheme::Pointer Find (const char *)
static std::vector< Scheme::Pointer > & GetSchemes ()

Protected Attributes

bool initialised

Static Private Attributes

static std::vector< Scheme::Pointer > * _Schemes = nullptr

Detailed Description

I represent an authentication scheme. For now my children store the scheme metadata.

Should we need multiple configs of a single scheme, a new class should be made, and the config specific calls on Auth::Scheme moved to it.

Definition at line 27 of file Scheme.h.

Member Typedef Documentation

◆ const_iterator

Definition at line 32 of file Scheme.h.

◆ iterator

Definition at line 31 of file Scheme.h.

◆ Pointer

Definition at line 30 of file Scheme.h.

Constructor & Destructor Documentation

◆ Scheme() [1/2]

Auth::Scheme::Scheme ( )

Definition at line 35 of file Scheme.h.

◆ ~Scheme()

Auth::Scheme::~Scheme ( )

Definition at line 36 of file Scheme.h.

◆ Scheme() [2/2]

Auth::Scheme::Scheme ( Scheme const &  )

Member Function Documentation

◆ AddScheme()

void Auth::Scheme::AddScheme ( Scheme::Pointer  instance)

Definition at line 20 of file Scheme.cc.

References assert, GetSchemes(), and instance.

◆ createConfig()

virtual Auth::SchemeConfig * Auth::Scheme::createConfig ( )
pure virtual

◆ Find()

Auth::Scheme::Pointer Auth::Scheme::Find ( const char *  typestr)

Locate an authentication scheme component by Name.

Definition at line 33 of file Scheme.cc.

Referenced by getConfig(), parse_authparam(), and Auth::UserRequest::scheme().

◆ FreeAll()

void Auth::Scheme::FreeAll ( )

Final termination of all authentication components. To be used only on shutdown. All global pointers are released. After this all schemes will appear completely unsupported until a call to InitAuthModules(). Release the Auth::TheConfig handles instead to disable authentication without terminiating all support.

Called when a graceful shutdown is to occur of each scheme module. On completion the auth components are to be considered deleted. None will be available globally. Some may remain around for their currently active connections to close, but only those active connections will retain pointers to them.

Definition at line 60 of file Scheme.cc.

References assert, shutting_down, and size.

Referenced by SignalEngine::FinalShutdownRunners().

◆ GetSchemes()

std::vector< Auth::Scheme::Pointer > & Auth::Scheme::GetSchemes ( )

◆ operator=()

Scheme & Auth::Scheme::operator= ( Scheme const &  )

◆ shutdownCleanup()

virtual void Auth::Scheme::shutdownCleanup ( )
pure virtual

◆ type()

virtual char const * Auth::Scheme::type ( ) const
pure virtual

Member Data Documentation

◆ _Schemes

std::vector< Auth::Scheme::Pointer > * Auth::Scheme::_Schemes = nullptr

Definition at line 70 of file Scheme.h.

◆ initialised

bool Auth::Scheme::initialised

Definition at line 67 of file Scheme.h.

The documentation for this class was generated from the following files:






Web Site Translations