org.mmbase.security
Class NoAuthentication

java.lang.Object
  extended byorg.mmbase.security.Configurable
      extended byorg.mmbase.security.Authentication
          extended byorg.mmbase.security.NoAuthentication
All Implemented Interfaces:
AuthenticationData

public final class NoAuthentication
extends Authentication

This class is used when no authentication is configured. Every credential is rewarded with a UserContext object. So every attempt to log in will succeed.

Version:
$Id: NoAuthentication.java,v 1.9 2005/03/01 14:07:47 michiel Exp $
Author:
Eduard Witteveen
See Also:
UserContext

Field Summary
 
Fields inherited from class org.mmbase.security.Authentication
PARAMETERS_ANONYMOUS, PARAMETERS_NAME_PASSWORD, PARAMETERS_USERS
 
Fields inherited from class org.mmbase.security.Configurable
configFile, configResource, configWatcher, manager
 
Fields inherited from interface org.mmbase.security.AuthenticationData
METHOD_ANONYMOUS, METHOD_ASIS, METHOD_DEFAULT, METHOD_DELEGATE, METHOD_HTTP, METHOD_LOGINPAGE, METHOD_LOGOUT, METHOD_PAGELOGON, METHOD_SESSIONDELEGATE, METHOD_SESSIONLOGON, METHOD_UNSET, PARAMETER_AUTHENTICATE, PARAMETER_LOGOUT, PARAMETER_PASSWORD, PARAMETER_RANK, PARAMETER_SESSIONNAME, PARAMETER_USERNAME, PARAMETER_USERNAMES, STRINGS
 
Constructor Summary
NoAuthentication()
           
 
Method Summary
 boolean isValid(UserContext usercontext)
          Users remain valid always.
protected  void load()
          This method does nothing
 UserContext login(String application, Map loginInfo, Object[] parameters)
          Returns always the same object (an user 'anonymous'with rank 'administrator'')
 
Methods inherited from class org.mmbase.security.Authentication
createParameters, getDefaultMethod, getKey, getMethod, getTypes, getTypes
 
Methods inherited from class org.mmbase.security.Configurable
load
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoAuthentication

public NoAuthentication()
Method Detail

load

protected void load()
This method does nothing

Specified by:
load in class Configurable

login

public UserContext login(String application,
                         Map loginInfo,
                         Object[] parameters)
                  throws SecurityException
Returns always the same object (an user 'anonymous'with rank 'administrator'')

Specified by:
login in class Authentication
Parameters:
application - A String that further specifies the login method (one implementation could handle more then one methods) A typical value might be 'username/password'.
loginInfo - A Map containing the credentials or other objects which might be used to obtain them (e.g. request/response objects). It might also be 'null', in which case your implementation normally should return the 'anonymous' user (or null, if no such user can be defined).
parameters - A list of optional parameters, may also (and will often) be null.
Returns:
nullThrows:
SecurityException - When something strang happened
See Also:
UserContext

isValid

public boolean isValid(UserContext usercontext)
                throws SecurityException
Users remain valid always.

Parameters:
usercontext - The UserContext of which we want to know the rights
Returns:
true
Throws:
SecurityException - When something strange happened


MMBase build 1.8.1.20060716