22 #ifdef HAVE_SASL_SASL_H
24 #include <boost/shared_ptr.hpp>
25 #include <boost/scoped_ptr.hpp>
27 #include <thrift/transport/TBufferTransports.h>
33 namespace apache {
namespace thrift {
namespace transport {
35 TSaslClientTransport::TSaslClientTransport(boost::shared_ptr<sasl::TSasl> saslClient,
36 boost::shared_ptr<TTransport> transport)
42 uint32_t resLength = 0;
44 uint8_t *initialResponse = &dummy;
47 if (
sasl_->hasInitialResponse()) {
48 initialResponse =
sasl_->evaluateChallengeOrResponse(NULL, 0, &resLength);
53 (uint8_t*)
sasl_->getMechanismName().c_str(),
54 sasl_->getMechanismName().length(),
false);
void sendSaslMessage(const NegotiationStatus status, const uint8_t *payload, const uint32_t length, bool flush=true)
virtual void handleSaslStartMessage()
Handle any startup messages.
boost::shared_ptr< sasl::TSasl > sasl_
boost::shared_ptr< TTransport > transport_
Underlying transport.