<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">For Tomcat adapter, you don't need
KEYCLOAK authentication type in web.xml, but BASIC should be
sufficient. Does it work with BASIC and without your step 3
(Changing catalina.jar) ?<br>
<br>
Marek<br>
<br>
On 18.3.2015 10:00, Kalinga Dissanayake wrote:<br>
</div>
<blockquote cite="mid:1426669246.859226667@apps.rackspace.com"
type="cite"><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": <a class="moz-txt-link-rfc2396E" href="http://localhost:8080/auth">"http://localhost:8080/auth"</a>,<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>
<a class="moz-txt-link-rfc2396E" href="http://java.sun.com/dtd/web-app_2_3.dtd">"http://java.sun.com/dtd/web-app_2_3.dtd"</a> ><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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
keycloak-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/keycloak-user">https://lists.jboss.org/mailman/listinfo/keycloak-user</a></pre>
</blockquote>
<br>
</body>
</html>