org.apache.wicket.examples.authentication3
Class MyAuthenticatedWebSession

java.lang.Object
  extended by org.apache.wicket.Session
      extended by org.apache.wicket.protocol.http.WebSession
          extended by org.apache.wicket.authroles.authentication.AbstractAuthenticatedWebSession
              extended by org.apache.wicket.authroles.authentication.AuthenticatedWebSession
                  extended by org.apache.wicket.examples.authentication3.MyAuthenticatedWebSession
All Implemented Interfaces:
java.io.Serializable, IEventSink, IClusterable

public class MyAuthenticatedWebSession
extends AuthenticatedWebSession

Authenticated session subclass. Note that it is derived from AuthenticatedWebSession which is defined in the auth-role module.

Author:
Jonathan Locke
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.wicket.Session
clientInfo, SESSION_ATTRIBUTE_NAME
 
Constructor Summary
MyAuthenticatedWebSession(Request request)
          Construct.
 
Method Summary
 boolean authenticate(java.lang.String username, java.lang.String password)
          Note: You must subclass WebSession and implement your own.
 Roles getRoles()
           
 
Methods inherited from class org.apache.wicket.authroles.authentication.AuthenticatedWebSession
get, invalidate, isSignedIn, signIn, signIn, signOut
 
Methods inherited from class org.apache.wicket.protocol.http.WebSession
cleanupComponentFeedbackMessages, cleanupFeedbackMessages, getClientInfo, newBrowserInfoPage
 
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
 

Constructor Detail

MyAuthenticatedWebSession

public MyAuthenticatedWebSession(Request request)
Construct.

Parameters:
request - The current request object
Method Detail

authenticate

public boolean authenticate(java.lang.String username,
                            java.lang.String password)
Description copied from class: WebSession
Note: You must subclass WebSession and implement your own. We didn't want to make it abstract to force every application to implement it. Instead we throw an exception.

Overrides:
authenticate in class WebSession
Parameters:
username - The username
password - The password
Returns:
True if the user was authenticated successfully
See Also:
org.apache.wicket.authentication.AuthenticatedWebSession#authenticate(java.lang.String, java.lang.String)

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-2011 Apache Software Foundation. All Rights Reserved.