org.apache.wicket.examples.signin2
Class SignIn2Session

java.lang.Object
  extended by org.apache.wicket.Session
      extended by org.apache.wicket.protocol.http.WebSession
          extended by org.apache.wicket.examples.signin2.SignIn2Session
All Implemented Interfaces:
java.io.Serializable, IClusterable

public final class SignIn2Session
extends WebSession

Session class for signin example. Holds and authenticates users.

Author:
Jonathan Locke
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.wicket.Session
Session.IPageMapVisitor, Session.PageMapAccessMetaData
 
Field Summary
 
Fields inherited from class org.apache.wicket.Session
PAGEMAP_ACCESS_MDK, SESSION_ATTRIBUTE_NAME
 
Constructor Summary
protected SignIn2Session(WebApplication application, Request request)
          Constructor
 
Method Summary
 boolean authenticate(java.lang.String username, java.lang.String password)
          Checks the given username and password, returning a User object if if the username and password identify a valid user.
 java.lang.String getUser()
           
 boolean isSignedIn()
           
 void setUser(java.lang.String user)
           
 
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, detach, dirty, error, exists, findOrCreate, findOrCreate, get, 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

SignIn2Session

protected SignIn2Session(WebApplication application,
                         Request request)
Constructor

Parameters:
application - The application
request - The current request object
Method Detail

authenticate

public final boolean authenticate(java.lang.String username,
                                  java.lang.String password)
Checks the given username and password, returning a User object if if the username and password identify a valid user.

Parameters:
username - The username
password - The password
Returns:
True if the user was authenticated

isSignedIn

public boolean isSignedIn()
Returns:
True if user is signed in

getUser

public java.lang.String getUser()
Returns:
User

setUser

public void setUser(java.lang.String user)
Parameters:
user - New user


Copyright © 2004-2010 Apache Software Foundation. All Rights Reserved.