org.nakedobjects.runtime.authentication.standard.exploration
Class ExplorationAuthenticator

java.lang.Object
  extended by org.nakedobjects.runtime.authentication.standard.AuthenticatorAbstract
      extended by org.nakedobjects.runtime.authentication.standard.exploration.ExplorationAuthenticator
All Implemented Interfaces:
ApplicationScopedComponent, Component, Authenticator

public class ExplorationAuthenticator
extends AuthenticatorAbstract

Creates a session suitable for exploration mode.

If the NakedObjectConfiguration contains the key then returns a MultiUserExplorationSession which encapsulates the details of several users (and their roles). Viewers that are aware of this capability can offer the convenient ability to switch between these users. For viewers that are not aware, the MultiUserExplorationSession appears as a regular session, with the Id of the first user listed.

The format of the key should be:

 &lt:userName> [:<role>[|<role>]...], <userName>...
 


Constructor Summary
ExplorationAuthenticator(NakedObjectConfiguration configuration)
           
 
Method Summary
 AuthenticationSession authenticate(AuthenticationRequest request, java.lang.String code)
          Default implementation returns a SimpleSession; can be overridden if required.
 boolean canAuthenticate(AuthenticationRequest request)
          Can authenticate if a AuthenticationRequestExploration.
 boolean isValid(AuthenticationRequest request)
          Valid providing running in exploration mode.
 
Methods inherited from class org.nakedobjects.runtime.authentication.standard.AuthenticatorAbstract
getConfiguration, getDeploymentType, init, shutdown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExplorationAuthenticator

public ExplorationAuthenticator(NakedObjectConfiguration configuration)
Method Detail

canAuthenticate

public final boolean canAuthenticate(AuthenticationRequest request)
Can authenticate if a AuthenticationRequestExploration.


isValid

public final boolean isValid(AuthenticationRequest request)
Valid providing running in exploration mode.


authenticate

public AuthenticationSession authenticate(AuthenticationRequest request,
                                          java.lang.String code)
Description copied from class: AuthenticatorAbstract
Default implementation returns a SimpleSession; can be overridden if required.

Specified by:
authenticate in interface Authenticator
Overrides:
authenticate in class AuthenticatorAbstract
code - - a hint; is guaranteed to be unique, but the authenticator decides whether to use it or not.
Returns:


Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.