public abstract class AuthenticatedWebApplication extends WebApplication implements IRoleCheckingStrategy, IUnauthorizedComponentInstantiationListener
META_INF_RESOURCES
CONFIGURATION
Constructor and Description |
---|
AuthenticatedWebApplication() |
Modifier and Type | Method and Description |
---|---|
protected abstract Class<? extends WebPage> |
getSignInPageClass() |
protected abstract Class<? extends AbstractAuthenticatedWebSession> |
getWebSessionClass() |
boolean |
hasAnyRole(Roles roles)
Whether any of the given roles matches.
|
protected void |
init()
Initialize; if you need the wicket servlet/filter for initialization, e.g.
|
Session |
newSession(Request request,
Response response)
Creates a new session.
|
void |
onUnauthorizedInstantiation(Component component)
Called when an unauthorized component instantiation is about to take place (but before it
happens).
|
protected void |
onUnauthorizedPage(Component page)
Called when an AUTHENTICATED user tries to navigate to a page that they are not authorized to
access.
|
void |
restartResponseAtSignInPage()
Restarts response at sign in page.
|
addResourceReplacement, addResourceReplacement, get, getAjaxRequestTargetListeners, getAjaxRequestTargetProvider, getAndRemoveBufferedResponse, getApplicationKey, getConfigurationType, getFilterFactoryManager, getInitParameter, getMimeType, getServletContext, getSessionAttributePrefix, getUpdateAutoLabelsOnAjaxRequests, getWicketFilter, hasBufferedResponse, hasFilterFactoryManager, internalDestroy, internalInit, logEventTarget, logResponseTarget, mount, mountPackage, mountPage, mountResource, newAjaxRequestTarget, newWebRequest, newWebResponse, outputDevelopmentModeWarning, renderXmlDecl, sessionUnbound, setAjaxRequestTargetProvider, setConfigurationType, setServletContext, setWicketFilter, storeBufferedResponse, unmount
configure, createRequestCycle, decorateHeaderResponse, exists, fetchCreateAndSetSession, get, getApplicationKeys, getApplicationListeners, getApplicationSettings, getBehaviorInstantiationListeners, getComponentInitializationListeners, getComponentInstantiationListeners, getComponentOnAfterRenderListeners, getComponentOnConfigureListeners, getComponentPostOnBeforeRenderListeners, getComponentPreOnBeforeRenderListeners, getConverterLocator, getDebugSettings, getExceptionMapperProvider, getExceptionSettings, getFrameworkSettings, getHeaderContributorListeners, getHomePage, getInitializers, getJavaScriptLibrarySettings, getMapperContext, getMarkupSettings, getMetaData, getName, getOnComponentTagListeners, getPageFactory, getPageManagerContext, getPageManagerProvider, getPageRendererProvider, getPageSettings, getRequestCycleListeners, getRequestCycleProvider, getRequestCycleSettings, getRequestLogger, getRequestLoggerSettings, getResourceBundles, getResourceReferenceRegistry, getResourceSettings, getRootRequestMapper, getRootRequestMapperAsCompound, getSecuritySettings, getSessionListeners, getSessionStore, getSessionStoreProvider, getSharedResources, getStoreSettings, initApplication, newConverterLocator, newMapperContext, newPageFactory, newRequestLogger, newResourceBundles, newResourceReferenceRegistry, newSharedResources, onDestroy, onEvent, setApplicationSettings, setDebugSettings, setExceptionSettings, setFrameworkSettings, setHeaderResponseDecorator, setJavaScriptLibrarySettings, setMarkupSettings, setMetaData, setName, setPageManagerProvider, setPageRendererProvider, setPageSettings, setRequestCycleProvider, setRequestCycleSettings, setRequestLoggerSettings, setResourceSettings, setRootRequestMapper, setSecuritySettings, setSessionStoreProvider, setStoreSettings, usesDeploymentConfig, usesDevelopmentConfig, validateInit
protected void init()
WebApplication
init
in class WebApplication
WebApplication.init()
public final boolean hasAnyRole(Roles roles)
IRoleCheckingStrategy
hasAnyRole
in interface IRoleCheckingStrategy
roles
- the rolesIRoleCheckingStrategy.hasAnyRole(Roles)
public final void onUnauthorizedInstantiation(Component component)
IUnauthorizedComponentInstantiationListener
onUnauthorizedInstantiation
in interface IUnauthorizedComponentInstantiationListener
component
- The partially constructed component (only the id is guaranteed to be valid).IUnauthorizedComponentInstantiationListener.onUnauthorizedInstantiation(Component)
public void restartResponseAtSignInPage()
public Session newSession(Request request, Response response)
newSession
in class WebApplication
request
- The request that will create this session.response
- The response to initialize, for example with cookies. This is important to use
cases involving unit testing because those use cases might want to be able to sign
a user in automatically when the session is created.Application.newSession(org.apache.wicket.request.Request,
org.apache.wicket.request.Response)
protected abstract Class<? extends AbstractAuthenticatedWebSession> getWebSessionClass()
protected abstract Class<? extends WebPage> getSignInPageClass()
protected void onUnauthorizedPage(Component page)
page
- The partially constructed page (only the component id is guaranteed to be valid).Copyright © 2006–2022 Apache Software Foundation. All rights reserved.