设置用户刷新令牌到期时间

PUT /groups/{groupId}/apps/{appId}/security/refresh_token_expiration

设置用户会话刷新令牌的过期时间(以秒为单位)。

路径参数

application/json

body 必需

  • expiration_time_seconds 数字

    用户会话刷新令牌在颁发后的有效时间(以秒为单位)。在此时间之后,令牌将过期,用户必须重新进行身份验证。

    到期时间必须介于 30 分钟到 5 年之间(含)。默认过期时间为 60 天。

    最小值为 1800,最大值为 15552000。默认值为 5184000

响应

  • 204

    过期时间已更新

  • 400

    过期时间无效

  • 404

    未找到群组或应用

PUT /groups/{groupId}/apps/{appId}/security/refresh_token_expiration
curl \
 --request PUT 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/security/refresh_token_expiration' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"expiration_time_seconds":5184000}'
请求示例
{
  "expiration_time_seconds": 5184000
}