org.mmbase.security
Class Authentication

java.lang.Object
  |
  +--org.mmbase.security.Authentication
Direct Known Subclasses:
AuthenticationHandler, ContextAuthentication, NoAuthentication

public abstract class Authentication
extends java.lang.Object

This class is a empty implementation of the Authentication, it will only return that the authentication succeeded. To make your own implementation of authorization, you have to extend this class.


Field Summary
protected  java.io.File configFile
          The absolute file which is the config file
protected  FileWatcher fileWatcher
          The file watcher
protected  MMBaseCop manager
          The SecurityManager, who created this instance
 
Constructor Summary
Authentication()
           
 
Method Summary
abstract  boolean isValid(UserContext usercontext)
          The method returns the Rank of a UserContext
protected abstract  void load()
          This method could be overrided by an extending class.
 void load(MMBaseCop manager, FileWatcher fileWatcher, java.lang.String configPath)
          The method which sets the settings of this class.
abstract  UserContext login(java.lang.String application, java.util.HashMap loginInfo, java.lang.Object[] parameters)
          The method which sets the settings of this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

manager

protected MMBaseCop manager
The SecurityManager, who created this instance

configFile

protected java.io.File configFile
The absolute file which is the config file

fileWatcher

protected FileWatcher fileWatcher
The file watcher
Constructor Detail

Authentication

public Authentication()
Method Detail

load

public final void load(MMBaseCop manager,
                       FileWatcher fileWatcher,
                       java.lang.String configPath)
The method which sets the settings of this class. This method is shouldn't be overrided. This class will set the member variables of this class and then call the member function load();
Parameters:
manager - The class that created this instance.
fileWatcher - checks the files
configPath - The url which contains the config information for. the authorization.

load

protected abstract void load()
This method could be overrided by an extending class. It should set the settings for this class, and when needed retrieve them from the file at location configPath.

login

public abstract UserContext login(java.lang.String application,
                                  java.util.HashMap loginInfo,
                                  java.lang.Object[] parameters)
                           throws SecurityException
The method which sets the settings of this class. This method is shouldn't be overrided. This class will set the member variables of this class and then call the member function load();
Parameters:
manager - The class that created this instance.
configPath - The url which contains the config information for. the authorization.
parameters - a list of optional parameters, may also be null
Returns:
nullThrows:
SecurityException - When something strang happend

isValid

public abstract boolean isValid(UserContext usercontext)
                         throws SecurityException
The method returns the Rank of a UserContext
Parameters:
usercontext - The UserContext of which we want to know the rights
Returns:
true when valid, otherwise false
Throws:
SecurityException - When something strang happend


MMBase 2001