【问题标题】:Websphere 6.1 JAAS LogoutWebsphere 6.1 JAAS 注销
【发布时间】:2009-12-17 19:23:58
【问题描述】:

我有一个使用 JAAS 的 WAS 6.1 上的 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" />

我错过了什么吗?我宁愿不使用 Webpshere 的任何特定 API,但如果绝对需要,我会这样做。

【问题讨论】:

    标签: websphere logout jaas


    【解决方案1】:

    要成功注销,还需要此代码 sn-p:

    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);
    }
    

    【讨论】:

      【解决方案2】:

      IBM 还实现了一个名为 ibm_security_logout 的表单。我一直在 websphere 7.0 上使用它,但它存在于以前的版本中。您可以找到更多详细信息我对我的问题的回答:

      How do I logout from Java EE container managed security?

      【讨论】:

        【解决方案3】:

        在 WebSphere 8.5.5(也可能在旧版本中)上,您可以设置自定义属性。

        安全 -> 全局安全 -> 自定义属性

        com.ibm.ws.security.web.logoutOnHTTPSessionExpire=true   
        

        【讨论】:

          猜你喜欢
          • 2020-06-22
          • 2011-02-26
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2011-03-28
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多