Authorization: Bearer ********************
{
"name": "订单API",
"identifier": "https://order.mydomain/api/v1/",
"scopes": [
{
"value": "read:orders",
"description": "读取订单"
},
{
"value": "update:orders",
"description": "更新订单"
},
{
"value": "create:orders",
"description": "创建订单"
},
{
"value": "delete:orders",
"description": "删除订单"
}
],
"allow_offline_access": true,
"skip_consent_for_verifiable_first_party_clients": true,
"token_lifetime": 86400,
"token_lifetime_for_web": 86400,
"enforce_policies": true
}
curl --location -g --request POST 'https://..authok.cn/api/v1/resource-servers' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "订单API",
"identifier": "https://order.mydomain/api/v1/",
"scopes": [
{
"value": "read:orders",
"description": "读取订单"
},
{
"value": "update:orders",
"description": "更新订单"
},
{
"value": "create:orders",
"description": "创建订单"
},
{
"value": "delete:orders",
"description": "删除订单"
}
],
"allow_offline_access": true,
"skip_consent_for_verifiable_first_party_clients": true,
"token_lifetime": 86400,
"token_lifetime_for_web": 86400,
"enforce_policies": true
}'
{
"id": "Z9t1bqKrBSuKAtKbtCcbWGXkb3NSb-Nl",
"name": "订单API",
"identifier": "https://order.mydomain/api/v1/",
"scopes": [
{
"value": "read:orders",
"description": "读取订单"
},
{
"value": "update:orders",
"description": "更新订单"
},
{
"value": "create:orders",
"description": "创建订单"
},
{
"value": "delete:orders",
"description": "删除订单"
}
],
"allow_offline_access": true,
"skip_consent_for_verifiable_first_party_clients": true,
"token_lifetime": 86400,
"token_lifetime_for_web": 86400,
"enforce_policies": true
}