diff options
author | Waley Chen <waleycz@gmail.com> | 2016-08-03 15:54:57 -0400 |
---|---|---|
committer | Waley Chen <waleycz@gmail.com> | 2016-08-03 15:54:57 -0400 |
commit | 05e1c33649e08ec3736121254da7b29a73934788 (patch) | |
tree | 591de8a744ed1e31535038474247102e540c209d /src/mongo/client/authenticate.cpp | |
parent | 1aeb9f04c0cdaaa4832ada812797b50456986baf (diff) | |
download | mongo-05e1c33649e08ec3736121254da7b29a73934788.tar.gz |
SERVER-24067 TaskExecutor RemoteCommandCallbackArgs should include elapsedMS and metadata
Diffstat (limited to 'src/mongo/client/authenticate.cpp')
-rw-r--r-- | src/mongo/client/authenticate.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
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)); |