Definição
refreshSessionsThe
refreshSessionscommand updates the last use time for the specified sessions, thereby extending the active state of the sessions.
Compatibilidade
Esse comando está disponível em implantações hospedadas nos seguintes ambientes:
- MongoDB Atlas: The fully managed service for MongoDB deployments in the cloud
Observação
This command is supported in all MongoDB Atlas clusters. For information on Atlas support for all commands, see Unsupported Commands.
MongoDB Enterprise: a versão autogerenciada e baseada em assinatura do MongoDB
MongoDB Community: uma versão com código disponível, de uso gratuito e autogerenciada do MongoDB
Sintaxe
O comando tem a seguinte sintaxe:
db.runCommand( { refreshSessions: [ { id : <UUID> }, ... ] } )
To run refreshSessions, use the db.runCommand( { <command> } ) method.
db.runCommand( { refreshSessions: [ { id : <UUID> }, ... ] } )
Comportamento
Identificação da sessão
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.
Controle de acesso
If the deployment enforces authentication/authorization, you must be authenticated to run the refreshSessions command.
Um usuário só pode atualizar sessões que pertencem a ele.