That's not the right approach to get a token for the admin rest api from
CLI.
Take a look at:
Hi,
I installed a new keycloak setup using kubernetes, helm charts
helm install codecentric/keycloak
Now when I try to login through the web interface, I am able to login to
the keycloak setup using a `keycloak` user and an auto-generated password
(say `TsIeWcqrig2YIs`). However, when I repeat the same authenticate
request using curl, I get the a HTTP 400 with the following error message
in the keycloak logs:
The curl command that I use is:
```
curl -X POST -k -v -d "username=keycloak&password=TsIeWcqrig2YIs"
https://example.com/auth/realms/master/login-actions/authenticate\?sessio...
```
I have tried logging in without the url parameters too and get the same
error. I got these url params from the web client when it logged in via the
front end. Is there something I am doing wrong ?
The reason why I want to do the API based login, is because, I want to add
an user and set the password for that user, after my keycloak pod is
installed. I could not find a reliable way to do this. Any pointers on how
to do this ?
Thanks.
--
Sankar P
http://psankar.blogspot.com
_______________________________________________
keycloak-user mailing list
keycloak-user(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-user