On this page
refreshSessions
在本页面
Definition
refreshSessions
- 3.6 版的新功能。
refreshSessions命令更新指定会话的上次使用时间,从而延长了会话的活动状态。
refreshSessions具有以下语法:
{ refreshSessions: [ { id : <UUID> }, ... ] } )
要运行refreshSessions,请使用db.runCommand( { <command> })方法。
db.runCommand( { refreshSessions: [ { id : <UUID> }, ... ] } )
Behavior
Session Identification
MongoDB 将每个指定的 UUID 与经过身份验证的用户凭据的哈希值连接起来,以标识要刷新的用户会话。如果用户没有匹配的会话,则refreshSessions无效。
Access Control
如果部署强制执行身份验证/授权,则必须通过身份验证才能运行refreshSessions命令。
用户只能刷新属于该用户的会话。
See also