我在 websphere 7.0 中工作。我使用来自应用程序服务器的安全性。我想删除与用户的关联,因此在访问安全资源之前将用户重定向到登录页面(并且 request.getUserPrincipal() 返回 null)。
我尝试:
request.getSession().invalidate();
但用户主体仍然关联。
我怎样才能删除该关联?
在 websphere 上,必须使用特殊的注销表单调用:
这是我正在使用的:
<body onload="javascript:document.logout.submit()">
<h2>Sample Form Logout</h2>
<form METHOD=POST ACTION="ibm_security_logout" NAME="logout">
Click this button to log out:
<input type="submit" name="logout" value="Logout">
<INPUT TYPE="HIDDEN" name="logoutExitPage" VALUE="/some url">
</form>
</body>