如何从Java EE容器管理的安全性中注销? [英] How do I logout from Java EE container managed security?
本文介绍了如何从Java EE容器管理的安全性中注销?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用Websphere 7.0.我使用来自应用程序服务器的安全性.我想删除与用户的关联,因此在访问安全资源之前,用户将被重定向到登录页面(并且request.getUserPrincipal()返回null).
I am working in websphere 7.0. I use the security from the application server. I would like to removing the association with the user, so user is redirected to the login page before accessing a secure resource (and request.getUserPrincipal() returns null).
我尝试:
request.getSession().invalidate();
request.getSession().invalidate();
但是用户主体仍然关联.
but the user principal is still associated.
如何删除该关联?
推荐答案
在Websphere上,必须使用特殊的注销表单调用:
On websphere, a special logout form calles must be used :
<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>
这篇关于如何从Java EE容器管理的安全性中注销?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文