rajithd / spring-boot-oauth2

Spring Boot Oauth2 with H2 database
208 stars 165 forks source link

Missing grant type #15

Closed ppavan895 closed 7 years ago

ppavan895 commented 7 years ago

Hi,

I am getting below error while giving curl cmd .. .curl -vu rajithapp:secret 'http://localhost:9191/api/oauth/token username=admin&password=admin&grant_type=password'

INFO 7804 --- [nio-9191-exec-4] o.s.s.o.provider.endpoint.TokenEndpoint : Handling error: InvalidRequestException, Missing grant type

error

please help me.

manojci commented 7 years ago

@ppavan895 use double quotes. it should work curl -vu rajithapp:secret "http://localhost:9191/api/oauth/token username=admin&password=admin&grant_type=password"

ppavan895 commented 7 years ago

Thanks Manojci .... its working