public class ClassAuthentication extends Object
Cloud object for the calling code (See ContextProvider). Which code contains what user, is configured in the resource
security/<classauthentication.xml> (it basicly conects certain classes to users). Multiple
of those sources can be available (any jar can provide one). In case a class matches multiple
entries in one of these XML, the can be assigned weight
(and resources have a weight too, see ResourceLoader), and the 'heaviest'
matching entry prevails.
Most Authentication implementations support the 'authentication type'
'class', which is then implemented using classCheck(String) or classCheck(String, Map).
In case an existing authentication implementation does not support class authentication
by itself (all implementations in the MMBase repository ClassAuthenticationWrapper.ClassAuthenticationWrapper| Modifier and Type | Class and Description |
|---|---|
static class |
ClassAuthentication.Login
A structure to hold the login information.
|
static class |
ClassAuthentication.LoginResult |
| Modifier and Type | Field and Description |
|---|---|
static String |
DTD_CLASSSECURITY_1_0 |
static String |
PUBLIC_ID_CLASSSECURITY_1_0 |
(package private) static ResourceWatcher |
watcher |
| Modifier and Type | Method and Description |
|---|---|
static ClassAuthentication.Login |
classCheck(String application) |
static ClassAuthentication.LoginResult |
classCheck(String application,
Map<String,?> properties)
Checks wether the (indirectly) calling class is authenticated by the
ClassAuthenticationWrapper (using a stack trace).
|
protected static void |
load(String configFile)
Reads the configuration file and instantiates and loads the wrapped Authentication.
|
(package private) static void |
stopWatching()
Stop watchin the config file, if there is watched one.
|
public static final String PUBLIC_ID_CLASSSECURITY_1_0
public static final String DTD_CLASSSECURITY_1_0
static ResourceWatcher watcher
static void stopWatching()
protected static void load(String configFile) throws SecurityException
SecurityExceptionpublic static ClassAuthentication.LoginResult classCheck(String application, Map<String,?> properties)
application - Only checks this 'authentication application'. Can be null to
check for every application.null if not.public static ClassAuthentication.Login classCheck(String application)
MMBase 1.9-SNAPSHOT - ${javadoctimestamp}