21 #ifndef G_POP_SECRETS_H
22 #define G_POP_SECRETS_H
47 G_EXCEPTION( OpenError ,
"cannot open pop secrets file" ) ;
60 std::string
path()
const ;
63 virtual bool valid()
const ;
67 virtual std::string
source()
const ;
72 virtual std::string
secret(
const std::string & mechanism ,
const std::string &
id )
const ;
78 bool contains(
const std::string & mechanism )
const ;
84 void operator=(
const Secrets & ) ;
A simple interface to a store of secrets as used in authentication.
bool contains(const std::string &mechanism) const
Returns true if there is one or more secrets using the given mechanism.
Secrets(const std::string &storage_path=defaultPath())
Constructor.
A private pimple-pattern implementation class used by GPop::Secrets.
virtual ~Secrets()
Destructor.
virtual std::string secret(const std::string &mechanism, const std::string &id) const
Returns the given user's secret.
virtual bool valid() const
Returns true.
#define G_EXCEPTION(class_name, description)
define as a function rather than a type if optimising for size
std::string path() const
Returns the storage path.
An interface used by GAuth::SaslServer to obtain authentication secrets.
static std::string defaultPath()
Returns the default path.
virtual std::string source() const
Returns the storage path, as passed in to the constructor.