[SYNCOPE-1318] The actual fix: in case of uncontrolled error, do proper logout
authorFrancesco Chicchiriccò <ilgrosso@apache.org>
Mon, 11 Jun 2018 07:13:06 +0000 (09:13 +0200)
committerFrancesco Chicchiriccò <ilgrosso@apache.org>
Mon, 11 Jun 2018 07:13:18 +0000 (09:13 +0200)
client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleRequestCycleListener.java
client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java

index 91e55e6..50c5748 100644 (file)
@@ -99,8 +99,7 @@ public class SyncopeConsoleRequestCycleListener extends AbstractRequestCycleList
 
         if (errorPage instanceof Login) {
             try {
-                SyncopeConsoleSession.get().cleanup();
-                SyncopeConsoleSession.get().invalidateNow();
+                SyncopeConsoleSession.get().invalidate();
             } catch (Throwable t) {
                 // ignore
                 LOG.debug("Unexpected error while forcing logout after error", t);
index fbc5628..568148c 100644 (file)
@@ -197,18 +197,6 @@ public class SyncopeConsoleSession extends AuthenticatedWebSession {
         super.invalidate();
     }
 
-    @Override
-    public void invalidateNow() {
-        if (getJWT() != null) {
-            if (client != null) {
-                client.logout();
-            }
-            cleanup();
-        }
-        executor.shutdown();
-        super.invalidateNow();
-    }
-
     public UserTO getSelfTO() {
         return selfTO;
     }