From 05e1c33649e08ec3736121254da7b29a73934788 Mon Sep 17 00:00:00 2001 From: Waley Chen Date: Wed, 3 Aug 2016 15:54:57 -0400 Subject: SERVER-24067 TaskExecutor RemoteCommandCallbackArgs should include elapsedMS and metadata --- src/mongo/client/authenticate.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/mongo/client/authenticate.cpp') diff --git a/src/mongo/client/authenticate.cpp b/src/mongo/client/authenticate.cpp index 224517e00be..7d45da9ef08 100644 --- a/src/mongo/client/authenticate.cpp +++ b/src/mongo/client/authenticate.cpp @@ -159,7 +159,7 @@ void authMongoCR(RunCommandHook runCommand, const BSONObj& params, AuthCompletio // Ensure response was valid std::string nonce; - BSONObj nonceResponse = response.getValue().data; + BSONObj nonceResponse = response.data; auto valid = bsonExtractStringField(nonceResponse, "nonce", &nonce); if (!valid.isOK()) return handler({ErrorCodes::AuthenticationFailed, @@ -235,7 +235,8 @@ void authX509(RunCommandHook runCommand, // bool isFailedAuthOk(const AuthResponse& response) { - return (response == ErrorCodes::AuthenticationFailed && serverGlobalParams.transitionToAuth); + return (response.status == ErrorCodes::AuthenticationFailed && + serverGlobalParams.transitionToAuth); } void auth(RunCommandHook runCommand, @@ -305,9 +306,9 @@ void authenticateClient(const BSONObj& params, // NOTE: this assumes that runCommand executes synchronously. asyncAuth(runCommand, params, hostname, clientName, [](AuthResponse response) { // DBClient expects us to throw in case of an auth error. - uassertStatusOK(response); + uassertStatusOK(response.status); - auto serverResponse = response.getValue().data; + auto serverResponse = response.data; uassert(ErrorCodes::AuthenticationFailed, serverResponse["errmsg"].str(), isOk(serverResponse)); -- cgit v1.2.1