|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.Application
org.apache.wicket.protocol.http.WebApplication
org.apache.wicket.authroles.authentication.AuthenticatedWebApplication
public abstract class AuthenticatedWebApplication
A web application subclass that does role-based authentication.
| Field Summary |
|---|
| Fields inherited from class org.apache.wicket.Application |
|---|
CONFIGURATION |
| Constructor Summary | |
|---|---|
AuthenticatedWebApplication()
Constructor |
|
| Method Summary | |
|---|---|
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. because you want to read an initParameter from web.xml or you want to read a resource from the servlet's context path, you can override this method and provide custom initialization. |
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(Page 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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AuthenticatedWebApplication()
| Method Detail |
|---|
protected void init()
WebApplication
init in class WebApplicationWebApplication.init()public final boolean hasAnyRole(Roles roles)
IRoleCheckingStrategy
hasAnyRole in interface IRoleCheckingStrategyroles - the roles
IRoleCheckingStrategy.hasAnyRole(Roles)public final void onUnauthorizedInstantiation(Component component)
IUnauthorizedComponentInstantiationListener
onUnauthorizedInstantiation in interface IUnauthorizedComponentInstantiationListenercomponent - 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 WebApplicationrequest - 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(Page page)
page - The page
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||