|
||||||||||
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
org.apache.wicket.authentication.AuthenticatedWebSession
public abstract class AuthenticatedWebSession
Basic authenticated web session. Subclasses must provide a method that authenticates the session based on a username and password, and a method implementation that gets the Roles
Field Summary |
---|
Fields inherited from class org.apache.wicket.Session |
---|
clientInfo, SESSION_ATTRIBUTE_NAME |
Constructor Summary | |
---|---|
AuthenticatedWebSession(Request request)
Construct. |
Method Summary | |
---|---|
static AuthenticatedWebSession |
get()
|
abstract Roles |
getRoles()
|
void |
invalidate()
Call signOut() and remove the logon data from where ever they have been persisted (e.g. |
boolean |
isSignedIn()
|
protected void |
signIn(boolean value)
Cookie based logins (remember me) may not rely on putting username and password into the cookie but something else that safely identifies the user. |
boolean |
signIn(java.lang.String username,
java.lang.String password)
Try to logon the user. |
void |
signOut()
Sign the user out. |
Methods inherited from class org.apache.wicket.protocol.http.WebSession |
---|
authenticate, cleanupComponentFeedbackMessages, cleanupFeedbackMessages, getClientInfo, newBrowserInfoPage |
Methods inherited from class org.apache.wicket.Session |
---|
bind, clear, detach, dirty, error, exists, getApplication, getAttribute, getAttributeNames, getAuthorizationStrategy, getClassResolver, getFeedbackMessages, getId, getLocale, getMetaData, getPageFactory, getPageManager, getSessionStore, getSizeInBytes, getStyle, info, invalidateNow, isCurrentRequestValid, isSessionInvalidated, isTemporary, nextPageId, nextSequenceValue, onEvent, removeAttribute, replaceSession, setAttribute, setClientInfo, setLocale, setMetaData, setStyle, warn |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AuthenticatedWebSession(Request request)
request
- The current request objectMethod Detail |
---|
public static AuthenticatedWebSession get()
public abstract Roles getRoles()
public final boolean signIn(java.lang.String username, java.lang.String password)
WebSession.authenticate(String, String)
to do the real work
and that is what you need to subclass to provide your own authentication mechanism.
username
- password
-
protected final void signIn(boolean value)
value
- WebSession.authenticate(String, String)
public final boolean isSignedIn()
public void signOut()
public void invalidate()
invalidate
in class WebSession
Session.invalidate()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |