summaryrefslogtreecommitdiff
path: root/src/mongo/db/auth/authorization_session.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/auth/authorization_session.h')
-rw-r--r--src/mongo/db/auth/authorization_session.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/auth/authorization_session.h b/src/mongo/db/auth/authorization_session.h
index 65588ab0708..eccb2dcbbc3 100644
--- a/src/mongo/db/auth/authorization_session.h
+++ b/src/mongo/db/auth/authorization_session.h
@@ -119,6 +119,10 @@ public:
// and ownership of the user stays with the AuthorizationManager
User* lookupUser(const UserName& name);
+ // Returns the single user on this auth session. If no user is authenticated, or if
+ // multiple users are authenticated, this method will throw an exception.
+ User* getSingleUser();
+
// Gets an iterator over the names of all authenticated users stored in this manager.
UserNameIterator getAuthenticatedUserNames();