refreshSessions

On this page本页内容

Definition定义

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> }, ... ] } )

Behavior行为

Session Identification会话标识

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无效。

Access Control访问控制

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.用户只能刷新属于该用户的会话。

Tip提示
See also: 参阅:
←  killSessionsstartSession →