org.mmbase.security
Class Authentication

java.lang.Object
  extended byorg.mmbase.security.Configurable
      extended byorg.mmbase.security.Authentication
Direct Known Subclasses:
Authenticate, Authenticate, AuthenticationHandler, ContextAuthentication, NoAuthentication

public abstract class Authentication
extends Configurable

This class is a abstract implementation of the Authentication. To make your own implementation of authentication, you have to extend this class.

Version:
$Id: Authentication.java,v 1.22 2004/03/26 15:48:26 michiel Exp $
Author:
Eduard Witteveen, Michiel Meeuwissen (javadocs)

Field Summary
 
Fields inherited from class org.mmbase.security.Configurable
configFile, fileWatcher, manager
 
Constructor Summary
Authentication()
           
 
Method Summary
abstract  boolean isValid(UserContext userContext)
          The method returns wether the UserContext has become invalid for some reason (change in security config?)
abstract  UserContext login(java.lang.String application, java.util.Map loginInfo, java.lang.Object[] parameters)
          This method will verify the login, and give a UserContext back if the login procedure was successful.
 
Methods inherited from class org.mmbase.security.Configurable
load, load
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Authentication

public Authentication()
Method Detail

login

public abstract UserContext login(java.lang.String application,
                                  java.util.Map loginInfo,
                                  java.lang.Object[] parameters)
                           throws SecurityException
This method will verify the login, and give a UserContext back if the login procedure was successful.

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

isValid

public abstract boolean isValid(UserContext userContext)
                         throws SecurityException
The method returns wether the UserContext has become invalid for some reason (change in security config?)

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 build 1.7.1.20041002