refreshSessions

Definition

  • refreshSessions

New in version 3.6.

The refreshSessions command updates the last use timefor the specified sessions, thereby extending the active state ofthe sessions.

refreshSessions has the following syntax:

  1. { refreshSessions: [ { id : <UUID> }, ... ] } )

To run refreshSessions, use the db.runCommand( { <command> } ) method.

  1. db.runCommand( { refreshSessions: [ { id : <UUID> }, ... ] } )

Behavior

Session Identification

MongoDB concatenates each of the specified UUIDs with the hash of theauthenticated user credentials to identify the user’s sessions to refresh.If the user has no session that match, the refreshSessionshas no effect.

Access Control

If the deployment enforces authentication/authorization, you must beauthenticated to run the refreshSessions command.

A user can only refresh sessions belonging to the user.

See also