Class DefaultAuthorizationCallback

java.lang.Object
All Implemented Interfaces:
IConfigurable, AuthorizationCallback
Direct Known Subclasses:
PropertiesFileAuthorizationCallback, XmlFileAuthorizationCallback

public class DefaultAuthorizationCallback
extends SimpleAuthorizationCallback
implements IConfigurable
Implements authorization information retrieval from configuration object. This implementation can be used to directly store authorization information in a global config without loading extra information from other files.

Configuration:

 <AuthorizationCallback class="rs.baselib.security.DefaultAuthorizationCallback">
    <login>my-user-name</login>
    <password>my-password</password>
 </AuthorizationCallback>
 
Author:
Ralph Schuster
  • Constructor Details

    • DefaultAuthorizationCallback

      public DefaultAuthorizationCallback()
      Default Constructor.
    • DefaultAuthorizationCallback

      public DefaultAuthorizationCallback​(java.lang.String name, java.lang.String password)
      Constructor.
      Parameters:
      name - name or login name
      password - password for login
  • Method Details

    • configure

      public void configure​(org.apache.commons.configuration.Configuration config) throws org.apache.commons.configuration.ConfigurationException
      Configures the callback. Configuration object must must contain two elements <login> and <password>.
      Specified by:
      configure in interface IConfigurable
      Parameters:
      config - - configuration object
      Throws:
      org.apache.commons.configuration.ConfigurationException - - when configuration fails