ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mpapirkovs...@apache.org
Subject ambari git commit: AMBARI-14322. Some times (rarely) login page does not load when sign out. (Sandor Magyari via mpapirkovskyy)
Date Thu, 10 Dec 2015 17:52:48 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 9df68b978 -> 5ed67a090


AMBARI-14322. Some times (rarely) login page does not load when sign out. (Sandor Magyari
via mpapirkovskyy)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5ed67a09
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5ed67a09
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5ed67a09

Branch: refs/heads/trunk
Commit: 5ed67a0905031dca22445be814afc988f73e30d4
Parents: 9df68b9
Author: Myroslav Papirkovskyy <mpapyrkovskyy@hortonworks.com>
Authored: Thu Dec 10 19:52:11 2015 +0200
Committer: Myroslav Papirkovskyy <mpapyrkovskyy@hortonworks.com>
Committed: Thu Dec 10 19:52:11 2015 +0200

----------------------------------------------------------------------
 .../org/apache/ambari/server/api/services/LogoutService.java    | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/5ed67a09/ambari-server/src/main/java/org/apache/ambari/server/api/services/LogoutService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/LogoutService.java
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/LogoutService.java
index 62e9380..df8faaa 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/LogoutService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/LogoutService.java
@@ -19,9 +19,11 @@ package org.apache.ambari.server.api.services;
 
 import org.springframework.security.core.context.SecurityContextHolder;
 
+import javax.servlet.http.HttpServletRequest;
 import javax.ws.rs.GET;
 import javax.ws.rs.Path;
 import javax.ws.rs.Produces;
+import javax.ws.rs.core.Context;
 import javax.ws.rs.core.Response;
 
 /**
@@ -32,8 +34,9 @@ public class LogoutService {
 
   @GET
   @Produces("text/plain")
-  public Response performLogout() {
+  public Response performLogout(@Context HttpServletRequest servletRequest) {
     SecurityContextHolder.clearContext();
+    servletRequest.getSession().invalidate();
     return Response.status(Response.Status.OK).build();
   }
 


Mime
View raw message