[keycloak-user] Send additional parameter on keycloak login

Vignesh S vignesh at dataphilabs.com
Tue Sep 25 02:07:52 EDT 2018


Hello All,

After having received so many good reviews about Keycloak, We are
implementing Keycloak as the access management system to our client
organization. Thanks to all the contributors.

I am stuck in getting the login complete with the User Federation SPI. I am
in need of sending an additional parameter from the client during login
which I wanted to be available in the User Federation layer. So that based
on that parameter, I shall make an appropriate request to our legacy system
for validating the password.

Currently, I do this,

curl -X POST \
  http://localhost:8080/auth/realms/<realm-name>/protocol/openid-connect/token
\
  -H 'Accept: application/json' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d
'username=<username>&password=<password>&grant_type=password&client_id=<client-id>'

How can I add one another custom param to the body and make it available in
the federation layer before making the login request to the legacy system?

Any help will be much appreciated.

Thanks,
Vignesh


More information about the keycloak-user mailing list