#include <Authenticator.h>
class CAuthenticator {CAuthenticator();
CAuthenticator(const CAuthenticator& rhs);
virtual ~CAuthenticator();
CAuthenticator& operator=(const CAuthenticator& rhs);
virtual = 0 Bool_t Authenticate(CInteractor& interactor);
protected: std::string GetLine(CInteractor& interactor);
}
CAuthenticator
is the base class for all
authenticators. You can use any of the authenticators described in
these reference pages, or you can create your own by deriving a new
authenticator from this base class.
The class provides a public interface and protected services for derived classes. These will be described in "Member functions" below.
CAuthenticator();
Default construtor. This is supplied so the compiler won't complain if derived class constructors don't explcitly chain to their base class constructor.
CAuthenticator(const CAuthenticator& rhs);
Copy constructor this is supplied so that derived classes can implement a copy constructor. In the future, if additional services are added to the base class that require state, this constructor can be chained to by derived classes to ensure that the appropriate deep copy is done.
virtual ~CAuthenticator();
Destructor is provide as virtual to ensure that destructors automatically chain up the class hierarchy.
CAuthenticator& operator=(const CAuthenticator& rhs);
Assignment operator is supplied for much the same reason as the copy constructor.
virtual = 0 Bool_t Authenticate(CInteractor& interactor);
Authenticate
is the interface that
derived classes must implement. The method must obtain
credentials from the entity that want service via the
interactor
object supplied.
If the entity supplies authorized credentials, the function
should return kfTRUE. If the entity
supplies bad or unauthorized credentials,
kfFALSE
should be returned.
protected: std::string GetLine(CInteractor& interactor);
This protected service reads a complete line of text from the
interactor
. The newline at the end of
the input line is absorbed from the interactor but silently
discarded.
The
CInteractor
object is an object that is intended to obtain credentials from some
source. Other sections of this manpage describe interactors, both their
abstract base class (CInteractor
), and
derived concrete classes.
The Security chapter of the full documentation manual describes the entire authentication package and how to use it as well as providing a brief listing of the various authenticators and interactors that are currently implemented.