diff --git a/core/src/main/java/org/keycloak/representations/adapters/action/LogoutAction.java b/core/src/main/java/org/keycloak/representations/adapters/action/LogoutAction.java index 35576bdc16..6b73234b38 100755 --- a/core/src/main/java/org/keycloak/representations/adapters/action/LogoutAction.java +++ b/core/src/main/java/org/keycloak/representations/adapters/action/LogoutAction.java @@ -15,6 +15,7 @@ public class LogoutAction extends AdminAction { public LogoutAction(String id, int expiration, String resource, String user, int notBefore) { super(id, expiration, resource, LOGOUT); this.user = user; + this.notBefore = notBefore; } public String getUser() { diff --git a/services/src/main/java/org/keycloak/services/managers/ResourceAdminManager.java b/services/src/main/java/org/keycloak/services/managers/ResourceAdminManager.java index 942def012a..48600fd990 100755 --- a/services/src/main/java/org/keycloak/services/managers/ResourceAdminManager.java +++ b/services/src/main/java/org/keycloak/services/managers/ResourceAdminManager.java @@ -195,7 +195,7 @@ public class ResourceAdminManager { String token = new TokenManager().encodeToken(realm, adminAction); logger.infov("logout user: {0} resource: {1} url: {2}", user, resource.getName(), managementUrl); ClientRequest request = client.createRequest(UriBuilder.fromUri(managementUrl).path(AdapterConstants.K_LOGOUT).build().toString()); - ClientResponse response = null; + ClientResponse response; try { response = request.body(MediaType.TEXT_PLAIN_TYPE, token).post(UserStats.class); } catch (Exception e) {