POST/api/v1/auth/attempt/reset作废当前登录尝试并重新开始

用户换登录方式或放弃时调用:作废所携尝试工单,下次因素验证时懒创建全新尝试。

Request

Headers

NameData TypeRequiredDescription
Content-TypestringYes请求体内容类型(默认值 "application/json")
type RequestHeaders = {
  /** 请求体内容类型,默认值 "application/json" */
  Content-Type: string
}
{
  "Content-Type": "application/json"
}

Body

NameData TypeRequiredDescription
attemptTicketstringYes要作废的尝试工单
type RequestBody = {
  /** 要作废的尝试工单 */
  attemptTicket: string
}
{
  "attemptTicket": "atk_9f2c7be14d0a53e8"
}

Response

Body

result type: null

HTTP Code

HTTP Status Meaning Notes
200 成功 尝试已作废
400 工单无效 工单不存在或已过期(此时无需重置)

Response Code

响应使用统一信封 {id, code, messages, result},其 code 字段:

code Meaning Notes
0 成功 工单已消费作废
2007 尝试工单无效 工单不存在或已过期

Examples

POST /api/v1/auth/attempt/reset
Content-Type: application/json

{
  "attemptTicket": "atk_9f2c7be14d0a53e8"
}
{
  "id": "01JD8SH7U2N9M3Z2",
  "code": 0,
  "messages": [],
  "result": null
}

Remarks

已作废的尝试记录仍保留在历史中(含环境指纹与已验因素),供管理端检索。