Trying to log in to Keycloak Admin WS

橙三吉。 提交于 2019-12-04 05:36:12

Do a POST request to https://hostname:8080/auth/realms/master/protocol/openid-connect/token

Sets the Content-Type to application/x-www-form-urlencoded

and put the following in the body:

username=<username>&password=<password>&client_id=admin-cli&grant_type=password

This will do the trick for you. Do a post on

URI - /auth/realms/master/protocol/openid-connect/token

with Headers as below

  1. username=<admin username>
  2. password=<admin password>
  3. client_id=security-admin-console
  4. grant_type=password
  5. Content-Type=application/x-www-form-urlencoded

This will return you a JSON, with access_token in it. Take the token and use it as the Authorization Bearer Token in your request. It should work.

Let me know if you face any issue.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!