Class LoginServlet

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

    public final class LoginServlet
    extends CommonServlet
    LoginServet attempts to authenticate a user against an LDAP. The following init params can be set for this servlet: edu.vt.middleware.ldap.servlets.propertiesFile - to load authenticator properties from edu.vt.middleware.ldap.servlets.sessionId - to set the user identifier in the session edu.vt.middleware.ldap.servlets.loginUrl - to set the URL of your login page edu.vt.middleware.ldap.servlets.errorMsg - to display if authentication fails edu.vt.middleware.ldap.servlets.sessionManager - optional class to perform session management after login and logout (must extend edu.vt.middleware.ldap.servlets.session.SessionManager)

    The following http params can be sent to this servlet: user - user identifier to authenticate credential - user credential to authenticate with url - to redirect client to after successful authentication

    Version:
    $Revision: 1330 $ $Date: 2010-05-24 00:10:53 +0200 (Mon, 24 May 2010) $
    Author:
    Middleware Services
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      LoginServlet()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void destroy()
      Called by the servlet container to indicate to a servlet that the servlet is being taken out of service.
      void init​(javax.servlet.ServletConfig config)
      Initialize this servlet.
      void service​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Handle all requests sent to this servlet.
      • Methods inherited from class javax.servlet.http.HttpServlet

        doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
      • Methods inherited from class javax.servlet.GenericServlet

        getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
      • Methods inherited from class java.lang.Object

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

      • LoginServlet

        public LoginServlet()
    • Method Detail

      • init

        public void init​(javax.servlet.ServletConfig config)
                  throws javax.servlet.ServletException
        Initialize this servlet.
        Specified by:
        init in interface javax.servlet.Servlet
        Overrides:
        init in class CommonServlet
        Parameters:
        config - ServletConfig
        Throws:
        javax.servlet.ServletException - if an error occurs
      • service

        public void service​(javax.servlet.http.HttpServletRequest request,
                            javax.servlet.http.HttpServletResponse response)
                     throws javax.servlet.ServletException,
                            java.io.IOException
        Handle all requests sent to this servlet.
        Overrides:
        service in class javax.servlet.http.HttpServlet
        Parameters:
        request - HttpServletRequest
        response - HttpServletResponse
        Throws:
        javax.servlet.ServletException - if this request cannot be serviced
        java.io.IOException - if a response cannot be sent
      • destroy

        public void destroy()
        Called by the servlet container to indicate to a servlet that the servlet is being taken out of service.
        Specified by:
        destroy in interface javax.servlet.Servlet
        Overrides:
        destroy in class javax.servlet.GenericServlet