Join us Sept 17 at .local NYC! Use code WEB50 to save 50% on tickets. Learn more >
MongoDB Event
Docs Menu
Docs Home
/
MongoDB Manual
/ / /

refreshSessions

refreshSessions

New in version 3.6.

The refreshSessions command updates the last use time for the specified sessions, thereby extending the active state of the sessions.

refreshSessions has the following syntax:

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

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

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. If the user has no session that match, the refreshSessions has no effect.

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

A user can only refresh sessions belonging to the user.

Tip

Back

killSessions

On this page