21 #ifndef G_AUTH_SECRETS_FILE_H
22 #define G_AUTH_SECRETS_FILE_H
48 const std::string & server_type = std::string() ) ;
63 Secret serverSecret(
const std::string & encoding_type ,
const std::string &
id )
const ;
67 std::pair<std::string,std::string>
serverTrust(
const std::string & address_range )
const ;
71 std::string
path()
const ;
74 bool contains(
const std::string & server_encoding_type )
const ;
78 void process(
unsigned int , std::string side , std::string , std::string , std::string ) ;
79 void warning(
unsigned int ,
const std::string & ,
const std::string & ) ;
80 static std::string canonical(
const std::string & encoding_type ) ;
81 static std::string serverKey( std::string ,
const std::string & ) ;
82 static std::string clientKey( std::string ) ;
84 void read( std::istream & ) ;
88 static std::string context(
unsigned int ) ;
91 struct Value { Value(
const std::string &s_,
unsigned int n_):s(s_),n(n_) {} std::string s ;
unsigned int n ; } ;
92 typedef std::map<std::string,Value> Map ;
93 typedef std::set<std::string> Set ;
94 typedef std::pair<unsigned long,std::string> Warning ;
95 typedef std::vector<Warning> Warnings ;
98 std::string m_debug_name ;
99 std::string m_server_type ;
103 Warnings m_warnings ;
A subsecond-resolution timestamp based on a time_t.
std::pair< std::string, std::string > serverTrust(const std::string &address_range) const
Returns a non-empty trustee name if the server trusts clients in the given address range...
SecretsFile(const G::Path &path, bool auto_reread, const std::string &debug_name, const std::string &server_type=std::string())
Constructor to read "client" and "" records from the named file.
bool valid() const
Returns true if the file path was supplied in the ctor.
~SecretsFile()
Destructor.
Secret serverSecret(const std::string &encoding_type, const std::string &id) const
Returns the server secret for the given id and encoding-type.
A class to read authentication secrets from file, used by GAuth::Secrets.
std::string path() const
Returns the file path, as supplied to the ctor.
Secret clientSecret(const std::string &encoding_type) const
Returns the client id and secret for the given encoding-type.
bool contains(const std::string &server_encoding_type) const
Returns true if the given server encoding-type is represented.
SASL authentication classes.
Encapsulates a shared secret from the secrets file plus the associated userid.
A Path object represents a file system path.