cloud-foundry - 客户端凭据授予类型返回的令牌没有读取权限
问题描述
在我的应用程序中,我不想存储个人用户名和 paawordk。因此,我使用 client_id 和 client_secret 来获取令牌,授予类型使用客户端凭据。请参阅以下内容:
curl --request POST --url 'https://<url>/oauth/token' --header 'content-type: application/x-www-form-urlencoded' --data grant_type=client_credentials --data 'client_id=my client id' --data client_secret=my client secret
{"access_token":"eyJhbGci****************","token_type":"bearer","expires_in":43199,"scope":"uaa.none","jti":"226cd7d96f354e9c97ebaa3a25f30c40"}
令牌对应的范围是 uaa.none。cloud_controller.read 也不cloud_controller.write
包括在内。所以,我无法读取事件、应用程序等。
如何获取具有cloud_controller.read
范围的访问令牌?