Class DiscoServiceManager
- java.lang.Object
-
- com.sun.identity.liberty.ws.disco.common.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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigChanged(ConfigurationActionEvent e)This method will be invoked when a component's configuration data has been changed.static booleanencryptNIinSessionContext()Returns flag used by the IDP to decide ifNameIdentifierinSessionContextneeds to be encrypted for discovery bootstrapping.static AuthorizergetAuthorizer()Returns theAuthorizerspecified in the discovery service.static com.sun.identity.liberty.ws.disco.plugins.jaxb.DiscoEntryElementgetBootstrappingDiscoEntry()Returns theDiscoEntryElementof the discovery service configured for bootstrapping.static ResourceIDMappergetDefaultResourceIDMapper()Returns the defaultResourceIDMapperof the discovery service.static DiscoEntryHandlergetDiscoEntryHandler()Returns theDiscoEntryHandlerspecified in the discovery service.static StringgetDiscoProviderID()Returns the provider ID for Discovery Service.static DiscoEntryHandlergetGlobalEntryHandler()Returns the glbalDiscoEntryHandlerfor business-to-enterprise (B2E) scenarios.static NameIdentifierMappergetNameIdentifierMapper()Returns theNameIdentifierMapperclass specified in the discovery service.static ResourceIDMappergetResourceIDMapper(String providerID)Returns theResourceIDMapperassociated with the providerID.static SetgetSupportedAuthenticationMechanisms()Returns the Set ofSecurityMechIDs that the discovery service supports.static SetgetSupportedDirectives()Returns the Set ofDirectives that the discovery service supports.static booleanneedPolicyEvalLookup()Returns a boolean value which indicates whether policy evaluation is needed for discovery lookup.static booleanneedPolicyEvalUpdate()Returns a boolean value which indicates whether policy evaluation is needed for discovery update.static booleanneedSessionContextStatement()Returns flag used by the IDP to decide ifSessionContextStatementneeds to be generated for discovery bootstrapping.static booleanuseImpliedResource()Returns flag used by the IDP/AuthnSvc to decide whether to use implied resource for discovery bootstrapping.static booleanuseResponseAuthentication()Returns flag used by Discovery Service to decide whether Response is always authenticated or not.
-
-
-
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:
configChangedin interfaceConfigurationListener- 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 ofSecurityMechIDs 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 ofDirectives 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 theAuthorizerspecified in the discovery service. If noAuthorizeris configured, an instance ofDefaultDiscoAuthorizerwill be returned.- Returns:
- Authorizer configured in discovery service.
-
getNameIdentifierMapper
public static NameIdentifierMapper getNameIdentifierMapper()
Returns theNameIdentifierMapperclass specified in the discovery service.- Returns:
- instance of
NameIdentifierMapperclass.nullif no handler is configured, or unable to instantiate the mapper class.
-
getDiscoEntryHandler
public static DiscoEntryHandler getDiscoEntryHandler()
Returns theDiscoEntryHandlerspecified in the discovery service.- Returns:
- DiscoEntryHandler of the service.
nullif no handler is configured.
-
getGlobalEntryHandler
public static DiscoEntryHandler getGlobalEntryHandler()
Returns the glbalDiscoEntryHandlerfor business-to-enterprise (B2E) scenarios. This handler is invoked when the resource id is implied.
-
getResourceIDMapper
public static ResourceIDMapper getResourceIDMapper(String providerID)
Returns theResourceIDMapperassociated with the providerID.- Parameters:
providerID- a provider's ID- Returns:
- ResourceIDMapper associated with providerID. Null will be
returned if
providerIDis null, or couldn't find the matchingResourceIDMapperin the configuration. Caller could callDiscoServiceManager.getDefaultResourceIDMapper()to obtain the defaultResourceIDMapper.
-
getDefaultResourceIDMapper
public static ResourceIDMapper getDefaultResourceIDMapper()
Returns the defaultResourceIDMapperof the discovery service.- Returns:
- ResourceIDMapper of the discovery service.
-
getBootstrappingDiscoEntry
public static com.sun.identity.liberty.ws.disco.plugins.jaxb.DiscoEntryElement getBootstrappingDiscoEntry()
Returns theDiscoEntryElementof 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 ifSessionContextStatementneeds to be generated for discovery bootstrapping.- Returns:
- true if
SessionContextStatementneeds to be generated; false otherwise.
-
encryptNIinSessionContext
public static boolean encryptNIinSessionContext()
Returns flag used by the IDP to decide ifNameIdentifierinSessionContextneeds to be encrypted for discovery bootstrapping.- Returns:
- true if
NameIdentifierinSessionContextneeds 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.
-
-