MongoDB C++ Driver legacy-1.1.2
Loading...
Searching...
No Matches
native_sasl_client_session.h
1/* Copyright 2014 MongoDB Inc.
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16#include <boost/scoped_ptr.hpp>
17
18#include "mongo/client/sasl_client_session.h"
19
20namespace mongo {
21
22class SaslClientConversation;
23
29 MONGO_DISALLOW_COPYING(NativeSaslClientSession);
30
31public:
34
35 virtual Status initialize();
36
37 virtual Status step(const StringData& inputData, std::string* outputData);
38
39 virtual bool isDone() const {
40 return _done;
41 }
42
43private:
45 int _step;
46
48 bool _done;
49
51 boost::scoped_ptr<SaslClientConversation> _saslConversation;
52};
53
54} // namespace mongo
Implementation of the client side of a SASL authentication conversation using the native SASL impleme...
Definition native_sasl_client_session.h:28
virtual bool isDone() const
Returns true if the authentication completed successfully.
Definition native_sasl_client_session.h:39
virtual Status step(const StringData &inputData, std::string *outputData)
Takes one step of the SASL protocol on behalf of the client.
virtual Status initialize()
Initializes a session for use.
Base class for the client side of a SASL authentication conversation.
Definition sasl_client_session.h:42
Status represents an error state or the absence thereof.
Definition status.h:50
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