TaskBean API
0.5

glogic.sample.sys
Class AccessControlAppServlet

java.lang.Object
  extended byHttpServlet
      extended byglogic.sample.sys.AccessControlAppServlet

public final class AccessControlAppServlet
extends HttpServlet

Manages authentication for other Servlet apps. This Servlet is accessed in two ways: 1) Application Servlets forward control to this servlet when they find there user to not be authenticated. Will redirect back to the application servlet if HttpSession exists and user has rights to the new app (creates AUTH_KEY in the process), othwise will display login screen. 2) Directly handles requests from the user to authenitcate username/password for a given application. Arguments are: username, password, and application name. Once user passes authentication, the user is redirected the application URI.

Author:
Sam Taha
See Also:
Serialized Form

Constructor Summary
AccessControlAppServlet()
           
 
Method Summary
 void doGet(HttpServletRequest request, HttpServletResponse response)
          Handles a GET request.
 void doPost(HttpServletRequest request, HttpServletResponse response)
          Handles a POST request.
 void init()
           
 void process(HttpServletRequest request, HttpServletResponse response)
          Handles all requests.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccessControlAppServlet

public AccessControlAppServlet()
Method Detail

init

public void init()
          throws ServletException
Throws:
ServletException - if we cannot configure ourselves correctly

doGet

public final void doGet(HttpServletRequest request,
                        HttpServletResponse response)
                 throws java.io.IOException,
                        ServletException
Handles a GET request.

Throws:
java.io.IOException
ServletException
See Also:
#process(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

doPost

public final void doPost(HttpServletRequest request,
                         HttpServletResponse response)
                  throws java.io.IOException,
                         ServletException
Handles a POST request.

Throws:
java.io.IOException
ServletException
See Also:
#process(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

process

public final void process(HttpServletRequest request,
                          HttpServletResponse response)
                   throws java.io.IOException,
                          ServletException
Handles all requests. Will forward or redirect as necessary.

Throws:
java.io.IOException
ServletException

TaskBean API
0.5

Copyright © Grand Logic, Inc. All Rights Reserved.