0 Replies Latest reply on Jul 24, 2014 5:11 AM by f.vencia

    Logout All Applications Single Sign On (SSO) on JBoss AS 7.1.1

    f.vencia

      I have two web application A and B with SSO on JBoss AS 7.1.1.

       

      jboss-web.xml of application A is:

       

       

          <jboss-web>
      
           <context-root>/A</context-root>
      
            <security-domain>MySecurityDomain</security-domain>
      
           <valve> 
      
               <class-name>org.apache.catalina.authenticator.SingleSignOn</class-name> 
      
           </valve>
      
          </jboss-web>
      

       

       

      jboss-web.xml of application B is:

       

      <jboss-web>
           <context-root>/B</context-root>
            <security-domain>MySecurityDomain</security-domain>
           <valve> 
               <class-name>org.apache.catalina.authenticator.SingleSignOn</class-name> 
           </valve>
          </jboss-web>
      

       

      When I login in A, I login also in B, it works.

       

      If I logout in A, I logout also in B, it works.

       

      If I login in A and I logout in B, it doesn't work.

       

      My java function for logout, using primefaces, is:

       

        public void doLogout() {
              HttpSession session = (HttpSession) FacesContext.getCurrentInstance().getExternalContext().getSession(false);
      
              if (session != null) {
                  session.invalidate();
              }
      
              HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();
              try {
                  request.logout();
              } catch (ServletException ex) {
                  Logger.getLogger(LoginController.class.getName()).log(Level.SEVERE, null, ex);
              }
             
          }