org.nakedobjects.runtime.authentication.standard
Class AuthenticationManagerStandard

java.lang.Object
  extended by org.nakedobjects.runtime.authentication.standard.AuthenticationManagerStandard
All Implemented Interfaces:
ApplicationScopedComponent, Component, DebugInfo, AuthenticationManager

public class AuthenticationManagerStandard
extends java.lang.Object
implements AuthenticationManager, DebugInfo


Constructor Summary
AuthenticationManagerStandard(NakedObjectConfiguration configuration)
           
 
Method Summary
 void addAuthenticator(Authenticator authenticator)
          Adds an Authenticator.
 AuthenticationSession authenticate(AuthenticationRequest request)
          Caches and returns an authentication AuthenticationSession if the request is valid; otherwise returns null.
 void closeSession(AuthenticationSession session)
           
 void debugData(DebugString debug)
           
 java.lang.String debugTitle()
           
 java.util.List<Authenticator> getAuthenticators()
           
protected  NakedObjectConfiguration getConfiguration()
           
 RandomCodeGenerator getRandomCodeGenerator()
          The RandomCodeGenerator in use.
 void init()
          Will default the RandomCodeGenerator, but Authenticator(s) must have been added or injected.
 boolean isSessionValid(AuthenticationSession session)
          Whether the provided AuthenticationSession is still valid.
 void setAuthenticators(java.util.List<Authenticator> authenticators)
          Provide direct injection.
 void setRandomCodeGenerator(RandomCodeGenerator randomCodeGenerator)
          For injection; will default otherwise.
 void shutdown()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AuthenticationManagerStandard

public AuthenticationManagerStandard(NakedObjectConfiguration configuration)
Method Detail

init

public final void init()
Will default the RandomCodeGenerator, but Authenticator(s) must have been added or injected.

Specified by:
init in interface ApplicationScopedComponent

shutdown

public void shutdown()
Specified by:
shutdown in interface ApplicationScopedComponent

authenticate

public final AuthenticationSession authenticate(AuthenticationRequest request)
Description copied from interface: AuthenticationManager
Caches and returns an authentication AuthenticationSession if the request is valid; otherwise returns null.

Specified by:
authenticate in interface AuthenticationManager

isSessionValid

public final boolean isSessionValid(AuthenticationSession session)
Description copied from interface: AuthenticationManager
Whether the provided AuthenticationSession is still valid.

Specified by:
isSessionValid in interface AuthenticationManager

closeSession

public void closeSession(AuthenticationSession session)
Specified by:
closeSession in interface AuthenticationManager

addAuthenticator

public final void addAuthenticator(Authenticator authenticator)
Adds an Authenticator.

Use either this or alternatively inject the full list of Authenticators.


setAuthenticators

public void setAuthenticators(java.util.List<Authenticator> authenticators)
Provide direct injection.

Use either this or programmatically addAuthenticator(Authenticator).


getAuthenticators

public java.util.List<Authenticator> getAuthenticators()

getRandomCodeGenerator

public RandomCodeGenerator getRandomCodeGenerator()
The RandomCodeGenerator in use.


setRandomCodeGenerator

public void setRandomCodeGenerator(RandomCodeGenerator randomCodeGenerator)
For injection; will default otherwise.


debugTitle

public java.lang.String debugTitle()
Specified by:
debugTitle in interface DebugInfo

debugData

public void debugData(DebugString debug)
Specified by:
debugData in interface DebugInfo

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getConfiguration

protected NakedObjectConfiguration getConfiguration()


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