8.4.2.2. 创建用户管理的资源
默认情况下,通过保护 API 创建的资源无法通过 用户帐户服务 来管理资源 所有者。
要创建资源并允许资源所有者管理这些资源,您必须按照如下所示设置 ownerManagedAccess 属性:
curl -v -X POST \
http://${host}:${port}/auth/realms/${realm_name}/authz/protection/resource_set \
-H 'Authorization: Bearer '$pat \
-H 'Content-Type: application/json' \
-d '{
"name":"Alice Resource",
"owner": "alice",
"ownerManagedAccess": true
}'