的Websphere 6.1 JAAS注销
题
我对WAS 6.1使用JAAS已经工作的WebApplication的。验证并以有序的方式授权。但我的注销页面是不是取消授权委托人。此应用程序正常工作在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" />
我缺少的东西?我preffer不使用任何特定的API从Webpshere但如果是绝对需要它,我会的。
解决方案
要成功地注销也需要此代码片断:
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形式。我一直在使用它在WebSphere 7.0,但在以前的版本存在。你可以找到更多的细节我回答我的问题:
在WebSphere 8.5.5(也许在旧版本中,太),您可以设置自定义属性。
安全 - >全局安全 - >自定义属性
com.ibm.ws.security.web.logoutOnHTTPSessionExpire=true
不隶属于 StackOverflow