18 #include <boost/scoped_array.hpp>
21 #include "mongo/base/disallow_copying.h"
22 #include "mongo/base/status.h"
23 #include "mongo/base/string_data.h"
24 #include "mongo/client/export_macros.h"
25 #include "mongo/stdx/functional.h"
46 typedef stdx::function<SaslClientSession*(const std::string&)> SaslClientSessionFactoryFn;
47 static SaslClientSessionFactoryFn create;
53 parameterServiceName = 0,
54 parameterServiceHostname,
119 virtual bool isDone()
const = 0;
126 boost::scoped_array<char> data;
131 DataBuffer _parameters[numParameters];
virtual bool hasParameter(Parameter id)
Returns true if "id" identifies a parameter previously set by a call to setParameter().
Status represents an error state or the absence thereof.
Definition: status.h:50
virtual void setParameter(Parameter id, const StringData &value)
Sets the parameter identified by "id" to "value".
Parameter
Identifiers of parameters used to configure a SaslClientSession.
Definition: sasl_client_session.h:52
A StringData object wraps a 'const string&' or a 'const char*' without copying its contents...
Definition: string_data.h:43
Utility functions for parsing numbers from strings.
Definition: compare_numbers.h:20
Base class for the client side of a SASL authentication conversation.
Definition: sasl_client_session.h:42
virtual StringData getParameter(Parameter id)
Returns the value of a previously set parameter.
virtual Status initialize()=0
Initializes a session for use.
virtual bool isDone() const =0
Returns true if the authentication completed successfully.
virtual Status step(const StringData &inputData, std::string *outputData)=0
Takes one step of the SASL protocol on behalf of the client.