21#ifndef G_SASL_SERVER_H
22#define G_SASL_SERVER_H
81 virtual std::string
mechanisms(
char space_separator )
const = 0 ;
117 virtual std::string
apply(
const std::string & response ,
bool & done ) = 0 ;
131 virtual std::string
id()
const = 0 ;
An interface for implementing the server-side SASL challenge/response concept.
virtual bool trusted(const GNet::Address &) const =0
Returns true if a trusted client that does not need to authenticate.
virtual std::string apply(const std::string &response, bool &done)=0
Applies the client response and returns the next challenge and a 'done' flag by reference.
virtual bool init(const std::string &mechanism)=0
Initialiser.
virtual bool active() const =0
Returns true if the constructor's "secrets" object was valid.
virtual bool mustChallenge() const =0
Returns true if authentication using the current mechanism must always start with a non-empty server ...
virtual std::string id() const =0
Returns the authenticated or trusted identity.
virtual std::string mechanisms(char space_separator) const =0
Returns a list of supported, standard mechanisms that can be advertised to the client.
virtual std::string mechanism() const =0
Returns the mechanism, as passed to the last init() call to return true.
virtual ~SaslServer()=default
Destructor.
virtual bool authenticated() const =0
Returns true if authenticated sucessfully.
virtual std::string initialChallenge() const =0
Returns the possibly-empty initial server challenge.
virtual bool requiresEncryption() const =0
Returns true if the implementation requires that the challenge/response dialog should only take place...
The GNet::Address class encapsulates a TCP/UDP transport address.
SASL authentication classes.