|
||||||||||
| 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
net.databinder.DataApplicationBase
net.databinder.hib.DataApplication
net.databinder.auth.hib.AuthDataApplication
public abstract class AuthDataApplication
Adds basic authentication functionality to DataApplication. This class is a derivative of Wicket's AuthenticatedWebApplication, brought into the DataApplication hierarchy and including light user specifications in DataUser. You are encouraged to override getUserClass() to implement your own user entity, possibly by extending UserBase. It is also possible to use Databinder authentication without extending this base class by implementing IAuthSettings.
Text appearing in authentication components can be overriden for any language, using resource keys listed in their documentation. Except as otherwise noted, these resources can be housed in the application class's properties file, so that subclasses of the pages and panels are not necessarily required.
AuthApplication,
DataUser| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class net.databinder.hib.DataApplication |
|---|
DataApplication.BmarkDataBrowser |
| Field Summary |
|---|
| Fields inherited from class org.apache.wicket.Application |
|---|
CONFIGURATION, CONTEXTPATH, DEPLOYMENT, DEVELOPMENT |
| Constructor Summary | |
|---|---|
AuthDataApplication()
|
|
| Method Summary | |
|---|---|
protected void |
authInit()
Sets Wicket's security strategy for role authorization and appoints this object as the unauthorized instatiation listener. |
protected void |
configureHibernate(org.hibernate.cfg.AnnotationConfiguration config)
Adds to the configuration whatever DataUser class is defined. |
java.security.MessageDigest |
getDigest()
|
java.lang.Class<? extends org.apache.wicket.markup.html.WebPage> |
getSignInPageClass()
Override if you need to customize the sign-in page. |
java.lang.String |
getToken(DataUser user)
Get the restricted token for a user, using IP addresses as location parameter. |
DataUser |
getUser(java.lang.String username)
Return user object by matching against a "username" property. |
boolean |
hasAnyRole(org.apache.wicket.authorization.strategies.role.Roles roles)
Passes query on to the DataUser object if signed in. |
protected void |
internalInit()
Internal initialization. |
org.apache.wicket.Session |
newSession(org.apache.wicket.Request request,
org.apache.wicket.Response response)
|
void |
onUnauthorizedInstantiation(org.apache.wicket.Component component)
Sends to sign in page if not signed in, otherwise throws UnauthorizedInstantiationException. |
| Methods inherited from class net.databinder.hib.DataApplication |
|---|
buildHibernateSessionFactory, buildHibernateSessionFactory, configureHibernate, configureHibernateEssentials, dataInit, getHibernateSessionFactory, isDataBrowserAllowed, mountDataBrowser, newRequestCycle, setHibernateSessionFactory |
| Methods inherited from class net.databinder.DataApplicationBase |
|---|
isCookielessSupported, isDevelopment, newConverterLocator, newWebResponse, setCookielessSupported |
| Methods inherited from class org.apache.wicket.protocol.http.WebApplication |
|---|
getApplicationKey, getConfigurationType, getDefaultRequestCycleFactory, getInitParameter, getRequestCycleProcessor, getResourceFinder, getServletContext, getSessionAttributePrefix, getWicketFilter, init, internalDestroy, logEventTarget, logResponseTarget, mount, mount, mountBookmarkablePage, mountBookmarkablePage, mountSharedResource, newAjaxRequestTarget, newRequestCycleProcessor, newSession, newSession, newSessionStore, newWebRequest, outputDevelopmentModeWarning, sessionDestroyed, setApplicationKey, setWicketFilter, unmount |
| Methods inherited from class org.apache.wicket.Application |
|---|
addComponentInstantiationListener, addComponentOnAfterRenderListener, addComponentOnBeforeRenderListener, addRenderHeadListener, configure, destroy, exists, get, get, getApplicationKeys, getApplicationSettings, getConverterLocator, getDebugSettings, getExceptionSettings, getFrameworkSettings, getHomePage, getMarkupCache, getMarkupSettings, getMetaData, getName, getPageSettings, getRequestCycleFactory, getRequestCycleSettings, getRequestLogger, getRequestLoggerSettings, getResourceSettings, getSecuritySettings, getSessionFactory, getSessionSettings, getSessionStore, getSharedResources, initializeComponents, newRequestCycle, newRequestLogger, notifyRenderHeadListener, onDestroy, removeComponentInstantiationListener, removeComponentOnAfterRenderListener, removeComponentOnBeforeRenderListener, removeRenderHeadListener, set, setMetaData, unset |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.databinder.auth.AuthApplication |
|---|
getSalt, getUserClass |
| Constructor Detail |
|---|
public AuthDataApplication()
| Method Detail |
|---|
protected void internalInit()
internalInit in class DataApplicationBaseprotected void authInit()
public org.apache.wicket.Session newSession(org.apache.wicket.Request request,
org.apache.wicket.Response response)
newSession in class org.apache.wicket.protocol.http.WebApplicationAuthDataSessionprotected void configureHibernate(org.hibernate.cfg.AnnotationConfiguration config)
configureHibernate in class DataApplicationconfig - used to build Hibernate session factorypublic void onUnauthorizedInstantiation(org.apache.wicket.Component component)
onUnauthorizedInstantiation in interface org.apache.wicket.authorization.IUnauthorizedComponentInstantiationListenerpublic final boolean hasAnyRole(org.apache.wicket.authorization.strategies.role.Roles roles)
hasAnyRole in interface org.apache.wicket.authorization.strategies.role.IRoleCheckingStrategypublic DataUser getUser(java.lang.String username)
getUser in interface AuthApplicationpublic java.lang.Class<? extends org.apache.wicket.markup.html.WebPage> getSignInPageClass()
getSignInPageClass in interface AuthApplicationpublic java.security.MessageDigest getDigest()
getDigest in interface AuthApplicationpublic java.lang.String getToken(DataUser user)
getToken in interface AuthApplicationuser - source of token
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||