MongoDB C++ Driver legacy-1.0.0
Loading...
Searching...
No Matches
sasl_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/string_data.h"
23
24namespace mongo {
25
26 class SaslClientSession;
27 template <typename T> class StatusWith;
28
34 MONGO_DISALLOW_COPYING(SaslClientConversation);
35 public:
44 explicit SaslClientConversation(SaslClientSession* saslClientSession) :
45 _saslClientSession(saslClientSession) {}
46
48
60 virtual StatusWith<bool> step(const StringData& inputData, std::string* outputData) = 0;
61
62 protected:
63 SaslClientSession* _saslClientSession;
64 };
65
66} // namespace mongo
Abstract class for implementing the clent-side of a SASL mechanism conversation.
Definition sasl_client_conversation.h:33
SaslClientConversation(SaslClientSession *saslClientSession)
Implements the client side of a SASL authentication mechanism.
Definition sasl_client_conversation.h:44
virtual StatusWith< bool > step(const StringData &inputData, std::string *outputData)=0
Performs one step of the client side of the authentication session, consuming "inputData" and produci...
Base class for the client side of a SASL authentication conversation.
Definition sasl_client_session.h:42
Definition sasl_client_conversation.h:27
the main MongoDB namespace
Definition bulk_operation_builder.h:24