POST
/
api
/
auth
/
device
/
deny
在浏览器中拒绝一次 device 登录
curl --request POST \
  --url https://wfapi.yuhe.space/api/auth/device/deny \
  --header 'Content-Type: application/json' \
  --cookie workflow_auth_session= \
  --data '
{
  "userCode": "<string>"
}
'
{
  "errCode": 123,
  "errMessage": "<string>",
  "data": {
    "deviceCode": {
      "id": "<string>",
      "userCode": "<string>",
      "clientName": "<string>",
      "source": "<string>",
      "requestedScopes": [
        "<string>"
      ],
      "expiresAt": "2023-11-07T05:31:56Z",
      "intervalSeconds": 123,
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "requestedByIp": "<string>",
      "userAgent": "<string>",
      "approvedAt": "2023-11-07T05:31:56Z",
      "approvedByUserId": "<string>",
      "deniedAt": "2023-11-07T05:31:56Z",
      "consumedAt": "2023-11-07T05:31:56Z",
      "result": {
        "apiKeyId": "<string>",
        "user": {
          "userId": "<string>",
          "email": "jsmith@example.com",
          "displayName": "<string>"
        },
        "expiresAt": "2023-11-07T05:31:56Z"
      }
    }
  }
}

Authorizations

workflow_auth_session
string
cookie
required

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

Body

application/json
userCode
string
required

Response

请求被拒绝,轮询端会收到 access_denied

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