• Post Reply Bookmark Topic Watch Topic
  • New Topic

Springframework HTTP: Rest Client, The grant type was not specified in the request  RSS feed

 
Greenhorn
Posts: 2
Fedora Postgres Database Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



Hi guys need help, I'm having problem with "grant_type", it says {"error":"invalid_request","error_description":"The grant type was not specified in the request"}.

---------------------------------------------------------------------------------------------------------------------------------output-----------------------------------------------------------------------
14:37:57.849 [main] INFO com.processmaker.oauth2.details.Oauth2Config - Request access token

{Accept=[application/json], Content-Type=[application/x-www-form-urlencoded], Authorization=[Basic eC1wbS1sb2NhbC1jbGllbnQ6MTc5YWQ0NWM2Y2UyY2I5N2NmMTAyOWUyMTIwNDZlODE=]}
14:37:58.154 [main] DEBUG org.springframework.web.client.RestTemplate - Created POST request for "http://192.168.56.13/dfademo/oauth2/token?grant_type=password&username=admin&passwor[color=red] d=admin[/color]"
14:37:58.156 [main] DEBUG org.springframework.web.client.RestTemplate - Setting request Accept header to [text/plain, application/xml, text/xml, application/json, application/*+xml, application/*+json, */*]
14:37:58.439 [main] DEBUG org.springframework.web.client.RestTemplate - POST request for "http://192.168.56.13/dfademo/oauth2/token?grant_type=password&username=admin&password=admin" resulted in 400 (Bad Request); invoking error handler
14:37:58.443 [main] ERROR com.processmaker.oauth2.details.Oauth2Config - 400
14:37:58.443 [main] ERROR com.processmaker.oauth2.details.Oauth2Config - 400 Bad Request
14:37:58.443 [main] ERROR com.processmaker.oauth2.details.Oauth2Config - {"error":"invalid_request","error_description":"The grant type was not specified in the request"}
14:37:58.443 [main] INFO com.processmaker.oauth2.details.Oauth2Config - Content-type = application/json
14:37:58.443 [main] INFO com.processmaker.oauth2.details.Oauth2Config - Authorization = null
14:37:58.443 [main] INFO com.processmaker.oauth2.details.Oauth2Config - grant_type = null

The Authorization is null and Grant_type is also null, but i already specify it in the POST request...

Best Regards
stackoverflow.PNG
[Thumbnail for stackoverflow.PNG]
 
Pay attention! Tiny ad!
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!