atg.servlet.security
Class FormLoginPipelineServlet

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.nucleus.TimedOperationService
              extended by atg.servlet.pipeline.PipelineableServletImpl
                  extended by atg.servlet.security.FormLoginPipelineServlet
All Implemented Interfaces:
NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, PipelineableServlet, java.util.EventListener, javax.servlet.Servlet

public class FormLoginPipelineServlet
extends PipelineableServletImpl

The FormLoginPipelineServlet implements form logins as defined by Servlet 2.2. In Servlet 2.2 a login form must have the j_security_check action, and must provide the j_username and j_password parameters.

A FormLoginSession object is used to store information about a form login. The FormLoginPipelineServlet gets thge FormLoginSession from the UserLoginManager before handling a form login.


Field Summary
static java.lang.String CLASS_VERSION
           
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
DEFAULT_LOG_TRACE_STATUS
 
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
 
Constructor Summary
FormLoginPipelineServlet()
           
 
Method Summary
static boolean checkSecurityRoles(Persona pPersona, java.lang.String[] pRoles)
          Check if a persona has one of a number of roles - by calling the hasRole() method.
 java.lang.String getDefaultDestination()
          Returns A Default Destination URI to redirect people to when they submit a form and there is no current login session.
 boolean getEnableDefaultDestination()
          Enables the use of a the default destination URI for the case when there is no current login session.
 UserLoginManager getUserLoginManager()
          Returns A UserLoginManager
 void handleLoginError(FormLoginSession pFormLoginSession, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Handle a form login error.
 void service(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Services a DynamoHttpServletRequest/Response pair
 void setDefaultDestination(java.lang.String pDefaultDestination)
          Sets A Default Destination URI to redirect people to when they submit a form and there is no current login session.
 void setEnableDefaultDestination(boolean pEnableDefaultDestination)
          Enables the use of a the default destination URI for the case when there is no current login session.
 void setUserLoginManager(UserLoginManager pUserLoginManager)
          Sets A UserLoginManager
 
Methods inherited from class atg.servlet.pipeline.PipelineableServletImpl
createAdminServlet, destroy, getAdminServlet, getNextServlet, getServletConfig, getServletInfo, init, isUsePathInfo, passRequest, passRequest, service, service, setNextServlet, setServletInfo, setUsePathInfo
 
Methods inherited from class atg.nucleus.TimedOperationService
getAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatistics
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, doStartService, doStopService, getAbsoluteName, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Constructor Detail

FormLoginPipelineServlet

public FormLoginPipelineServlet()
Method Detail

setUserLoginManager

public void setUserLoginManager(UserLoginManager pUserLoginManager)
Sets A UserLoginManager


getUserLoginManager

public UserLoginManager getUserLoginManager()
Returns A UserLoginManager


setEnableDefaultDestination

public void setEnableDefaultDestination(boolean pEnableDefaultDestination)
Enables the use of a the default destination URI for the case when there is no current login session.


getEnableDefaultDestination

public boolean getEnableDefaultDestination()
Enables the use of a the default destination URI for the case when there is no current login session.


setDefaultDestination

public void setDefaultDestination(java.lang.String pDefaultDestination)
Sets A Default Destination URI to redirect people to when they submit a form and there is no current login session. This can happen, for example, when a login form is resubmitted after the session has timed out.


getDefaultDestination

public java.lang.String getDefaultDestination()
Returns A Default Destination URI to redirect people to when they submit a form and there is no current login session. This can happen, for example, when a login form is resubmitted after the session has timed out.


service

public void service(DynamoHttpServletRequest pRequest,
                    DynamoHttpServletResponse pResponse)
             throws java.io.IOException,
                    javax.servlet.ServletException
Services a DynamoHttpServletRequest/Response pair

Overrides:
service in class PipelineableServletImpl
Throws:
javax.servlet.ServletException - if an error occurred while processing the servlet request
java.io.IOException - if an error occurred while reading or writing the servlet request

handleLoginError

public void handleLoginError(FormLoginSession pFormLoginSession,
                             DynamoHttpServletRequest pRequest,
                             DynamoHttpServletResponse pResponse)
                      throws javax.servlet.ServletException,
                             java.io.IOException
Handle a form login error.

Throws:
javax.servlet.ServletException
java.io.IOException

checkSecurityRoles

public static boolean checkSecurityRoles(Persona pPersona,
                                         java.lang.String[] pRoles)
Check if a persona has one of a number of roles - by calling the hasRole() method.