1 2 Previous Next 15 Replies Latest reply on Dec 14, 2013 12:07 PM by christophe.carvalho Go to original post
      • 15. Re: Seam Faces @ViewConfig: @LoggedIn for everything but login page
        christophe.carvalho

        Hi, for anybody who search a workaround for this issue, here is something that seems to work  (but not an elegant solution for sure) :

         

        @ViewConfig
        public interface AppViewConfig {
        
        
            static enum Pages {
              
                @FacesRedirect
                @ViewPattern("/*")
                @LoginView("/login.xhtml")
                @Authenticated
                ALL;
            }
        }
        

         

         

        public @Secures @Authenticated boolean isLoggedIn() {
        
          if (facesContext.getExternalContext().getRequestServletPath().contains("login")) {
          return true;
          }
        
          return identity.isLoggedIn();
          }
        

         

         

        Regards.

        1 2 Previous Next