在所有设备登出
OpenAPI 契约
- 方法
- POST
- 路径
/api/v1/auth/logout-all- 认证
- jwtBearer (bearer)
- 响应状态
- 200 400 401 403 429 500
请求与响应 Schema
JSON
{
"requestBody": {},
"responses": {
"200": {
"description": "All sessions ended",
"content": {
"application/json": {}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"$ref": "#/components/schemas/RequestError"
}
}
},
"401": {
"description": "Authentication required or invalid",
"content": {
"application/json": {
"$ref": "#/components/schemas/SecurityError"
}
}
},
"403": {
"description": "Authenticated but not permitted",
"content": {
"application/json": {
"$ref": "#/components/schemas/SecurityError"
}
}
},
"429": {
"description": "Rate limit exceeded",
"content": {
"application/json": {
"$ref": "#/components/schemas/SecurityError"
}
}
},
"500": {
"description": "Unexpected server error",
"content": {
"application/json": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
}POST /api/v1/auth/logout-all 仅限 JWT,且没有请求体。它通过增加账户的令牌版本撤销该账户所有会话,然后确认所有会话已撤销。
nfy_ 自动化密钥不能调用此接口。成功后应将当前访问令牌视为无效,并移除所有本地会话令牌。缺少或无效的 JWT 认证会被拒绝。
http
POST /api/v1/auth/logout-all
Authorization: Bearer <access token>