I'm using keycloak 3.4.3 Server and 3.4.3 springboot adapter. The login is done with the Java Adapter using the following json configurations:
{
"realm": "real name",
"auth-server-url": "http://172.21.34.65/auth",
"ssl-required": "external",
"resource": "appName",
"public-client": true,
"use-resource-role-mappings": true
}
The token is refreshed with non ajax calls but when the request contains the header X-Requested-With: XMLHttpRequest the token is not refreshed. Is there a problem with my config or is this the normal behavior and I need to use the JS adapter to refresh the token before the ajax calls?
For me an ugly solution was to embed an invisible self-reloading iframe that causes the token refresh. But that is the source of another problem: sometimes the redirect after logging into keycloak leads to the iframe url rather than the desired one. I haven't found a satisfying solution yet.