karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ldywi...@apache.org
Subject svn commit: r1165239 - /karaf/sandbox/webconsole/trunk/core/src/main/java/org/apache/karaf/webconsole/core/page/SecuredPage.java
Date Mon, 05 Sep 2011 11:06:03 GMT
Author: ldywicki
Date: Mon Sep  5 11:06:03 2011
New Revision: 1165239

URL: http://svn.apache.org/viewvc?rev=1165239&view=rev
Log:
Sending redirect after session destroy

Modified:
    karaf/sandbox/webconsole/trunk/core/src/main/java/org/apache/karaf/webconsole/core/page/SecuredPage.java

Modified: karaf/sandbox/webconsole/trunk/core/src/main/java/org/apache/karaf/webconsole/core/page/SecuredPage.java
URL: http://svn.apache.org/viewvc/karaf/sandbox/webconsole/trunk/core/src/main/java/org/apache/karaf/webconsole/core/page/SecuredPage.java?rev=1165239&r1=1165238&r2=1165239&view=diff
==============================================================================
--- karaf/sandbox/webconsole/trunk/core/src/main/java/org/apache/karaf/webconsole/core/page/SecuredPage.java
(original)
+++ karaf/sandbox/webconsole/trunk/core/src/main/java/org/apache/karaf/webconsole/core/page/SecuredPage.java
Mon Sep  5 11:06:03 2011
@@ -21,8 +21,7 @@ import java.util.List;
 import org.apache.karaf.webconsole.core.BasePage;
 import org.apache.karaf.webconsole.core.navigation.ConsoleTabProvider;
 import org.apache.karaf.webconsole.core.navigation.markup.NavigationPanel;
-import org.apache.wicket.RequestCycle;
-import org.apache.wicket.authentication.AuthenticatedWebSession;
+import org.apache.wicket.Session;
 import org.apache.wicket.authorization.strategies.role.annotations.AuthorizeInstantiation;
 import org.apache.wicket.markup.html.link.Link;
 import org.apache.wicket.markup.html.panel.FeedbackPanel;
@@ -48,8 +47,9 @@ public class SecuredPage extends BasePag
         add(new Link<Void>("logoutLink") {
             @Override
             public void onClick() {
-                AuthenticatedWebSession.get().invalidateNow();
-                RequestCycle.get().setResponsePage(LoginPage.class);
+                Session.get().invalidateNow();
+                getRequestCycle().setRedirect(true);
+                setResponsePage(LoginPage.class);
             }
         });
     }



Mime
View raw message