我有一个在WAS6.1上使用JAAS的WebApplication已经可以工作了。有序地进行身份验证和授权。但我的注销页面并没有解除主体的授权。此应用程序在Glasfish上的JBoss an上可以正常工作,但在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,但如果绝对需要的话,我会这样做的。
发布于 2009-12-18 05:17:09
要成功注销,还需要以下代码片段:
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);
}发布于 2010-09-03 01:42:25
IBM还实现了一个名为ibm_security_logout的表单。我一直在websphere 7.0上使用它,但它在以前的版本中存在。你可以在我的问题的答案中找到更多细节:
发布于 2015-01-27 19:18:47
在WebSphere 8.5.5 (可能在旧版本中也是如此)上,您可以设置自定义属性。
Security ->全局安全性->自定义属性
com.ibm.ws.security.web.logoutOnHTTPSessionExpire=true https://stackoverflow.com/questions/1923986
复制相似问题