java.lang.Object
org.apache.struts.action.Action
com.aoindustries.web.struts.PageAction
com.aoindustries.web.struts.AuthenticatedAction
- Direct Known Subclasses:
AdministratorPasswordSetterAction,AdministratorPasswordSetterCompletedAction,IndexAction,MakePaymentAction,MakePaymentNewCardAction,PermissionAction
Ensures the user is logged in. Forwards to "login" if not logged in. Otherwise, it sets the
request attribute
More simply put, without overriding the new execute method, this action returns either the mapping for "login" or "success".
Constants.AO_CONN and then calls
execute(ActionMapping,ActionForm,HttpServletRequest,HttpServletResponse,Locale,Skin,AoservConnector).
The default implementation of this new execute method simply returns the mapping
of "success".More simply put, without overriding the new execute method, this action returns either the mapping for "login" or "success".
- Author:
- AO Industries, Inc.
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal ActionForwardexecute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, Registry pageRegistry) Once the page registry is set resolved, this version of the execute method is invoked.execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, AoservConnector aoConn) Once authentication has been handled, this version of the execute method is invoked.static AoservConnectorgetAoConn(HttpServletRequest request, HttpServletResponse response) Gets the AoservConnector for the user ornullif not logged in.static AoservConnectorgetAuthenticatedAoConn(HttpServletRequest request, HttpServletResponse response) Gets the AoservConnector that represents the actual login id.Methods inherited from class com.aoindustries.web.struts.PageAction
executeMethods inherited from class org.apache.struts.action.Action
addErrors, addMessages, execute, generateToken, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
-
Constructor Details
-
AuthenticatedAction
public AuthenticatedAction()
-
-
Method Details
-
execute
public final ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, Registry pageRegistry) throws Exception Description copied from class:PageActionOnce the page registry is set resolved, this version of the execute method is invoked. By default, returns mapping for "success".- Overrides:
executein classPageAction- Throws:
Exception
-
getAuthenticatedAoConn
public static AoservConnector getAuthenticatedAoConn(HttpServletRequest request, HttpServletResponse response) Gets the AoservConnector that represents the actual login id. This will not change when the user performs a switch user (Constants.SU).. -
getAoConn
Gets the AoservConnector for the user ornullif not logged in. This also handles theConstants.SUbehavior that was stored in the session bySwitchUserRequestListener. -
execute
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, AoservConnector aoConn) throws Exception Once authentication has been handled, this version of the execute method is invoked. The default implementation of this method simply returns the mapping of "success".- Throws:
Exception
-
