GET
/
api
/
auth
/
me
读取当前账号资料
curl --request GET \
  --url https://wfapi.yuhe.space/api/auth/me \
  --cookie workflow_auth_session=
{
  "errCode": 123,
  "errMessage": "<string>",
  "data": {
    "profile": {
      "userId": "<string>",
      "email": "jsmith@example.com",
      "displayName": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "roleIds": [
        "<string>"
      ],
      "roleNames": [
        "<string>"
      ],
      "permissions": [],
      "avatarUrl": "<string>",
      "createdByUserId": "<string>",
      "lastLoginAt": "2023-11-07T05:31:56Z"
    },
    "principal": {
      "userId": "<string>",
      "displayName": "<string>",
      "email": "jsmith@example.com",
      "permissions": [],
      "apiKeyId": "<string>",
      "roleNames": [
        "<string>"
      ]
    }
  }
}

Authorizations

workflow_auth_session
string
cookie
required

通过密码登录或管理员密钥登录建立的 httpOnly 浏览器会话。

Response

返回当前 principal 以及用户资料;管理员密钥登录时 profilenull

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