[KEYCLOAK-7798] - Spring security adapter does not renew expired tokens
This commit is contained in:
parent
00cee1d8cf
commit
234b7a06a1
1 changed files with 1 additions and 1 deletions
|
@ -63,7 +63,7 @@ public class KeycloakSecurityContextRequestFilter extends GenericFilterBean impl
|
||||||
RefreshableKeycloakSecurityContext refreshableSecurityContext = (RefreshableKeycloakSecurityContext) keycloakSecurityContext;
|
RefreshableKeycloakSecurityContext refreshableSecurityContext = (RefreshableKeycloakSecurityContext) keycloakSecurityContext;
|
||||||
KeycloakDeployment deployment = resolveDeployment(request, response);
|
KeycloakDeployment deployment = resolveDeployment(request, response);
|
||||||
|
|
||||||
if (deployment.isAlwaysRefreshToken()) {
|
if (!refreshableSecurityContext.isActive() || deployment.isAlwaysRefreshToken()) {
|
||||||
if (refreshableSecurityContext.refreshExpiredToken(false)) {
|
if (refreshableSecurityContext.refreshExpiredToken(false)) {
|
||||||
request.setAttribute(KeycloakSecurityContext.class.getName(), refreshableSecurityContext);
|
request.setAttribute(KeycloakSecurityContext.class.getName(), refreshableSecurityContext);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue