[keycloak-user] SAML Response Retrieval using Jsoup for Keycloak

Siddiq Syed siddiq_sa at yahoo.com
Sun Jun 2 15:50:21 EDT 2019


Hi .,
I am trying to retrieve SAML Assertion by invoking the URL() to get the AWS temporary credentials. 
I can do is successfully when trying to invoke it from the browser but when I am trying to invoke it programatically using Jsoup I am getting the below error.
"You took too long to login. Login process starting from beginning."

Here are the steps that I am following:
Invoking the URL http://testserver:8082/auth/realms/master/protocol/saml/clients/amazon-aws to get the Cookie(AUTH_SESSION_ID,KC_RESTART)  and get the URL 
http://testserver:8090/auth/realms/master/login-actions/authenticate?session_code=m-Mizx00Jjw9ClaNZ40J7MrQMMuAo7IGu8C7RIAZrr0&execution=3782c908-276a-454f-bc4d-39f7cfa210b8&client_id=urn%3Aamazon%3Awebservices&tab_id=ix8DWcw4yLE 
Once I get this I am invoking the Login-action url as show below by passing the username,password and the cookie to the request.
http://vmdcstestlemswsapp1.dcs.ga.gov:8090/auth/realms/master/login-actions/authenticate?session_code=m-Mizx00Jjw9ClaNZ40J7MrQMMuAo7IGu8C7RIAZrr0&execution=3782c908-276a-454f-bc4d-39f7cfa210b8&client_id=urn%3Aamazon%3Awebservices&tab_id=ix8DWcw4yLE

I am getting the error "You took too long to login. Login process starting from beginning."
The same steps works from the browser but when getting it from jsoup it is giving me the error.
Is there any setting that I am missing that I need to configure to retrieve SAML Response.

-Siddiq.,


More information about the keycloak-user mailing list