Class AuthConfigurationModelImpl

  • All Implemented Interfaces:
    AuthConfigurationModel, AMAdminConstants, AMModel

    public class AuthConfigurationModelImpl
    extends AMModelBase
    implements AuthConfigurationModel
    This class is responsible for handling authentication configuration operations such as creating/deleting configurations; updating the auth instances that define the configuration, the success url, the failure url, etc... After instantiating the class , initialize should be invoked to set the name of the realm and the configuration begin acted on.
    • Constructor Detail

      • AuthConfigurationModelImpl

        public AuthConfigurationModelImpl​(jakarta.servlet.http.HttpServletRequest req,
                                          Map map)
        Creates a model instance for configuring the core auth properties.
        Parameters:
        req - The HttpServletRequest object.
        map - of user information.
    • Method Detail

      • getValues

        public Map getValues()
                      throws AMConsoleException
        Returns a map of the attributes that make up an auth config entry. The map will contain the success and failure url lists, the post processing class, and the list of auth modules that make up the auth configuration entry.
        Specified by:
        getValues in interface AuthConfigurationModel
        Returns:
        Map of attribute values.
        Throws:
        AMConsoleException - if there is an error retrieving the data from the entry.
      • getNamedConfigurations

        public static Set getNamedConfigurations​(SSOToken ssoToken,
                                                 String realmName)
        Returns all the named authentication configurations in the given realm.
        Parameters:
        ssoToken - Single Sign On token.
        realmName - where the configuration will be created
        Returns:
        set of named authentication configurations
      • setValues

        public void setValues​(Map data)
        Sets the specified attributes in the auth config entry. The data will not be committed to the data store until store() is called.
        Specified by:
        setValues in interface AuthConfigurationModel
        Parameters:
        data - that will be set in the config entry.
      • getPostProcessingClass

        public String getPostProcessingClass​(String realm,
                                             String config)
        Returns the value for the post processing class set for the current configuration object. If the value is not present the emptry string will be returned.
        Specified by:
        getPostProcessingClass in interface AuthConfigurationModel
        Parameters:
        realm - name where configuration is locate.
        config - name of entry.
        Returns:
        value of postprocessing class
      • getModuleFlag

        public String getModuleFlag​(int idx)
        Gets the module flag for the given module index in the current authentication configuration attributes
        Specified by:
        getModuleFlag in interface AuthConfigurationModel
        Parameters:
        idx - the index of the module to retrieve Flag from.
        Returns:
        the module flag
      • getModuleOptions

        public String getModuleOptions​(int idx)
        Gets the module options string for the given module index in the current authentication configuration attributes
        Specified by:
        getModuleOptions in interface AuthConfigurationModel
        Parameters:
        idx - the index of the module to retrieve Flag from.
        Returns:
        the module options string
      • getModuleName

        public String getModuleName​(int idx)
        Gets the module name for the given module index in the current authentication configuration attributes
        Specified by:
        getModuleName in interface AuthConfigurationModel
        Parameters:
        idx - the index of the module to retrieve name from.
        Returns:
        the module name
      • getNumberEntries

        public int getNumberEntries()
        Returns the number of entries in the current configuration.
        Specified by:
        getNumberEntries in interface AuthConfigurationModel
        Returns:
        number of entries
      • getXMLValue

        public String getXMLValue​(String realm,
                                  String config)
        Returns the xml blob that represents the auth entries which make up the specified auth configuration.
        Specified by:
        getXMLValue in interface AuthConfigurationModel
        Parameters:
        realm - name where configuration exists.
        config - name of the configuration object.
        Returns:
        String xml blob.
      • setXMLValue

        public void setXMLValue​(String value)
        Sets the xml blob that represents the auth entries which make up the specified auth configuration.
        Specified by:
        setXMLValue in interface AuthConfigurationModel
        Parameters:
        value - of the xml blob.
      • removeAuthEntries

        public void removeAuthEntries​(Integer[] entries)
        Remove the entries selected in the UI. This is done by creating a new List of the selected entries, then removing that List from the original list of all the entries.
        Specified by:
        removeAuthEntries in interface AuthConfigurationModel
        Parameters:
        entries - array of index id's
      • setEntries

        public void setEntries​(List entries)
        Stores locally the list of authentication entries for the auth config object.
        Specified by:
        setEntries in interface AuthConfigurationModel
        Parameters:
        entries - list of AuthConfigurationEntry objects.
      • setPostAuthPropertiesClass

        public void setPostAuthPropertiesClass​(String className)
        Sets the value for the post authentication properties class.
        Specified by:
        setPostAuthPropertiesClass in interface AuthConfigurationModel
        Parameters:
        className - name of the class used for post authentication processing
      • reset

        public void reset​(String realm,
                          String config)
        Used to restore the config data settings to their original values.
        Specified by:
        reset in interface AuthConfigurationModel
        Parameters:
        realm - name where configuration is locate.
        config - name of entry.
      • initialize

        public void initialize​(String realm,
                               String config)
        Initialize configuration entry information for the given realm and named configuration.
        Specified by:
        initialize in interface AuthConfigurationModel
        Parameters:
        realm - name where configuration is locate.
        config - name of entry.
      • getCriteriaMap

        public Map getCriteriaMap()
        Returns a Map object containing the AuthenticationEntry criteria flags. The key is the value and the display string is the value.
        Specified by:
        getCriteriaMap in interface AuthConfigurationModel
        Returns:
        map of criteria values.