POST /v1/account-recovery/confirmations
Replace a password with a delivered recovery link
说明(契约原文)
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.
参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
Idempotency-Key | header | string | 是 | Stable key for this operation and payload. Reusing a key with different input returns account_recovery_idempotency_conflict. |
请求体
application/json · 必填:是
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
token | string | 是 | Opaque 32-byte URL-safe unpadded recovery token. |
recovery_context | string | 是 | Opaque signed v1 recovery context. Clients must not parse or generate it. |
new_password | string(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_password | string(password) | 是 | Must exactly match new_password and is subject to the same password policy. |
响应
| 状态码 | 说明 |
|---|---|
204 | Password replaced and all refresh sessions revoked, or an exact idempotent replay. |
400 | Stable public error without a raw service message or sensitive input. |
408 | Stable public error without a raw service message or sensitive input. |
409 | Stable public error without a raw service message or sensitive input. |
422 | Stable public error without a raw service message or sensitive input. |
503 | Stable public error without a raw service message or sensitive input. |
504 | Stable public error without a raw service message or sensitive input. |
失败时怎么办
400按字段说明修正参数或请求体再发;不要原样重试。409先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。503依赖暂不可用:稍后用原 Idempotency-Key 重试。