org.mmbase.security
Class MMBaseCopConfig

java.lang.Object
  |
  +--org.mmbase.security.MMBaseCopConfig

public class MMBaseCopConfig
extends java.lang.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.


Constructor Summary
MMBaseCopConfig(MMBaseCop mmbaseCop, java.io.File configFile)
          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(java.lang.String key)
          checks if the received shared secret is equals to your own shared secret
 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.
 java.lang.String getSharedSecret()
          get the shared Secret
 void startWatching()
          starts tracking changes on the files...
 void stopWatching()
          stops tracking changes on the files...
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MMBaseCopConfig

public MMBaseCopConfig(MMBaseCop mmbaseCop,
                       java.io.File configFile)
                throws java.io.IOException,
                       java.lang.NoSuchMethodException,
                       SecurityException
The constructor, will load the classes for authorization and authentication with their config files, as specied in the xml from configUrl
Throws:
java.io.IOException - When reading the file failed
java.lang.NoSuchMethodException - When a tag was not specified
SecurityException - When the class could not be loaded
Method Detail

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.

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(java.lang.String key)
checks if the received shared secret is equals to your own shared secret
Parameters:
receive - shared secret
Returns:
true if received shared secret equals your own shared secret

stopWatching

public void stopWatching()
stops tracking changes on the files...

startWatching

public void startWatching()
starts tracking changes on the files...

getSharedSecret

public java.lang.String getSharedSecret()
get the shared Secret
Returns:
the shared Secret


MMBase 2002