Class AMAuthLevelManager

  • All Implemented Interfaces:
    ServiceListener

    public class AMAuthLevelManager
    extends Object
    implements ServiceListener
    Manager for module authentication level, this class provides methods to retrieve modules which satisfied specific authentication level requirement. It keeps a cache copy of all module authentication level for all organizations, and implements ServiceListener so the cache could be updated when changes happened.
    • Method Detail

      • getInstance

        public static AMAuthLevelManager getInstance()
        Returns manager instance.
        Returns:
        AMAuthLevelManager.
      • getModulesForLevel

        public Set<String> getModulesForLevel​(int level,
                                              String orgDN,
                                              String clientType)
        Returns modules whose authentication level is equals or bigger than the authentication level specified, am empty set will be returned if organization does not exist, or no matching authentication level could be found.
        Parameters:
        level - Authentication level.
        orgDN - Organization DN.
        clientType - Client Type.
        Returns:
        Set which contains module names, e.g. LDAP, Cert, RADIUS.
      • globalConfigChanged

        public void globalConfigChanged​(String serviceName,
                                        String version,
                                        String groupName,
                                        String serviceComponent,
                                        int type)
        Implements methods in com.sun.identity.sm.ServiceListener
        Specified by:
        globalConfigChanged in interface ServiceListener
        Parameters:
        serviceName - the name of the service whose configuration changed
        version - the version of the service
        groupName - the name of the configuration group that changed
        serviceComponent - the service component that changed
        type - the type of configuration change
      • organizationConfigChanged

        public void organizationConfigChanged​(String serviceName,
                                              String version,
                                              String orgName,
                                              String groupName,
                                              String serviceComponent,
                                              int type)
        Implements methods in com.sun.identity.sm.ServiceListener.
        Specified by:
        organizationConfigChanged in interface ServiceListener
        Parameters:
        serviceName - the name of the service whose configuration changed
        version - the version of the service
        orgName - the name of the organization whose configuration changed
        groupName - the name of the configuration group that changed
        serviceComponent - the service component that changed
        type - the type of configuration change
      • schemaChanged

        public void schemaChanged​(String serviceName,
                                  String version)
        Implements methods in com.sun.identity.sm.ServiceListener.
        Specified by:
        schemaChanged in interface ServiceListener
        Parameters:
        serviceName - the name of the service whose schema changed
        version - the version of the service
      • getLevelForModule

        public int getLevelForModule​(String moduleName,
                                     String orgDN,
                                     String defaultAuthLevel)
      • removeAuthConfigListener

        protected void removeAuthConfigListener​(String configName)
        Removes all service listeners for the specified authentication configuration.
        Parameters:
        configName - Name of authentication configuration.
      • addAuthConfigListener

        protected void addAuthConfigListener​(String service,
                                             String name)
        Register auth config listener for a auth modules or auth configuration service.
        Parameters:
        service - Service name, e.g. iPlanetAMAuthLDAPService
        name - Auth config name