Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring Oauth2.0 Missing grant type

I am using Spring Oauth 2.O.

When I pass request as a form-data it works fine, but when I try to pass data in application/json format it gives me error missing grant type.

Request

http://localhost:8080/oauth/token

{"username":"parths","password":"123456","grant_type":"password"}

Error I getting.

{
  "status": "0",
  "message": "Missing grant type"
}

Please Guide.

like image 568
Parth Solanki Avatar asked Sep 07 '16 09:09

Parth Solanki


1 Answers

OAuth2 doesn't support JSON in the access token request.You can check here for description..It requires application/x-www-form-urlencoded

like image 190
Prasanna Kumar H A Avatar answered Oct 16 '22 07:10

Prasanna Kumar H A