1

我在 websphere 7.0 中工作。我使用来自应用程序服务器的安全性。我想删除与用户的关联,因此在访问安全资源之前将用户重定向到登录页面(并且 request.getUserPrincipal() 返回 null)。

我尝试:

request.getSession().invalidate();

但用户主体仍然关联。

我怎样才能删除该关联?

4

1 回答 1

4

在 websphere 上,必须使用特殊的注销表单调用:

http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=/com.ibm.websphere.base.doc/info/aes/ae/tsec_pofolo.html

这是我正在使用的:

<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>
于 2010-09-02T16:43:41.760 回答