U
- as UserT
- as BasicSessionpublic abstract class AbstractLoginForm<T extends BasicSession,U extends User> extends org.apache.wicket.markup.html.form.StatelessForm implements ChangeGenerator<Object>
ChangeGenerator
; it will also generate Events of TypeAuthenticationToken
Exception
as Service version of this Form
,
Serialized FormConstructor and Description |
---|
AbstractLoginForm(String id) |
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(ChangeListener changeListener)
Allow Notify all
ChangeListener s about a change |
protected String |
getAuthErrorMessage(Exception e) |
protected String |
getAuthFailMessage() |
abstract Class<? extends org.apache.wicket.markup.html.WebPage> |
getDefaultLandingPage(U user)
If no lading page specified on login, then goto Default.
|
org.apache.wicket.PageParameters |
getDefaultLandingPageParameters()
(Optional) @nullable true; if not null then the parameters to supply to the landing page
|
List |
getListeners()
Get list directly.
|
protected abstract CharSequence |
getPassword(String normalizedUserId)
Get password for user id
|
protected abstract U |
getUserDetailsToLoadInSession(String userId)
On successful login, load the User details into the Session
|
void |
notifyAllListeners(Object object)
Whenever a node is selected/updated, it also notifies its listeners.
|
protected void |
onComponentTag(org.apache.wicket.markup.ComponentTag tag)
Ensure this Form action goes to HTTPS controller only
|
void |
onSubmit() |
protected T |
processSessionOnLogin(T existingSession)
Opportunity to process, override session on login.
|
void |
setListeners(List listeners)
Set list directly.
|
protected T |
setSessionFromUserDetails(U user,
AuthenticationToken authToken)
Chance to replace the Session Object itself
|
protected U |
signIn(Principal inputPrincipal)
Sign in the
Principal |
protected void |
userValidation(U user,
UpdatableAuthenticationToken authToken)
Perform any additional user validation tasks on the loaded User object and also update the
UpdatableAuthenticationToken if necessary. |
getStatelessHint, process
add, appendDefaultButtonField, beforeUpdateFormComponentModels, clearInput, delegateSubmit, encodeUrlInHiddenFields, error, findForm, findSubmittingButton, getDefaultButton, getFormValidators, getHiddenFieldId, getInputNamePrefix, getJavascriptId, getJsForInterfaceUrl, getMaxSize, getMethod, getModel, getModelObject, getRootForm, getRootFormRelativeId, getValidatorKeyPrefix, getValuePersister, handleMultiPart, hasError, internalOnModelChanged, isRootForm, isSubmitted, isVersioned, loadPersistentFormComponentValues, markFormComponentsInvalid, markFormComponentsValid, onBeforeRender, onComponentTagBody, onDetach, onError, onFileUploadException, onFormSubmitted, onValidate, process, registerJavascriptNamespaces, remove, removePersistentFormComponentValues, renderHead, renderPlaceholderTag, setDefaultButton, setMaxSize, setModel, setModelObject, setMultiPart, setVersioned, updateFormComponentModels, validate, validateComponents, validateFormValidator, validateFormValidators, visitFormComponents, visitFormComponentsPostOrder, writeParamsAsHiddenFields
getMarkupType, getWebPage, getWebRequest
add, addOrReplace, autoAdd, autoAdd, contains, findMarkupStream, get, get, getAssociatedMarkupStream, getMarkupStream, hasAssociatedMarkup, internalAdd, isTransparentResolver, iterator, iterator, newMarkupResourceStream, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderComponentTagBody, renderNext, replace, setDefaultModel, setMarkupStream, size, swap, toString, toString, visitChildren, visitChildren
add, addStateChange, afterRender, beforeRender, callOnBeforeRenderIfNotVisible, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, configure, continueToOriginalDestination, debug, detach, detachBehaviors, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findPage, findParent, findParentWithAssociatedMarkup, getApplication, getBehaviors, getBehaviors, getBehaviorsRawList, getClassRelativePath, getComponentBorder, getConverter, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessage, getFlag, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdImpl, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getResponse, getSession, getSizeInBytes, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalAttach, internalDetach, internalOnAttach, internalOnDetach, isActionAuthorized, isAncestorOf, isAttached, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVisibilityAllowed, isVisible, isVisibleInHierarchy, locateMarkupStream, markAttached, markRendering, modelChanged, modelChanging, onAfterRender, onAttach, onBeginRequest, onConfigure, onEndRequest, onInitialize, onModelChanged, onModelChanging, onRemove, prepareForRender, prepareForRender, redirectToInterceptPage, remove, remove, render, render, renderComponent, renderComponent, renderComponentTag, rendered, renderHead, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, setAuto, setComponentBorder, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setFlag, setIgnoreAttributeModifier, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setRedirect, setRenderBodyOnly, setResponsePage, setResponsePage, setResponsePage, setVisibilityAllowed, setVisible, urlFor, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, warn, wrap
public AbstractLoginForm(String id)
protected abstract CharSequence getPassword(String normalizedUserId) throws Exception
normalizedUserId
- - Case Insensitive (expected lowercase but not guaranteed). Search should be case insensitive for higher usability.Exception
protected void onComponentTag(org.apache.wicket.markup.ComponentTag tag)
onComponentTag
in class org.apache.wicket.markup.html.form.Form
public abstract Class<? extends org.apache.wicket.markup.html.WebPage> getDefaultLandingPage(U user)
BasicSession.getShell()
Shell.getEnvironment()
to derive final Page.WebPage
public org.apache.wicket.PageParameters getDefaultLandingPageParameters()
public final void onSubmit()
onSubmit
in class org.apache.wicket.markup.html.form.Form
protected String getAuthFailMessage()
protected abstract U getUserDetailsToLoadInSession(String userId)
userId
- protected T processSessionOnLogin(T existingSession)
existingSession
- as T BasicSession
protected T setSessionFromUserDetails(U user, AuthenticationToken authToken)
User
- as Filled user Object from IDM System (DB,LDAP etc), returned from {getUserDetailsToLoadInSession(String)
after
successful authenticationauthToken
- as AuthenticationToken
, indicating there was successful Authentication with any Auth related details in it.protected void userValidation(U user, UpdatableAuthenticationToken authToken)
UpdatableAuthenticationToken
if necessary.user
- as UauthToken
- as typepublic void addChangeListener(ChangeListener changeListener)
ChangeGenerator
ChangeListener
s about a changeaddChangeListener
in interface ChangeGenerator<Object>
public void notifyAllListeners(Object object)
ChangeGenerator
notifyAllListeners
in interface ChangeGenerator<Object>
public List getListeners()
ChangeGenerator
getListeners
in interface ChangeGenerator<Object>
public void setListeners(List listeners)
ChangeGenerator
setListeners
in interface ChangeGenerator<Object>
Copyright © 2018. All rights reserved.