summaryrefslogtreecommitdiff
path: root/src/mongo/client/authenticate.cpp
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2018-10-31 15:42:17 -0400
committerMathias Stearn <mathias@10gen.com>2018-11-15 17:25:11 -0500
commit3d7ed4fdd5e4840e9599a74ec92e16bc619bebf0 (patch)
tree2bd06655367af012e17bf80947cdb792fa1b9b44 /src/mongo/client/authenticate.cpp
parent1ded7067e2d1a6161b15e5a462f8cba2d755c9a6 (diff)
downloadmongo-3d7ed4fdd5e4840e9599a74ec92e16bc619bebf0.tar.gz
SERVER-35682 kill existing SharedPromise type
This required plumbing unique_function into many more places.
Diffstat (limited to 'src/mongo/client/authenticate.cpp')
-rw-r--r--src/mongo/client/authenticate.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/client/authenticate.cpp b/src/mongo/client/authenticate.cpp
index 6dc0337d627..8931c5de702 100644
--- a/src/mongo/client/authenticate.cpp
+++ b/src/mongo/client/authenticate.cpp
@@ -137,7 +137,7 @@ Future<void> authX509(RunCommandHook runCommand, const BSONObj& params, StringDa
// The runCommand hook checks whether the command returned { ok: 1.0 }, and we don't need to
// extract anything from the command payload, so this is just turning a Future<BSONObj>
// into a Future<void>
- return runCommand(authRequest.getValue()).then([](BSONObj obj) { return Status::OK(); });
+ return runCommand(authRequest.getValue()).ignoreValue();
}
} // namespace
@@ -149,7 +149,6 @@ Future<void> authenticateClient(const BSONObj& params,
const HostAndPort& hostname,
const std::string& clientName,
RunCommandHook runCommand) {
- std::string mechanism;
auto errorHandler = [](Status status) {
if (serverGlobalParams.transitionToAuth && !status.isA<ErrorCategory::NetworkError>()) {
// If auth failed in transitionToAuth, just pretend it succeeded.
@@ -161,6 +160,8 @@ Future<void> authenticateClient(const BSONObj& params,
return status;
};
+
+ std::string mechanism;
auto response = bsonExtractStringField(params, saslCommandMechanismFieldName, &mechanism);
if (!response.isOK())
return response;