Websphere 6.1 JAAS注销

Websphere 6.1 JAAS注销,websphere,logout,jaas,Websphere,Logout,Jaas,我在WAS6.1上有一个Web应用程序,使用JAAS已经在运行。以有序的方式进行认证和授权。但我的注销页面并没有取消校长的授权。此应用程序在JBoss上正常工作,在Glasfish上正常工作,但在WAS上正常工作 我的注销页面只是一个包含此内容的简单JSP <%System.out.println("principal is not null:"+(null != request.getUserPrincipal())); if (null != request.getSession(f

我在WAS6.1上有一个Web应用程序,使用JAAS已经在运行。以有序的方式进行认证和授权。但我的注销页面并没有取消校长的授权。此应用程序在JBoss上正常工作,在Glasfish上正常工作,但在WAS上正常工作

我的注销页面只是一个包含此内容的简单JSP

<%System.out.println("principal is not null:"+(null != request.getUserPrincipal()));

if (null != request.getSession(false))
request.getSession(false).invalidate();
%><jsp:include page="/index.html" />


我错过什么了吗?我建议不要使用Webpshere中的任何特定API,但如果绝对需要,我会使用。

要成功注销此代码段,还需要:

try {
        com.ibm.websphere.security.WSSecurityHelper.revokeSSOCookies(request, response);
     } catch(Exception e) {
        // catch all possible exceptions if you want or handle them separately
        out.println("JAASLogoutServlet: logout Exception = " + e.getMessage());
        throw new ServletException(e);
}

IBM还实现了一个名为IBM_security_logout的表单。我一直在WebSphere7.0上使用它,但它存在于以前的版本中。您可以在我对问题的回答中找到更多详细信息:

在WebSphere 8.5.5(也可能在旧版本中)上,您可以设置自定义属性

安全->全局安全->自定义属性

com.ibm.ws.security.web.logoutOnHTTPSessionExpire=true