| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v3-password-resets.yaml
- post:
- summary: 申请重置密码(发邮件)
- tags:
- - password-resets
- operationId: post_api_v3_password_resets
- description: |-
- 无论邮箱是否注册都返回 204,不泄露账号是否存在。邮件是同步发出的,
- 返回时已经发完,所以是 204 而不是 202。邮件里的链接指向
- dashboard-v6 的 `/anonymous/reset-password/{token}`,60 分钟内有效。
- 按 IP 与邮箱限流,超出返回 429。
- 实现:`V3\PasswordResetController@store`
- security:
- - { }
- -
- bearerAuth: []
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- email:
- type: string
- description: 账号邮箱
- example: someone@example.com
- lang:
- type: string
- description: '邮件语言,没有对应模板的回落 en'
- enum:
- - en
- - en-US
- - zh-Hans
- - zh-Hant
- required:
- - email
- responses:
- 204:
- description: 已发送(或邮箱未注册),无响应体
- 422:
- $ref: '../../main.yaml#/components/responses/ProblemValidation'
- 429:
- description: 请求过于频繁
- content:
- application/problem+json:
- schema:
- $ref: '../../main.yaml#/components/schemas/ProblemDetails'
- 503:
- description: 邮件发送失败
- content:
- application/problem+json:
- schema:
- $ref: '../../main.yaml#/components/schemas/ProblemDetails'
|