21#ifndef G_AUTH_SECRETS_H
22#define G_AUTH_SECRETS_H
43 G_EXCEPTION( OpenError ,
"cannot read secrets file" ) ;
45 static void check(
const std::string & ,
const std::string & ,
const std::string & ) ;
49 Secrets(
const std::string & source_storage_path ,
const std::string & debug_name ) ;
62 bool valid()
const override ;
65 Secret serverSecret(
const std::string & type ,
const std::string &
id )
const override ;
68 bool contains(
const std::string & type )
const override ;
75 void operator=(
const Secrets & ) = delete ;
76 void operator=(
Secrets && ) = delete ;
79 std::string source()
const override ;
80 Secret clientSecret(
const std::string & type )
const override ;
81 std::pair<std::string,std::string> serverTrust(
const std::string & address_range )
const override ;
84 std::string m_source ;
85 std::unique_ptr<SecretsFile> m_imp ;
An interface used by GAuth::SaslClient to obtain a client id and its authentication secret.
An interface used by GAuth::SaslServer to obtain authentication secrets.
Encapsulates a shared secret from the secrets file plus the associated userid.
A simple interface for a store of secrets used in authentication.
Secret serverSecret(const std::string &type, const std::string &id) const override
Override from GAuth::SaslServerSecrets.
bool contains(const std::string &type) const override
Override from GAuth::SaslServerSecrets.
static void check(const std::string &, const std::string &, const std::string &)
Checks the given secret sources.
Secrets()
Default constructor for an in-valid(), empty-path object.
bool valid() const override
Override from GAuth::Valid virtual base.
SASL authentication classes.