Class LoginStatusBean


  • public class LoginStatusBean
    extends Object
    An immutable object that records the user's login info as a session attribute.
    • Method Detail

      • setBean

        public static void setBean​(javax.servlet.http.HttpSession session,
                                   LoginStatusBean lsb)
        Attach this bean to the session - this means you are logged in.
      • getBean

        public static LoginStatusBean getBean​(javax.servlet.http.HttpServletRequest request)
        Get the bean from this request, or a dummy bean if the user is not logged in. Never returns null.
      • getBean

        public static LoginStatusBean getBean​(javax.servlet.http.HttpSession session)
        Get the bean from this session, or a dummy bean if the user is not logged in. Never returns null.
      • getCurrentUser

        public static UserAccount getCurrentUser​(javax.servlet.http.HttpServletRequest request)
        Get the current user, or null if not logged in.
      • getCurrentUser

        public static UserAccount getCurrentUser​(javax.servlet.http.HttpSession session)
        Get the current user, or null if not logged in.
      • getUserURI

        public String getUserURI()
      • isLoggedIn

        public boolean isLoggedIn()
      • hasExternalAuthentication

        public boolean hasExternalAuthentication()