auth

Change Password

修改当前登录用户的密码。

成功后返回一张全新的 JWT(原 JWT 因 password_version 递增而失效), 前端应立刻用返回的新 token 替换本地存储的旧 token。 同一用户在其他设备上的所有旧 JWT 都会在下一次请求时变成 401。

post/api/auth/change-password

Request

  • Base URL: https://fojin.app (the document declares no server; this is the origin it was published from)
  • URL: https://fojin.app/api/auth/change-password
  • Auth: HTTP bearer

Request body

old_passwordstring required
new_passwordstring required

Response

Successful Response

access_tokenstring required
token_typestring

Changes