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 Newbie

        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