[keycloak-user] AJAX(xhr) calls

Gregory Orciuch g.orciuch at gmail.com
Wed May 11 10:35:42 EDT 2016


Hi,

we do protect our app with the KeyCloak wildfly adapter. Generally it's jee
app + JSF (primefaces).

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).

>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

<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<partial-response>
  <redirect url="http://keycloak:8080/auth/..."></redirect>
</partial-response>

Is there a way to make KeyCloak aware of AJAX calls ? and not produce 302 ?
I could even contribute and write some code in order to support such
configuration. Just name the class where I should look for.

Cheers,
Gregory
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20160511/d90a4a66/attachment.html 


More information about the keycloak-user mailing list