On this page本页内容
refreshSessions
The refreshSessions
command updates the last use time for the specified sessions, thereby extending the active state of the sessions.refreshSessions
命令更新指定会话的上次使用时间,从而延长会话的活动状态。
refreshSessions
has the following syntax:具有以下语法:
{ refreshSessions: [ { id : <UUID> }, ... ] } )
To run 要运行refreshSessions
, use the db.runCommand( { <command> } )
method.refreshSessions
,请使用db.runCommand( { <command> } )
方法。
db.runCommand( { refreshSessions: [ { id : <UUID> }, ... ] } )
MongoDB concatenates each of the specified UUIDs with the hash of the authenticated user credentials to identify the user's sessions to refresh. MongoDB将每个指定的UUID与经过身份验证的用户凭据的哈希连接起来,以标识要刷新的用户会话。If the user has no session that match, the 如果用户没有匹配的会话,则refreshSessions
has no effect.refreshSessions
无效。
If the deployment enforces authentication/authorization, you must be authenticated to run the 如果部署强制执行身份验证/授权,则必须对您进行身份验证才能运行refreshSessions
command.refreshSessions
命令。
A user can only refresh sessions belonging to the user.用户只能刷新属于该用户的会话。