Postman oAuth2 错误未授权授权类型
Postman oAuth2 error Unauthorized grant type
我有一个使用 oAuth2 的应用程序,我尝试使用此命令从终端请求访问令牌
curl -X POST -vu clientapp:123456 http://localhost:8080/oauth/token -H "Accept: application/json" -d "password=spring&username=roy&grant_type=password&scope=read%20write&client_secret=123456&client_id=clientapp"
它工作正常,我收到这样的回复
{"access_token":"29c4c218-1d9a-4d2d-abe3-197bc2969679","token_type":"bearer","refresh_token":"6b7ffda7-4652-4197-b8e9-c80635eb9143","expires_in":38630,"scope":"read write"}
但问题是当我尝试通过邮递员请求访问令牌时总是出现此错误:
Handling error: InvalidClientException, Unauthorized grant type: client_credentials
如何像通过 curl 命令获取令牌一样通过邮递员获取访问令牌?
我有一个使用 oAuth2 的应用程序,我尝试使用此命令从终端请求访问令牌
curl -X POST -vu clientapp:123456 http://localhost:8080/oauth/token -H "Accept: application/json" -d "password=spring&username=roy&grant_type=password&scope=read%20write&client_secret=123456&client_id=clientapp"
它工作正常,我收到这样的回复
{"access_token":"29c4c218-1d9a-4d2d-abe3-197bc2969679","token_type":"bearer","refresh_token":"6b7ffda7-4652-4197-b8e9-c80635eb9143","expires_in":38630,"scope":"read write"}
但问题是当我尝试通过邮递员请求访问令牌时总是出现此错误:
Handling error: InvalidClientException, Unauthorized grant type: client_credentials
如何像通过 curl 命令获取令牌一样通过邮递员获取访问令牌?