8.4.2.5. 查询资源
要根据 id 查询资源,请按如下所示发送 HTTP GET 请求:
http://${host}:${port}/auth/realms/${realm_name}/authz/protection/resource_set/{resource_id}
http://${host}:${port}/auth/realms/${realm_name}/authz/protection/resource_set/{resource_id}
要查询 名称 的资源,请按如下所示发送 HTTP GET 请求:
http://${host}:${port}/auth/realms/${realm_name}/authz/protection/resource_set?name=Alice Resource
http://${host}:${port}/auth/realms/${realm_name}/authz/protection/resource_set?name=Alice Resource
要查询一个 uri 的资源,请按如下所示发送 HTTP GET 请求:
http://${host}:${port}/auth/realms/${realm_name}/authz/protection/resource_set?uri=/api/alice
http://${host}:${port}/auth/realms/${realm_name}/authz/protection/resource_set?uri=/api/alice
要查询一个 所有者 的资源,请按如下所示发送 HTTP GET 请求:
http://${host}:${port}/auth/realms/${realm_name}/authz/protection/resource_set?owner=alice
http://${host}:${port}/auth/realms/${realm_name}/authz/protection/resource_set?owner=alice
要查询某个 类型的资源,请按如下所示发送 HTTP GET 请求:
http://${host}:${port}/auth/realms/${realm_name}/authz/protection/resource_set?type=albums
http://${host}:${port}/auth/realms/${realm_name}/authz/protection/resource_set?type=albums
要查询 范围 的资源,请按如下所示发送 HTTP GET 请求:
http://${host}:${port}/auth/realms/${realm_name}/authz/protection/resource_set?scope=read
http://${host}:${port}/auth/realms/${realm_name}/authz/protection/resource_set?scope=read
查询服务器以获取权限时,使用 前 和 最大 结果的参数来限制结果。