MongoDB C++ Driver legacy-1.0.5
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
22 class SaslClientConversation;
23
29 MONGO_DISALLOW_COPYING(NativeSaslClientSession);
30 public:
31
34
35 virtual Status initialize();
36
37 virtual Status step(const StringData& inputData, std::string* outputData);
38
39 virtual bool isDone() const { return _done; }
40
41 private:
43 int _step;
44
46 bool _done;
47
49 boost::scoped_ptr<SaslClientConversation> _saslConversation;
50 };
51
52} // 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
the main MongoDB namespace
Definition bulk_operation_builder.h:24
MONGO_CLIENT_API Status(MONGO_CLIENT_FUNC *saslClientAuthenticate)(DBClientWithCommands *client
Attempts to authenticate "client" using the SASL protocol.