POST
/
api
/
auth
/
login
通过邮箱密码建立账号会话
curl --request POST \
  --url https://wfapi.yuhe.space/api/auth/login \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "jsmith@example.com",
  "password": "<string>"
}
'
{
  "errCode": 123,
  "errMessage": "<string>",
  "data": {
    "authenticated": true,
    "principal": {
      "userId": "<string>",
      "displayName": "<string>",
      "email": "jsmith@example.com",
      "permissions": [],
      "apiKeyId": "<string>",
      "roleNames": [
        "<string>"
      ]
    }
  }
}

Body

application/json
email
string<email>
required
password
string
required

Response

登录成功并写入 httpOnly cookie。

errCode
integer
required
errMessage
string
required
Allowed value: ""
data
object
required