diff options
Diffstat (limited to 'src/mongo/db/auth/user.h')
-rw-r--r-- | src/mongo/db/auth/user.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mongo/db/auth/user.h b/src/mongo/db/auth/user.h index 715b849fe9b..5b3edfb767f 100644 --- a/src/mongo/db/auth/user.h +++ b/src/mongo/db/auth/user.h @@ -104,6 +104,15 @@ public: explicit User(const UserName& name); + using UserId = std::vector<std::uint8_t>; + const UserId& getID() const { + return _id; + } + + void setID(UserId id) { + _id = std::move(id); + } + /** * Returns the user name for this user. */ @@ -230,6 +239,10 @@ protected: void _invalidate(); private: + // Unique ID (often UUID) for this user. + // May be empty for legacy users. + UserId _id; + UserName _name; // Digest of the full username |