21 #ifndef G_POP_SECRETS_H
22 #define G_POP_SECRETS_H
46 G_EXCEPTION( OpenError ,
"cannot open pop secrets file" ) ;
59 std::string
path()
const ;
62 virtual bool valid()
const override ;
65 virtual std::string
source()
const override ;
71 virtual std::pair<std::string,std::string>
serverTrust(
const std::string & )
const override ;
74 bool contains(
const std::string & mechanism )
const ;
80 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.
An interface used by GAuth::SaslServer to obtain authentication secrets.
virtual GAuth::Secret serverSecret(const std::string &encoding_type, const std::string &id) const override
Override from GSmtp::SaslServer::Secrets.
virtual bool valid() const override
Override from GSmtp::Valid virtual base class.
Secrets(const std::string &storage_path=defaultPath())
Constructor.
A private pimple-pattern implementation class used by GPop::Secrets.
virtual ~Secrets()
Destructor.
virtual std::pair< std::string, std::string > serverTrust(const std::string &) const override
Override from GSmtp::SaslServer::Secrets.
std::string path() const
Returns the storage path.
virtual std::string source() const override
Override from GAuth::SaslServerSecrets.
Encapsulates a shared secret from the secrets file plus the associated userid.
static std::string defaultPath()
Returns the default path.