org.springframework.security.oauth2.common.exceptions.InvalidGrantException: Bad credentials

不羁的心 提交于 2019-12-06 21:38:29

I cannot see your Postman and your client's request information. If you can make request by Postman, then your back-end code should be fine. Normally, "Bad credentials" exception happens when the username or password is incorrect. I suggest you double check the client's request headers and parameters comparing with the Postman.

From your edit, those two requests are not calling same API. The curl command requested access token, but your client requested "execute" API.

However, I found you did not add "Authorization" header in your client request. Your client should add this header to authorize itself. Authorization header value should be:

Bearer access_token (replace access_token with the one you get from oauth/token request)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!