org.apache.wicket.examples.authentication1
Class SignInSession
java.lang.Object
org.apache.wicket.Session
org.apache.wicket.protocol.http.WebSession
org.apache.wicket.authroles.authentication.AbstractAuthenticatedWebSession
org.apache.wicket.authroles.authentication.AuthenticatedWebSession
org.apache.wicket.examples.authentication1.SignInSession
- All Implemented Interfaces:
- Serializable, IEventSink, IClusterable
public final class SignInSession
- extends AuthenticatedWebSession
Session class for signin example. Holds and authenticates users.
- Author:
- Jonathan Locke
- See Also:
- Serialized Form
Methods inherited from class org.apache.wicket.Session |
bind, clear, debug, detach, dirty, error, exists, fatal, getApplication, getAttribute, getAttributeNames, getAuthorizationStrategy, getClassResolver, getFeedbackMessages, getId, getLocale, getMetaData, getPageFactory, getPageManager, getSessionStore, getSizeInBytes, getStyle, info, internalDetach, invalidateNow, isCurrentRequestValid, isSessionInvalidated, isTemporary, nextPageId, nextSequenceValue, onEvent, removeAttribute, replaceSession, setAttribute, setClientInfo, setLocale, setMetaData, setStyle, success, warn |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SignInSession
protected SignInSession(Request request)
- Constructor
- Parameters:
request
-
authenticate
public final boolean authenticate(String username,
String password)
- Checks the given username and password, returning a User object if if the username and
password identify a valid user.
- Overrides:
authenticate
in class WebSession
- Parameters:
username
- The usernamepassword
- The password
- Returns:
- True if the user was authenticated
getUser
public String getUser()
- Returns:
- User
setUser
public void setUser(String user)
- Parameters:
user
- New user
getRoles
public Roles getRoles()
- Specified by:
getRoles
in class AbstractAuthenticatedWebSession
- Returns:
- Get the roles that this session can play
- See Also:
org.apache.wicket.authentication.AuthenticatedWebSession#getRoles()
Copyright © 2006-2012 Apache Software Foundation. All Rights Reserved.