GPop::Secrets Class Reference

A simple interface to a store of secrets as used in authentication. More...

#include <gpopsecrets.h>

Inheritance diagram for GPop::Secrets:

GSmtp::SaslServer::Secrets GSmtp::Valid

List of all members.

Public Member Functions

 Secrets (const std::string &storage_path=defaultPath())
 Constructor.
virtual ~Secrets ()
 Destructor.
std::string path () const
 Returns the storage path.
virtual bool valid () const
 Returns true. Final override from GSmtp::Valid virtual base class.
virtual std::string secret (const std::string &mechanism, const std::string &id) const
 Returns the given user's secret.
bool contains (const std::string &mechanism) const
 Returns true if there is one or more secrets using the given mechanism.

Static Public Member Functions

static std::string defaultPath ()
 Returns the default path.


Detailed Description

A simple interface to a store of secrets as used in authentication.

Definition at line 49 of file gpopsecrets.h.


Constructor & Destructor Documentation

GPop::Secrets::Secrets ( const std::string &  storage_path = defaultPath()  )  [explicit]

Constructor.

In principle the storage_path can be a path to a file, a database connection string, etc. Throws on error.

Definition at line 43 of file gpopsecrets.cpp.

GPop::Secrets::~Secrets (  )  [virtual]

Destructor.

Reimplemented from GSmtp::SaslServer::Secrets.

Definition at line 48 of file gpopsecrets.cpp.


Member Function Documentation

std::string GPop::Secrets::defaultPath (  )  [static]

Returns the default path.

Definition at line 26 of file gpopsecrets_unix.cpp.

References G_SYSCONFDIR, path(), G::Path::pathAppend(), and G::Path::str().

Referenced by Main::Configuration::popSecretsFile(), and Main::CommandLineImp::switchSpec().

std::string GPop::Secrets::path (  )  const

Returns the storage path.

Definition at line 53 of file gpopsecrets.cpp.

References GPop::SecretsImp::path().

Referenced by defaultPath(), and GPop::Server::report().

bool GPop::Secrets::valid (  )  const [virtual]

Returns true. Final override from GSmtp::Valid virtual base class.

Implements GSmtp::Valid.

Definition at line 58 of file gpopsecrets.cpp.

Referenced by GPop::AuthImp::valid().

std::string GPop::Secrets::secret ( const std::string &  mechanism,
const std::string &  id 
) const [virtual]

Returns the given user's secret.

Returns the empty string if not a valid id.

Final override from GSmtp::SaslServer::Secrets.

Implements GSmtp::SaslServer::Secrets.

Definition at line 63 of file gpopsecrets.cpp.

References GPop::SecretsImp::secret().

bool GPop::Secrets::contains ( const std::string &  mechanism  )  const [virtual]

Returns true if there is one or more secrets using the given mechanism.

Implements GSmtp::SaslServer::Secrets.

Definition at line 68 of file gpopsecrets.cpp.

References GPop::SecretsImp::contains().


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

Generated on Fri Apr 18 15:56:13 2008 for E-MailRelay by  doxygen 1.5.5