Class ClaimSourceConfigurationUtil

  • Direct Known Subclasses:
    LDAPConfigurationUtil

    public class ClaimSourceConfigurationUtil
    extends Object
    This is a utility that will take a claim source and make a configuration for it.

    Created by Jeff Gaynor
    on 7/23/18 at 3:49 PM

    • Constructor Detail

      • ClaimSourceConfigurationUtil

        public ClaimSourceConfigurationUtil()
    • Method Detail

      • getComponentName

        public String getComponentName()
      • isInstanceOf

        public boolean isInstanceOf​(net.sf.json.JSONObject jsonObject)
        Returns if the JSON is the type for for this utility. The basic form of a JSON object for this is
             {"type":{config}}
         
        and all this does is check that the type matches the getComponentName().
        Parameters:
        jsonObject -
        Returns:
      • createConfiguration

        public ClaimSourceConfiguration createConfiguration()
        Override as needed to create a new configuration of the right type.
        Returns:
      • getConfiguration

        public ClaimSourceConfiguration getConfiguration​(edu.uiuc.ncsa.security.core.util.MyLoggingFacade logger,
                                                         org.apache.commons.configuration.tree.ConfigurationNode node)
        Populate a ClaimSourceConfiguration NOTE the node is assumed to be for the form {"componentName":{}} where the key is the component name is the claim source, e.g. ldap that is used. The default is "default". The vlaue is the actual configuration. This lets you stick these all over the place and they stay encapsulated nicely in JSON configuration files.

        The value will be of the form {"enabled":"true",...} (so all the tags are top-level in it).

        Parameters:
        logger -
        node -
        Returns:
      • toJSON

        public net.sf.json.JSONObject toJSON​(ClaimSourceConfiguration config)
        Note that is is assumed that the json object is the correct
        Parameters:
        config -
        Returns:
      • getJSONUtil

        protected JSONUtil getJSONUtil()