org.mmbase.security.implementation.context
Class ContextAuthentication
java.lang.Object
org.mmbase.security.Configurable
org.mmbase.security.Authentication
org.mmbase.security.implementation.context.ContextAuthentication
- All Implemented Interfaces:
- AuthenticationData
- public class ContextAuthentication
- extends Authentication
Authentication based on a XML-configuration file. The XML file contains besides users, groups and
contexts (used for ContextAuthorization).
- Version:
- $Id: ContextAuthentication.java,v 1.22 2006/01/17 21:25:28 michiel Exp $
- Author:
- Eduard Witteveen
- See Also:
ContextAuthorization
| 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 |
|
Method Summary |
String[] |
getTypes()
Gives all availabe authentication types. The first one can be used as the default. |
boolean |
isValid(UserContext userContext)
this method does nothing.. |
protected void |
load()
This method should be overrided by an extending class. |
UserContext |
login(String moduleName,
Map loginInfo,
Object[] parameters)
This method will verify the login, and give a UserContext back if the login procedure was successful. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PUBLIC_ID_SECURITY_CONTEXT_CONFIG_1_0
public static final String PUBLIC_ID_SECURITY_CONTEXT_CONFIG_1_0
- Public ID of the Builder DTD version 1.0
- See Also:
- Constant Field Values
PUBLIC_ID_SECURITY_CONTEXT_CONFIG_1_1
public static final String PUBLIC_ID_SECURITY_CONTEXT_CONFIG_1_1
- See Also:
- Constant Field Values
PUBLIC_ID_SECURITY_CONTEXT_CONFIG_1_2
public static final String PUBLIC_ID_SECURITY_CONTEXT_CONFIG_1_2
- See Also:
- Constant Field Values
DTD_SECURITY_CONTEXT_CONFIG_1_0
public static final String DTD_SECURITY_CONTEXT_CONFIG_1_0
- DTD resource filename of the Builder DTD version 1.0
- See Also:
- Constant Field Values
DTD_SECURITY_CONTEXT_CONFIG_1_1
public static final String DTD_SECURITY_CONTEXT_CONFIG_1_1
- See Also:
- Constant Field Values
DTD_SECURITY_CONTEXT_CONFIG_1_2
public static final String DTD_SECURITY_CONTEXT_CONFIG_1_2
- See Also:
- Constant Field Values
ContextAuthentication
public ContextAuthentication()
load
protected void load()
- Description copied from class:
Configurable
- This method should be overrided by an extending class. It should further initialize the
class. It can optionally retrieve settings from the general security configuration file
(available as the 'configFile' member). Security implementations with complicated
configuration would typically retrieve a path to their own configuration file only.
- Specified by:
load in class Configurable
login
public UserContext login(String moduleName,
Map loginInfo,
Object[] parameters)
throws SecurityException
- Description copied from class:
Authentication
- This method will verify the login, and give a UserContext back if the login procedure was successful.
- Specified by:
login in class Authentication
- Parameters:
moduleName - 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 boolean isValid(UserContext userContext)
throws SecurityException
- this method does nothing..
- Parameters:
userContext - The UserContext of which we want to know the rights
- Returns:
true when valid, otherwise false
- Throws:
SecurityException - When something strange happened
getTypes
public String[] getTypes()
- Description copied from class:
Authentication
- Gives all availabe authentication types. The first one can be used as the default.
- Specified by:
getTypes in interface AuthenticationData- Overrides:
getTypes in class Authentication
MMBase build 1.8.1.20060716