|
jacquard 1.12.0 by The Web Engineering Factory and Toolworks | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
uk.co.weft.maybeupload.MaybeUploadServlet
uk.co.weft.htform.Servlet
uk.co.weft.htform.WithExceptionHandlerServlet
uk.co.weft.htform.Page
uk.co.weft.htform.Form
uk.co.weft.htform.AuthenticatedForm
An HTML form with a guaranteed, authenticated database connection, persistent for the life of the session. In order to get to this point, the procedure is:
This class (and consequently all servlets which are subclasses of this class) know about the following configuration parameters, in addition to those handled by Form:
| Field Summary | |
protected boolean |
allowLogout
Whether to offer the user a logout button |
static java.lang.String |
ALLOWLOGOUTCONFIGTOKEN
a token on which to look in the ocnfiguration for whether to allow logout |
static java.lang.String |
AUTHENTICATEDUSERMAGICTOKEN
A token on which to store the authenticated user in the context |
protected Authenticator |
authenticator
the authenticator I use to authenticate my users |
static java.lang.String |
AUTHENTICATORCLASSMAGICTOKEN
A token on which to look for the authenticator class in the config |
protected WidgetSet |
authentificationWidgets
An alternate set of widgets to be used for authentification |
protected java.lang.String |
logoutPrompt
prompt strong for my logout widget |
static java.lang.String |
LOGOUTPROMPTCONFIGTOKEN
a token on which to look in the configuration for a logout prompt |
protected ActionWidget |
logoutWidget
The logout widget, created at instanitation time. |
protected java.lang.String |
onLogoutRedirect
The URL to redirect to following logout |
| Fields inherited from class uk.co.weft.htform.Page |
DOCTYPECONFIGTOKEN, dynamicFootInclude, dynamicHeadInclude, footInclude, footIncludeURL, headInclude, headIncludeURL, imageUrlBase, layout, printStylesheet, PRINTSTYLESHEETCONFIGTOKEN, stylesheet, STYLESHEETCONFIGTOKEN, title, titleMagicToken, TITLEMAGICTOKEN |
| Fields inherited from class uk.co.weft.htform.WithExceptionHandlerServlet |
EXCEPTIONHANDLERCLASSCONFIGTOKEN |
| Fields inherited from class uk.co.weft.maybeupload.MaybeUploadServlet |
allowOverwrite, maxUpload, saveUploadedFilesToDisk, silentlyRename, uploadDir, uploadDirPath, uploadDirURL |
| Fields inherited from interface uk.co.weft.htform.ResourceConsumer |
RESOURCEBUNDLEMAGICTOKEN |
| Constructor Summary | |
AuthenticatedForm()
|
|
| Method Summary | |
void |
init(Context config)
Set up my authentification widgets: username and password. |
protected boolean |
login(Context context)
If authentication is successful, cache the interesting tokens on the session so the user doesn't get prompted to login at every form (s)he sees. |
protected void |
logout(Context context)
clear the interesting tokens cached on the session at login time. |
| Methods inherited from class uk.co.weft.htform.Form |
addAuxiliary, addWidget, defaultActionHandler, doBody, doHead, doHeadBodySep, fixupMagicValues, generate, getLayout, getNextActionURL, getSelectedWidgetSet, getTitle, getTransformURL, getWidgetSetByName, handleAction, hasWidgets, makeReady, postForm, postProcess, preForm, preProcess, selectNextWidgetSet, setContextMenuQuery |
| Methods inherited from class uk.co.weft.htform.Page |
doFoot, doFoot, generateContent, getFootInclude, getFootIncludeURL, getFootIncludeURL, getHeadInclude, getHeadIncludeURL, getHeadIncludeURL, getStylesheet, getStylesheets, getTables, getTitle, outputRedirectBlock, readStringFromURL |
| Methods inherited from class uk.co.weft.htform.WithExceptionHandlerServlet |
whinge, whinge, whinge |
| Methods inherited from class uk.co.weft.htform.Servlet |
addCookie, addCookie, coerceCookiesToContext, coerceToContext, coerceToContext, coerceToContext, coerceToContext, coerceToUrl, createContext, doGet, doPost, getCalendar, getContentType, getDebug, getLocale, getOutputStream, getResource, getResourceString, getServletInfo, grs, grs, handleCookies, handleRedirect, init, setCookieValues, storeOnSession |
| Methods inherited from class uk.co.weft.maybeupload.MaybeUploadServlet |
doDelete, doHead, doOptions, doPut, doTrace, getUploadDir, getUploadURL, service |
| Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service |
| Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface uk.co.weft.domutil.DocumentGenerator |
destroy |
| Field Detail |
public static final java.lang.String AUTHENTICATEDUSERMAGICTOKEN
public static final java.lang.String AUTHENTICATORCLASSMAGICTOKEN
public static final java.lang.String ALLOWLOGOUTCONFIGTOKEN
public static final java.lang.String LOGOUTPROMPTCONFIGTOKEN
protected ActionWidget logoutWidget
super.init()
protected Authenticator authenticator
protected java.lang.String logoutPrompt
protected java.lang.String onLogoutRedirect
protected WidgetSet authentificationWidgets
protected boolean allowLogout
| Constructor Detail |
public AuthenticatedForm()
| Method Detail |
public void init(Context config)
throws InitialisationException
init in interface DocumentGeneratorinit in class FormInitialisationException
protected boolean login(Context context)
throws java.lang.Exception
java.lang.Exceptionprotected void logout(Context context)
|
jacquard 1.12.0 by The Web Engineering Factory and Toolworks | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||