| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v3-password-resets-token.yaml
- get:
- summary: 查看一次待完成的重置
- tags:
- - password-resets
- operationId: get_api_v3_password_resets_token_
- description: |-
- 重置页用它显示「正在为哪个账号设置新密码」。token 不存在或已过期一律 404。
- 实现:`V3\PasswordResetController@show`
- security:
- - { }
- -
- bearerAuth: []
- parameters:
- -
- name: token
- in: path
- required: true
- schema:
- type: string
- description: '邮件链接里的 token'
- responses:
- 200:
- description: 成功
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- type: object
- properties:
- username:
- type: string
- expires_at:
- type: string
- 404:
- description: 'token 无效或已过期'
- content:
- application/problem+json:
- schema:
- $ref: '../../main.yaml#/components/schemas/ProblemDetails'
- 422:
- $ref: '../../main.yaml#/components/responses/ProblemValidation'
- patch:
- summary: 设置新密码
- tags:
- - password-resets
- operationId: patch_api_v3_password_resets_token_
- description: |-
- 成功后 token 作废,返回 204 空体;之后用新密码走登录。
- 实现:`V3\PasswordResetController@update`
- security:
- - { }
- -
- bearerAuth: []
- parameters:
- -
- name: token
- in: path
- required: true
- schema:
- type: string
- description: '邮件链接里的 token'
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- password:
- type: string
- description: '新密码,6–32 位'
- password_confirmation:
- type: string
- description: 再输一次新密码
- required:
- - password
- - password_confirmation
- responses:
- 204:
- description: 已重置,无响应体
- 404:
- description: 'token 无效或已过期'
- content:
- application/problem+json:
- schema:
- $ref: '../../main.yaml#/components/schemas/ProblemDetails'
- 422:
- $ref: '../../main.yaml#/components/responses/ProblemValidation'
|