21#ifndef GAUTH_SASL_SERVER_SECRETS_H
22#define GAUTH_SASL_SERVER_SECRETS_H
32 class SaslServerSecrets ;
45 virtual bool valid()
const = 0 ;
53 virtual std::pair<std::string,std::string>
serverTrust(
const std::string & address_range )
const = 0 ;
58 virtual std::string
source()
const = 0 ;
61 virtual bool contains( std::string_view type , std::string_view
id )
const = 0 ;
An interface used by GAuth::SaslServer to obtain authentication secrets.
virtual Secret serverSecret(std::string_view type, std::string_view id) const =0
Returns the server secret for the given client id.
virtual bool valid() const =0
Returns true if the secrets are valid.
virtual std::pair< std::string, std::string > serverTrust(const std::string &address_range) const =0
Returns a non-empty trustee name if the server trusts the given address range (eg.
virtual bool contains(std::string_view type, std::string_view id) const =0
Returns true if there is a secret of the given type either for one user in particular or for any user...
virtual std::string source() const =0
Returns the source identifier (eg. file name).
virtual ~SaslServerSecrets()=default
Destructor.
Encapsulates a userid/shared-secret/hash-function tuple from the secrets file.
SASL authentication classes.