• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

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]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!