summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/authentication_commands.h
diff options
context:
space:
mode:
authorAndy Schwerin <schwerin@10gen.com>2013-07-08 19:19:05 -0400
committerAndy Schwerin <schwerin@10gen.com>2013-07-26 11:40:31 -0400
commit78b54e5608d1a49da4228ee2b45489a9d0cc9182 (patch)
tree76bd554674161762b05e1bef322fbfbe67e2fae9 /src/mongo/db/commands/authentication_commands.h
parent01b4f0ad09c244fd7f83bb045ff844416aa8ca96 (diff)
downloadmongo-78b54e5608d1a49da4228ee2b45489a9d0cc9182.tar.gz
SERVER-1891 Add hooks to audit authentications using MONGODB-CR and MONGODB-X509.
Diffstat (limited to 'src/mongo/db/commands/authentication_commands.h')
-rw-r--r--src/mongo/db/commands/authentication_commands.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mongo/db/commands/authentication_commands.h b/src/mongo/db/commands/authentication_commands.h
index d051637014b..e98a7c0914b 100644
--- a/src/mongo/db/commands/authentication_commands.h
+++ b/src/mongo/db/commands/authentication_commands.h
@@ -16,6 +16,8 @@
#pragma once
+#include <string>
+
#include "mongo/base/status.h"
#include "mongo/db/auth/user_name.h"
#include "mongo/db/commands.h"
@@ -47,7 +49,7 @@ namespace mongo {
private:
/**
- * Completes the authentication of "user" using parameters from "cmdObj".
+ * Completes the authentication of "user" using "mechanism" and parameters from "cmdObj".
*
* Returns Status::OK() on success. All other statuses indicate failed authentication. The
* entire status returned here may always be used for logging. However, if the code is
@@ -58,7 +60,9 @@ namespace mongo {
* mechanism, and ProtocolError, indicating an error in the use of the authentication
* protocol.
*/
- Status _authenticate(const UserName& user, const BSONObj& cmdObj);
+ Status _authenticate(const std::string& mechanism,
+ const UserName& user,
+ const BSONObj& cmdObj);
Status _authenticateCR(const UserName& user, const BSONObj& cmdObj);
Status _authenticateX509(const UserName& user, const BSONObj& cmdObj);
};