On this page本页内容
endSessions
¶New in version 3.6.版本3.6中的新功能。
The endSessions
command expires the specified sessions. The command overrides the timeout period that sessions wait before expiring.
endSessions
has the following syntax:语法如下所示:
To run endSessions
, use the db.runCommand( { <command> } )
method.
MongoDB concatenates each of the specified UUIDs with the hash of the authenticated user credentials to identify the user’s sessions to end. If the user has no session that match, the endSessions
has no effect.
If the deployment enforces authentication/authorization, you must be authenticated to run the endSessions
command.
A user can only end sessions belonging to the user.
See also参阅