<html><body><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><div>Hi Jerôme,</div><div>Since your application runs on Wildfy, you'll have to use the Keycloak-wildfly adapter.</div><div>Meissa</div><div><br></div><hr id="zwchr"><div style="color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>De: </b>"Jérôme Blanchard" <jayblanc@gmail.com><br><b>À: </b>keycloak-user@lists.jboss.org<br><b>Envoyé: </b>Mercredi 15 Avril 2015 12:08:55<br><b>Objet: </b>[keycloak-user] Which adapter must I use ?<br><div><br></div><div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div><div>Hi all,<br></div>I'm facing a problem regarding which adapter to use in my case : <br></div>I have an application which runs on wildfly.<br>It is packaged as an ear containing an EJB backend (jar) and a web application (war) that expose a REST API and a simple content browsing servlet.<br></div>Both of the rest api and the content servlet allows anonymous access and authentified access. The EJB layer takes in charge the access control usign internal rules system.<br></div>The authentication on the REST API using bearer token works fine as it is a javascript client that use it and the javascript adapter works fine.<br></div>What I want to do is to allow authentication on the content servlet in the following way : <br></div>1. A user ask some content using the content servlet /content/file.txt<br></div>2. Because anonymous and the file.txt is protect, EJB layer return an AccessDeniedException which is handled by the servlet to redirect the user browser to an specific jsp page saying that content is protected and giving a link to the keycloak server for eventual authentication.<br></div>3. The user follow this link to perform authentication and is redirected back to the content url /content/file1.txt<br></div>4. I don't know how but the browser should be able to include something (a cookie) that would holds the authentication token and allow the content servlet to act as authentified. <br></div>Because my current adapter just check a bearer token header I don't see which adapter to add, or how to handle authentication in another way allowing the client navigator to propagate authentication token ??<br></div>Thanks in advance for your support and congratulation for this very nice product that is keycloak.<br></div>Best regards, Jérôme.<br></div>
<br>_______________________________________________<br>keycloak-user mailing list<br>keycloak-user@lists.jboss.org<br>https://lists.jboss.org/mailman/listinfo/keycloak-user</div><div><br></div></div></body></html>