<font face="arial" size="2"><p style="margin:0;padding:0;font-family: arial; font-size: 10pt; word-wrap: break-word;">I am in the process of trying out a few adapters supported by keycloak.</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; word-wrap: break-word;">Tried the tomcat adapter but im a getting a continuous redirect on the browser.</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; word-wrap: break-word;"> </p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; word-wrap: break-word;">I did the following;</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; word-wrap: break-word;">1/ Installed the adapter on tomcat</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; word-wrap: break-word;">2/ Installed all the libraries.</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; word-wrap: break-word;">3/ Changed catalina.jar to add an authentication type called KEYCLOAK</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; word-wrap: break-word;">4/ Added the context.xml to the client in META-INF</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; word-wrap: break-word;"> </p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; word-wrap: break-word;"><?xml version="1.0" encoding="UTF-8"?><br /><Context path="/sample" debug="0" privileged="true"><br /> <Valve className="org.keycloak.adapters.tomcat.KeycloakAuthenticatorValve" /><br /></Context></p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; word-wrap: break-word;"> </p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; word-wrap: break-word;">5/ Added the keycloak.json</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; word-wrap: break-word;">{<br />"realm": "demo",<br />"realm-public-key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC6pigvwuJUVfi9sEaZOj7txNfBwPAEt+0AIBSFHRzoWSxNAnznkwGV83qGK+Kc6GAMdlch87GeFzSZh76qC9GUlQ1WGOjbNA4YApnd9PmLvt1iBfe/3xkjIBeKEYmeA9mg3xn3eTosWmL1WIFzFy4NRbe09fAC1hZ5zazfjSDBtwIDAQAB",<br />"auth-server-url": "http://localhost:8080/auth",<br />"ssl-required": "external",<br />"resource": "customer-portal",<br />"public-client": true,<br />"use-resource-role-mappings": true<br />}</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; word-wrap: break-word;"> </p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; word-wrap: break-word;">6/ Changed web.xml</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; word-wrap: break-word;"><!DOCTYPE web-app PUBLIC<br /> "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"<br /> "http://java.sun.com/dtd/web-app_2_3.dtd" ><br /><br /><web-app><br /> <display-name>Archetype Created Web Application</display-name><br /><br /> <security-constraint><br /> <web-resource-collection><br /> <web-resource-name>sample</web-resource-name><br /> <url-pattern>/*</url-pattern><br /> </web-resource-collection><br /> <auth-constraint><br /> <role-name>user</role-name><br /> </auth-constraint><br /> </security-constraint><br /> <security-role><br /> <role-name>user</role-name><br /> </security-role><br /> <login-config><br /> <auth-method>KEYCLOAK</auth-method><br /> <realm-name>demo</realm-name><br /> </login-config><br /></web-app></p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; word-wrap: break-word;"> </p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; word-wrap: break-word;">The client app successfully redirects to the server url (keycloak) and I can login entering the creds. and it redirects back to the client, however the client goes into a loop.</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; word-wrap: break-word;">Should I do a change in the client to extract some details and save it in the session? Or will be the adapter handle this for me</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; word-wrap: break-word;"> </p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; word-wrap: break-word;">Kalinga</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; word-wrap: break-word;"> </p></font>