[关闭]
@fuyb1986 2017-05-18T06:54:44.000000Z 字数 868 阅读 562

找回密码

冰橙课件


找回密码

Method and URL Structure

Method Resource URL
GET /api/account/reset_password_request/

Request Paramaters

Name Descript Required Default
username 用户名 YES
key 图片验证码 YES
hashkey captcha hash key Yes

cURL Example

  1. curl -X GET -H 'Content-Type: application/json' http://localhost/api/account/reset_password_request/?username=15716098745&key=abcd&haskey=zcuq6z6pnwqirwuq49r9oe06tr5zxw6v

Response

  1. {
  2. "status": 0,
  3. "message": "",
  4. "reset_password": "true"
  5. }

重置密码

用收到的验证码重置密码,获取新的 token,其它登录token全部失效。

Method and URL Structure

Method Resource URL
POST /api/account/reset_password/

Request Data

Name Description Required Default
username 用户名 YES
password 密码 YES
verification_code 验证码 YES

Request

  1. {
  2. "username": "13245678910",
  3. "password": "AT4Fvk3N",
  4. "verfication_code": "617346"
  5. }

cURL Example

  1. curl -X PUT -H 'Content-Type: application/json' --data '{....}' http://localhost/api/account/reset_password/

Reponse

  1. {
  2. "token": "9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b"
  3. }
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注