Class LoginEvents


  • public class LoginEvents
    extends java.lang.Object
    LoginEvents - Events for UserLogin and Security handling.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String module  
      static java.lang.String resource  
      static java.lang.String usernameCookieName  
    • Constructor Summary

      Constructors 
      Constructor Description
      LoginEvents()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String emailPasswordRequest​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      event to send an email with a link to change password
      static java.lang.String forgotPassword​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      The user forgot his/her password.
      static java.lang.String saveEntryParams​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Save USERNAME and PASSWORD for use by auth pages even if we start in non-auth pages.
      static java.lang.String showPasswordHint​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Show the password hint for the userLoginId specified in the request object.
      static java.lang.String storeCheckLogin​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)  
      static java.lang.String storeLogin​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • module

        public static final java.lang.String module
      • usernameCookieName

        public static final java.lang.String usernameCookieName
        See Also:
        Constant Field Values
    • Constructor Detail

      • LoginEvents

        public LoginEvents()
    • Method Detail

      • saveEntryParams

        public static java.lang.String saveEntryParams​(javax.servlet.http.HttpServletRequest request,
                                                       javax.servlet.http.HttpServletResponse response)
        Save USERNAME and PASSWORD for use by auth pages even if we start in non-auth pages.
        Parameters:
        request - The HTTP request object for the current JSP or Servlet request.
        response - The HTTP response object for the current JSP or Servlet request.
        Returns:
        String
      • forgotPassword

        public static java.lang.String forgotPassword​(javax.servlet.http.HttpServletRequest request,
                                                      javax.servlet.http.HttpServletResponse response)
        The user forgot his/her password. This will call showPasswordHint, emailPassword or simply returns "success" in case no operation has been specified.
        Parameters:
        request - The HTTPRequest object for the current request
        response - The HTTPResponse object for the current request
        Returns:
        String specifying the exit status of this event
      • showPasswordHint

        public static java.lang.String showPasswordHint​(javax.servlet.http.HttpServletRequest request,
                                                        javax.servlet.http.HttpServletResponse response)
        Show the password hint for the userLoginId specified in the request object.
        Parameters:
        request - The HTTPRequest object for the current request
        response - The HTTPResponse object for the current request
        Returns:
        String specifying the exit status of this event
      • emailPasswordRequest

        public static java.lang.String emailPasswordRequest​(javax.servlet.http.HttpServletRequest request,
                                                            javax.servlet.http.HttpServletResponse response)
        event to send an email with a link to change password
        Parameters:
        request - The HTTPRequest object for the current request
        response - The HTTPResponse object for the current request
        Returns:
        String specifying the exit status of this event
      • storeCheckLogin

        public static java.lang.String storeCheckLogin​(javax.servlet.http.HttpServletRequest request,
                                                       javax.servlet.http.HttpServletResponse response)
      • storeLogin

        public static java.lang.String storeLogin​(javax.servlet.http.HttpServletRequest request,
                                                  javax.servlet.http.HttpServletResponse response)
                                           throws java.io.UnsupportedEncodingException
        Throws:
        java.io.UnsupportedEncodingException