org.mmbase.security
Class MMBaseCopConfig

java.lang.Object
  extended by org.mmbase.security.MMBaseCopConfig

public class MMBaseCopConfig
extends Object

This class is the main class of the security system. It loads the authentication and authorization classes if needed, and they can be requested from this manager.

Version:
$Id: MMBaseCopConfig.java 35718 2009-06-04 11:56:57Z michiel $
Author:
Eduard Witteveen
Javadoc:

Field Summary
static String DTD_SECURITY_1_0
          DTD resource filename of the Builder DTD version 1.0
static String PUBLIC_ID_SECURITY_1_0
          Public ID of the Builder DTD version 1.0
static ResourceLoader securityLoader
           
protected  ResourceWatcher watcher
          looks if the files have been changed
 
Constructor Summary
MMBaseCopConfig(MMBaseCop mmbaseCop)
          The constructor, will load the classes for authorization and authentication with their config files, as specied in the xml from configUrl
 
Method Summary
 boolean checkSharedSecret(String received)
          checks if the received shared secret is equals to your own shared secret
 ActionRepository getActionRepository()
           
 boolean getActive()
          Returns the authorization class, which should be used(for optimizations)
 Authentication getAuthentication()
          Returns the authentication class, which should be used.
 Authorization getAuthorization()
          Returns the authorization class, which should be used.
 String getSharedSecret()
          get the shared Secret
(package private)  void load()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

securityLoader

public static final ResourceLoader securityLoader

watcher

protected ResourceWatcher watcher
looks if the files have been changed


PUBLIC_ID_SECURITY_1_0

public static final String PUBLIC_ID_SECURITY_1_0
Public ID of the Builder DTD version 1.0

See Also:
Constant Field Values

DTD_SECURITY_1_0

public static final String DTD_SECURITY_1_0
DTD resource filename of the Builder DTD version 1.0

See Also:
Constant Field Values
Constructor Detail

MMBaseCopConfig

MMBaseCopConfig(MMBaseCop mmbaseCop)
          throws IOException,
                 NoSuchMethodException,
                 SecurityException
The constructor, will load the classes for authorization and authentication with their config files, as specied in the xml from configUrl

Parameters:
mmbaseCop - The MMBaseCop for which this is a configurator
Throws:
IOException - When reading the file failed
.. - When XML not validates.
SecurityException - When the class could not be loaded
NoSuchMethodException
Method Detail

load

void load()
    throws IOException
Throws:
IOException
Since:
MMBase-1.8

getAuthentication

public Authentication getAuthentication()
Returns the authentication class, which should be used.

Returns:
The authentication class which should be used.

getAuthorization

public Authorization getAuthorization()
Returns the authorization class, which should be used.

Returns:
The authorization class which should be used.

getActionRepository

public ActionRepository getActionRepository()

getActive

public boolean getActive()
Returns the authorization class, which should be used(for optimizations)

Returns:
trueWhen the SecurityManager should be used. falseWhen not.

checkSharedSecret

public boolean checkSharedSecret(String received)
checks if the received shared secret is equals to your own shared secret

Parameters:
received - shared secret
Returns:
true if received shared secret equals your own shared secret

getSharedSecret

public String getSharedSecret()
get the shared Secret

Returns:
the shared Secret


MMBase 2.0-SNAPSHOT - null