Class DiscoServiceManager

  • All Implemented Interfaces:
    ConfigurationListener

    public class DiscoServiceManager
    extends Object
    implements ConfigurationListener
    This is a singleton class. It reads the current values from Discovery Service configuration and updates the values by listening to Discovery Service configuration events.
    • Method Detail

      • configChanged

        public void configChanged​(ConfigurationActionEvent e)
        This method will be invoked when a component's configuration data has been changed. The parameters componentName, realm and configName denotes the component name, organization and configuration instance name that are changed respectively.
        Specified by:
        configChanged in interface ConfigurationListener
        Parameters:
        e - Configuration action event, like ADDED, DELETED, MODIFIED etc.
      • getDiscoProviderID

        public static String getDiscoProviderID()
        Returns the provider ID for Discovery Service. Null would be returned if it's not configured in the admin console. During installation, a default value will be configured.
        Returns:
        provider ID of discovery service.
      • getSupportedAuthenticationMechanisms

        public static Set getSupportedAuthenticationMechanisms()
        Returns the Set of SecurityMechIDs that the discovery service supports. A set of default values will be configured during installation time.
        Returns:
        Set of SecurityMechIDs that the discovery service supports.
      • getSupportedDirectives

        public static Set getSupportedDirectives()
        Returns the Set of Directives that the discovery service supports.
        Returns:
        Set of Directives the discovery service supports.
      • needPolicyEvalLookup

        public static boolean needPolicyEvalLookup()
        Returns a boolean value which indicates whether policy evaluation is needed for discovery lookup.
        Returns:
        true if policy evaluation is needed for discovery lookup; false otherwise.
      • needPolicyEvalUpdate

        public static boolean needPolicyEvalUpdate()
        Returns a boolean value which indicates whether policy evaluation is needed for discovery update.
        Returns:
        true if policy evaluation is needed for discovery update; false otherwise.
      • getAuthorizer

        public static Authorizer getAuthorizer()
        Returns the Authorizer specified in the discovery service. If no Authorizer is configured, an instance of DefaultDiscoAuthorizer will be returned.
        Returns:
        Authorizer configured in discovery service.
      • getNameIdentifierMapper

        public static NameIdentifierMapper getNameIdentifierMapper()
        Returns the NameIdentifierMapper class specified in the discovery service.
        Returns:
        instance of NameIdentifierMapper class. null if no handler is configured, or unable to instantiate the mapper class.
      • getDiscoEntryHandler

        public static DiscoEntryHandler getDiscoEntryHandler()
        Returns the DiscoEntryHandler specified in the discovery service.
        Returns:
        DiscoEntryHandler of the service. null if no handler is configured.
      • getGlobalEntryHandler

        public static DiscoEntryHandler getGlobalEntryHandler()
        Returns the glbal DiscoEntryHandler for business-to-enterprise (B2E) scenarios. This handler is invoked when the resource id is implied.
      • getResourceIDMapper

        public static ResourceIDMapper getResourceIDMapper​(String providerID)
        Returns the ResourceIDMapper associated with the providerID.
        Parameters:
        providerID - a provider's ID
        Returns:
        ResourceIDMapper associated with providerID. Null will be returned if providerID is null, or couldn't find the matching ResourceIDMapper in the configuration. Caller could call DiscoServiceManager.getDefaultResourceIDMapper() to obtain the default ResourceIDMapper.
      • getDefaultResourceIDMapper

        public static ResourceIDMapper getDefaultResourceIDMapper()
        Returns the default ResourceIDMapper of the discovery service.
        Returns:
        ResourceIDMapper of the discovery service.
      • getBootstrappingDiscoEntry

        public static com.sun.identity.liberty.ws.disco.plugins.jaxb.DiscoEntryElement getBootstrappingDiscoEntry()
        Returns the DiscoEntryElement of the discovery service configured for bootstrapping. Null will be returned if it's not configured. A default value will be configured during installation.
        Returns:
        Bootstrapping DiscoEntryElement
      • needSessionContextStatement

        public static boolean needSessionContextStatement()
        Returns flag used by the IDP to decide if SessionContextStatement needs to be generated for discovery bootstrapping.
        Returns:
        true if SessionContextStatement needs to be generated; false otherwise.
      • encryptNIinSessionContext

        public static boolean encryptNIinSessionContext()
        Returns flag used by the IDP to decide if NameIdentifier in SessionContext needs to be encrypted for discovery bootstrapping.
        Returns:
        true if NameIdentifier in SessionContext needs to be encrypted; false otherwise.
      • useResponseAuthentication

        public static boolean useResponseAuthentication()
        Returns flag used by Discovery Service to decide whether Response is always authenticated or not.
        Returns:
        true if response authentication is used; false otherwise.
      • useImpliedResource

        public static boolean useImpliedResource()
        Returns flag used by the IDP/AuthnSvc to decide whether to use implied resource for discovery bootstrapping.
        Returns:
        true if implied resource is used; false otherwise.