Spring Oauth2.0缺少授权类型
我正在使用Spring Oauth 2.O.
当我将请求作为表单数据传递时,它工作正常,但是当我尝试以application/json
格式传递数据时,它会让我错误地忽略授权类型。
请求
http://localhost:8080/oauth/token {"username":"parths","password":"123456","grant_type":"password"}
我得到的错误。
{ "status": "0", "message": "Missing grant type" }
请指南。
OAuth2
在访问令牌请求中不支持JSON
。您可以在此处查看说明 ..它需要application/x-www-form-urlencoded