Class LoginExternalAuthReturn

  • All Implemented Interfaces:
    Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

    @WebServlet(name="loginExternalAuthReturn",
                urlPatterns="/loginExternalAuthReturn")
    public class LoginExternalAuthReturn
    extends BaseLoginServlet
    Handle the return from the external authorization login server. If we are successful, record the login. Otherwise, display the failure.
    See Also:
    Serialized Form
    • Constructor Detail

      • LoginExternalAuthReturn

        public LoginExternalAuthReturn()
    • Method Detail

      • doPost

        protected void doPost​(javax.servlet.http.HttpServletRequest req,
                              javax.servlet.http.HttpServletResponse resp)
                       throws javax.servlet.ServletException,
                              IOException
         Returning from the external authorization server. If we were successful,
         the header will contain the name of the user who just logged in.
        
         Deal with these possibilities:
         - The header name was not configured in runtime.properties. Complain.
         - No username: the login failed. Complain
         - User corresponds to a User acocunt. Record the login.
         - User corresponds to an Individual (self-editor).
         - User is not recognized.
        
         On entry, we expect to find:
         - A LoginProcessBean, which will give us the afterLoginUrl if the login
              succeeds.
         - A referrer URL, to which we will redirect if the login fails.
              TODO: is this equal to LoginProcessBean.getLoginPageUrl()?
         These are removed on exit.
         
        Overrides:
        doPost in class javax.servlet.http.HttpServlet
        Throws:
        javax.servlet.ServletException
        IOException
      • doGet

        protected void doGet​(javax.servlet.http.HttpServletRequest request,
                             javax.servlet.http.HttpServletResponse response)
                      throws javax.servlet.ServletException,
                             IOException
        Overrides:
        doGet in class javax.servlet.http.HttpServlet
        Throws:
        javax.servlet.ServletException
        IOException