MongoDB C++ Driver
legacy-1.1.2
|
Implementation of the client side of a SASL authentication conversation using the native SASL implementation. More...
#include <native_sasl_client_session.h>
Public Member Functions | |
virtual Status | initialize () |
Initializes a session for use. More... | |
virtual Status | step (const StringData &inputData, std::string *outputData) |
Takes one step of the SASL protocol on behalf of the client. More... | |
virtual bool | isDone () const |
Returns true if the authentication completed successfully. | |
Public Member Functions inherited from mongo::SaslClientSession | |
virtual void | setParameter (Parameter id, const StringData &value) |
Sets the parameter identified by "id" to "value". More... | |
virtual bool | hasParameter (Parameter id) |
Returns true if "id" identifies a parameter previously set by a call to setParameter(). | |
virtual StringData | getParameter (Parameter id) |
Returns the value of a previously set parameter. More... | |
Additional Inherited Members | |
Public Types inherited from mongo::SaslClientSession | |
enum | Parameter |
Identifiers of parameters used to configure a SaslClientSession. | |
Implementation of the client side of a SASL authentication conversation using the native SASL implementation.
|
virtual |
Initializes a session for use.
Call exactly once, after setting any parameters you intend to set via setParameter().
Implements mongo::SaslClientSession.
|
virtual |
Takes one step of the SASL protocol on behalf of the client.
Caller should provide data from the server side of the conversation in "inputData", or an empty StringData() if none is available. If the client should make a response to the server, stores the response into "*outputData".
Returns Status::OK() on success. Any other return value indicates a failed authentication, though the specific return value may provide insight into the cause of the failure (e.g., ProtocolError, AuthenticationFailed).
In the event that this method returns Status::OK(), consult the value of isDone() to determine if the conversation has completed. When step() returns Status::OK() and isDone() returns true, authentication has completed successfully.
Implements mongo::SaslClientSession.