Keycloak Missing form parameter: grant_type

前端 未结 6 1776
攒了一身酷
攒了一身酷 2021-02-05 00:51

I have keycloak standalone running on my local machine.

I created new realm called \'spring-test\', then new client called \'login-app\'

According to the rest docu

6条回答
  •  忘了有多久
    2021-02-05 01:37

    Here's a sample CURL command

    curl -X POST \
      http://localhost:8080/auth/realms/your_realm_name/protocol/openid-connect/token \
      -H 'Accept: */*' \
      -H 'Accept-Encoding: gzip, deflate' \
      -H 'Cache-Control: no-cache' \
      -H 'Connection: keep-alive' \
      -H 'Content-Length: 69' \
      -H 'Content-Type: application/x-www-form-urlencoded' \
      -H 'Cookie: KC_RESTART=' \
      -H 'Host: localhost:8080' \
      -H 'Postman-Token: 88f38aa0-8659-4b37-a2aa-d6b92177bdc2,29c4e7db-51f4-48d1-b6d5-daab06b68ab4' \
      -H 'User-Agent: PostmanRuntime/7.20.1' \
      -H 'cache-control: no-cache' \
      -d 'client_id=my-app&username=admin&password=admin123&grant_type=password'
    

提交回复
热议问题