跳到主要内容

Token

Definition

token.json
{
"id": 0,
"userID": 0,
"accessToken": "",
"refreshToken": "",
"scope": "",
"code": "",
"codeChallenge": "",
"tokenType": "",
"expireAt": "",
"client": "",
"version": "",
"createdAt": "",
"updatedAt": "",
}

Get Tokens

curl -X GET "${baseUrl}/token/?filter=${filter}&orderBy=${orderBy}&page=${page}&pageSize=${pageSize}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Get Token

curl -X GET "${baseUrl}/token/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Apply Token.ID

curl -X POST "${baseUrl}/apply/token/id/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Create Token

curl -X POST "${baseUrl}/token/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @token.json
信息
token.json
{
"userID": 0,
"accessToken": "",
"refreshToken": "",
"scope": "",
"code": "",
"codeChallenge": "",
"tokenType": "",
"expireAt": "",
}
提示

success status: 201

Update Token

#!/bin/bash
curl -X PUT "${baseUrl}/token/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @token.json
信息
token.json
{
"userID": 0,
"accessToken": "",
"refreshToken": "",
"scope": "",
"code": "",
"codeChallenge": "",
"tokenType": "",
"expireAt": "",
}

Patch Token

curl -X PATCH "${baseUrl}/token/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Attrs: userID,accessToken,refreshToken,scope,code,codeChallenge,tokenType,expireAt" \
-d @token.json
信息
token.json
{
"userID": 0,
"accessToken": "",
"refreshToken": "",
"scope": "",
"code": "",
"codeChallenge": "",
"tokenType": "",
"expireAt": "",
}

Destroy Token

curl -X DELETE "${baseUrl}/token/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"