|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.Session
org.apache.wicket.protocol.http.WebSession
net.databinder.auth.AuthDataSessionBase
public abstract class AuthDataSessionBase
Base class for Databinder implementations providing an implementation for authentication cookies and current user lookup.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.wicket.Session |
|---|
org.apache.wicket.Session.IPageMapVisitor, org.apache.wicket.Session.PageMapAccessMetaData |
| Field Summary |
|---|
| Fields inherited from class org.apache.wicket.Session |
|---|
PAGEMAP_ACCESS_MDK, SESSION_ATTRIBUTE_NAME |
| Constructor Summary | |
|---|---|
AuthDataSessionBase(org.apache.wicket.Request request)
Initialize new session. |
|
| Method Summary | |
|---|---|
protected boolean |
cookieSignIn()
Attempts cookie sign in, which will set usename field but not user. |
abstract org.apache.wicket.model.IModel |
createUserModel(DataUser user)
|
protected void |
detach()
Detach userModel manually, as it isnt' attached to any component. |
static AuthDataSessionBase |
get()
|
protected static AuthApplication |
getApp()
|
static java.lang.String |
getAuthCookieName()
|
protected org.apache.wicket.util.time.Duration |
getSignInCookieMaxAge()
|
DataUser |
getUser()
|
protected DataUser |
getUser(java.lang.String username)
Looks for a persisted DataUser object matching the given username. |
static java.lang.String |
getUserCookieName()
|
org.apache.wicket.model.IModel |
getUserModel()
|
boolean |
isSignedIn()
Determine if user is signed in, or can be via cookie. |
protected void |
setCookie()
Sets cookie to remember the currently signed-in user. |
void |
signIn(DataUser user,
boolean setCookie)
Sign in a user whose credentials have been validated elsewhere. |
boolean |
signIn(java.lang.String username,
java.lang.String password)
Sign in without setting cookie. |
boolean |
signIn(java.lang.String username,
java.lang.String password,
boolean setCookie)
|
void |
signOut()
Nullifies userModel and clears authentication cookies. |
| Methods inherited from class org.apache.wicket.protocol.http.WebSession |
|---|
cleanupFeedbackMessages, isCurrentRequestValid |
| Methods inherited from class org.apache.wicket.Session |
|---|
attach, bind, clear, createAutoPageMap, createAutoPageMapName, currentCreateAutoPageMapCounter, dirty, error, exists, findOrCreate, findOrCreate, getApplication, getAttribute, getAttributeNames, getAuthorizationStrategy, getAutoPageMapNamePrefix, getAutoPageMapNameSuffix, getClassResolver, getClientInfo, getDefaultPageMap, getFeedbackMessages, getId, getLocale, getMetaData, getPage, getPage, getPageFactory, getPageFactory, getPageMaps, getSessionStore, getSizeInBytes, getStyle, incrementCreateAutoPageMapCounter, info, invalidate, invalidateNow, isSessionInvalidated, isTemporary, newPageMap, nextPageId, nextSequenceValue, pageMapForName, removeAttribute, removePageMap, set, setApplication, setAttribute, setClientInfo, setLocale, setMetaData, setStyle, touch, unset, untouch, update, visitPageMaps, warn |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AuthDataSessionBase(org.apache.wicket.Request request)
WebApplication| Method Detail |
|---|
protected static AuthApplication getApp()
public static AuthDataSessionBase get()
public DataUser getUser()
getUser in interface AuthSessionpublic org.apache.wicket.model.IModel getUserModel()
getUserModel in interface AuthSessionpublic abstract org.apache.wicket.model.IModel createUserModel(DataUser user)
protected org.apache.wicket.util.time.Duration getSignInCookieMaxAge()
public boolean isSignedIn()
isSignedIn in interface AuthSession
public boolean signIn(java.lang.String username,
java.lang.String password)
AuthSession
signIn in interface AuthSession
public boolean signIn(java.lang.String username,
java.lang.String password,
boolean setCookie)
signIn in interface AuthSessionsetCookie - if true, sets cookie to remember user
public void signIn(DataUser user,
boolean setCookie)
signIn in interface AuthSessionuser - validated and persisted user, must be in current Hibernate sessionsetCookie - if true, sets cookie to remember userprotected boolean cookieSignIn()
protected DataUser getUser(java.lang.String username)
username -
AuthApplicationpublic static java.lang.String getUserCookieName()
public static java.lang.String getAuthCookieName()
protected void setCookie()
getSignInCookieMaxAge()protected void detach()
detach in class org.apache.wicket.Sessionpublic void signOut()
signOut in interface AuthSession
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||