34 std::string
path()
const ;
35 std::string
secret(
const std::string & mechanism ,
const std::string &
id )
const ;
36 bool contains(
const std::string & mechanism )
const ;
55 return m_imp->path() ;
60 return m_imp->path() ;
70 return m_imp->secret( mechanism ,
id ) ;
75 return m_imp->contains( mechanism ) ;
82 m_secrets( path ,
"pop-server" )
86 throw GPop::Secrets::OpenError(path) ;
96 return m_secrets.secret( mechanism ,
id ) ;
101 return m_secrets.contains( mechanism ) ;
bool contains(const std::string &mechanism) const
Returns true if there is one or more secrets using the given mechanism.
std::string secret(const std::string &mechanism, const std::string &id) const
virtual bool valid() const
Final override from GAuth::Valid virtual base.
A simple interface to a store of secrets as used in authentication.
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.
SecretsImp(const std::string &path)
std::string path() const
Returns the storage path.
bool contains(const std::string &mechanism) const
virtual std::string source() const
Returns the storage path, as passed in to the constructor.