<div dir="ltr">Hi,<div><br></div><div>we do protect our app with the KeyCloak wildfly adapter. Generally it&#39;s jee app + JSF (primefaces).</div><div><br></div><div>The case is, when SSO session is expired, the user on the webpage can still try to make AJAX call to JSF application. In same time, adapter intercepts and wants the request to go to keycloack page for redirection to relogin (http 302).</div><div><br></div><div>From what I read, ajax does not well support the 302 response and in order to make browser to really redirect response should contain an XML with something like</div><div><br></div><div><div>&lt;?xml version=\&quot;1.0\&quot; encoding=\&quot;UTF-8\&quot;?&gt;</div><div>&lt;partial-response&gt;</div><div>  &lt;redirect url=&quot;<a href="http://keycloak:8080/auth/..">http://keycloak:8080/auth/..</a>.&quot;&gt;&lt;/redirect&gt;</div><div>&lt;/partial-response&gt;</div></div><div><br></div><div>Is there a way to make KeyCloak aware of AJAX calls ? and not produce 302 ?</div><div>I could even contribute and write some code in order to support such configuration. Just name the class where I should look for.</div><div><br></div><div>Cheers, </div><div>Gregory</div></div>