方法路径摘要认证
POST/v1/account-recovery/confirmationsReplace a password with a delivered recovery link无需认证
POST/v1/account-recovery/requestsRequest a password recovery link无需认证

契约文件:api/account-recovery.openapi.yaml

接口详情

POST /v1/account-recovery/confirmations

Replace a password with a delivered recovery link

operationId
confirmAccountRecovery
认证
  • 无需认证。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

recovery_context is an opaque server-signed value bound to the token, tenant, scope, challenge, and expiry. The server verifies it before invoking the password reset CAS. Tampered, cross-token, expired, revoked, consumed, and unknown links fail closed. Authorization and API-key headers are ignored.

参数

confirmAccountRecovery 参数
名称位置类型必填说明
Idempotency-Keyheaderstring是Stable key for this operation and payload. Reusing a key with different input returns account_recovery_idempotency_conflict.

请求体

application/json · 必填:是

confirmAccountRecovery 请求体
名称类型必填说明
tokenstring是Opaque 32-byte URL-safe unpadded recovery token.
recovery_contextstring是Opaque signed v1 recovery context. Clients must not parse or generate it.
new_passwordstring(password)是New password; 8 to 1024 printable ASCII characters (no space) with at least two of upper case, lower case, digits and symbols; otherwise password_policy_unmet.
confirm_passwordstring(password)是Must exactly match new_password and is subject to the same password policy.

响应

confirmAccountRecovery 响应
状态码说明
204Password replaced and all refresh sessions revoked, or an exact idempotent replay.
400Stable public error without a raw service message or sensitive input.
408Stable public error without a raw service message or sensitive input.
409Stable public error without a raw service message or sensitive input.
422Stable public error without a raw service message or sensitive input.
503Stable public error without a raw service message or sensitive input.
504Stable public error without a raw service message or sensitive input.

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。
  • 503 依赖暂不可用:稍后用原 Idempotency-Key 重试。

↑ 回到列表

POST /v1/account-recovery/requests

Request a password recovery link

operationId
requestAccountRecovery
认证
  • 无需认证。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Always returns the same 202 representation for an existing active account, an unknown username, a disabled account, or a suspended membership. No response field reports account existence, identity, challenge, token, expiry, channel, or delivery state. Authorization and API-key headers are ignored. JSON is limited to the configured 8 KiB default; duplicate or unknown fields, media type parameters, and trailing values are rejected.

参数

requestAccountRecovery 参数
名称位置类型必填说明
Idempotency-Keyheaderstring是Stable key for this operation and payload. Reusing a key with different input returns account_recovery_idempotency_conflict.

请求体

application/json · 必填:是

requestAccountRecovery 请求体
名称类型必填说明
usernamestring是Username only. The handler trims surrounding whitespace and enforces 1 to 1024 UTF-8 bytes. Email and phone lookup are not part of this contract.

响应

requestAccountRecovery 响应
状态码说明
202Uniform recovery request acceptance response.

字段:data: object

400Stable public error without a raw service message or sensitive input.
408Stable public error without a raw service message or sensitive input.
409Stable public error without a raw service message or sensitive input.
429Stable recovery rate-limit response without identifying the limiting dimension.
503Stable public error without a raw service message or sensitive input.
504Stable public error without a raw service message or sensitive input.

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。
  • 429 被限速:等待后再试,降低并发。
  • 503 依赖暂不可用:稍后用原 Idempotency-Key 重试。

↑ 回到列表