MongoDB C++ Driver  legacy-1.1.2
sasl_plain_client_conversation.h
1 /*
2  * Copyright (C) 2014 MongoDB Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #pragma once
18 
19 #include <string>
20 
21 #include "mongo/base/disallow_copying.h"
22 #include "mongo/base/status.h"
23 #include "mongo/base/string_data.h"
24 #include "mongo/client/sasl_client_conversation.h"
25 
26 namespace mongo {
31  MONGO_DISALLOW_COPYING(SaslPLAINClientConversation);
32 
33 public:
38  explicit SaslPLAINClientConversation(SaslClientSession* saslClientSession);
39 
40  virtual ~SaslPLAINClientConversation();
41 
42  virtual StatusWith<bool> step(const StringData& inputData, std::string* outputData);
43 };
44 
45 } // namespace mongo
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 StatusWith< bool > step(const StringData &inputData, std::string *outputData)
Performs one step of the client side of the authentication session, consuming "inputData" and produci...
SaslPLAINClientConversation(SaslClientSession *saslClientSession)
Implements the client side of a SASL PLAIN mechanism session.
Definition: status_with.h:43
Client side authentication session for SASL PLAIN.
Definition: sasl_plain_client_conversation.h:30
Abstract class for implementing the clent-side of a SASL mechanism conversation.
Definition: sasl_client_conversation.h:34