org.apache.wicket.authentication
Class AuthenticatedWebSession
java.lang.Object
org.apache.wicket.Session
org.apache.wicket.protocol.http.WebSession
org.apache.wicket.authentication.AuthenticatedWebSession
- All Implemented Interfaces:
- java.io.Serializable, IClusterable
public abstract class AuthenticatedWebSession
- extends WebSession
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
- Author:
- Jonathan Locke
- See Also:
- Serialized Form
|
Method Summary |
abstract boolean |
authenticate(java.lang.String username,
java.lang.String password)
Authenticates this session using the given username and password |
static AuthenticatedWebSession |
get()
|
abstract Roles |
getRoles()
|
boolean |
isSignedIn()
|
boolean |
signIn(java.lang.String username,
java.lang.String password)
Signs user in by authenticating them with a username and password |
void |
signOut()
Sign the user out. |
| Methods inherited from class org.apache.wicket.Session |
attach, bind, cleanupFeedbackMessages, clear, createAutoPageMap, createAutoPageMapName, currentCreateAutoPageMapCounter, detach, dirty, error, exists, 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, pageMapForName, removeAttribute, removePageMap, set, setApplication, setAttribute, setClientInfo, setLocale, setMetaData, setStyle, touch, unset, update, visitPageMaps, warn |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AuthenticatedWebSession
public AuthenticatedWebSession(AuthenticatedWebApplication application,
Request request)
- Construct.
- Parameters:
application - The web applicationrequest - The current request objectresponse -
get
public static AuthenticatedWebSession get()
- Returns:
- Current authenticated web session
authenticate
public abstract boolean authenticate(java.lang.String username,
java.lang.String password)
- Authenticates this session using the given username and password
- Parameters:
username - The usernamepassword - The password
- Returns:
- True if the user was authenticated successfully
getRoles
public abstract Roles getRoles()
- Returns:
- Get the roles that this session can play
isSignedIn
public final boolean isSignedIn()
- Returns:
- True if the user is signed in to this session
signIn
public final boolean signIn(java.lang.String username,
java.lang.String password)
- Signs user in by authenticating them with a username and password
- Parameters:
username - The usernamepassword - The password
- Returns:
- True if the user was signed in successfully
signOut
public void signOut()
- Sign the user out.
Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.