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 void
configChanged(ConfigurationActionEvent e)
This method will be invoked when a component's configuration data has been changed.static boolean
encryptNIinSessionContext()
Returns flag used by the IDP to decide ifNameIdentifier
inSessionContext
needs to be encrypted for discovery bootstrapping.static Authorizer
getAuthorizer()
Returns theAuthorizer
specified in the discovery service.static com.sun.identity.liberty.ws.disco.plugins.jaxb.DiscoEntryElement
getBootstrappingDiscoEntry()
Returns theDiscoEntryElement
of the discovery service configured for bootstrapping.static ResourceIDMapper
getDefaultResourceIDMapper()
Returns the defaultResourceIDMapper
of the discovery service.static DiscoEntryHandler
getDiscoEntryHandler()
Returns theDiscoEntryHandler
specified in the discovery service.static String
getDiscoProviderID()
Returns the provider ID for Discovery Service.static DiscoEntryHandler
getGlobalEntryHandler()
Returns the glbalDiscoEntryHandler
for business-to-enterprise (B2E) scenarios.static NameIdentifierMapper
getNameIdentifierMapper()
Returns theNameIdentifierMapper
class specified in the discovery service.static ResourceIDMapper
getResourceIDMapper(String providerID)
Returns theResourceIDMapper
associated with the providerID.static Set
getSupportedAuthenticationMechanisms()
Returns the Set ofSecurityMechID
s that the discovery service supports.static Set
getSupportedDirectives()
Returns the Set ofDirective
s that the discovery service supports.static boolean
needPolicyEvalLookup()
Returns a boolean value which indicates whether policy evaluation is needed for discovery lookup.static boolean
needPolicyEvalUpdate()
Returns a boolean value which indicates whether policy evaluation is needed for discovery update.static boolean
needSessionContextStatement()
Returns flag used by the IDP to decide ifSessionContextStatement
needs to be generated for discovery bootstrapping.static boolean
useImpliedResource()
Returns flag used by the IDP/AuthnSvc to decide whether to use implied resource for discovery bootstrapping.static boolean
useResponseAuthentication()
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:
configChanged
in 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 ofSecurityMechID
s that the discovery service supports. A set of default values will be configured during installation time.- Returns:
- Set of
SecurityMechID
s that the discovery service supports.
-
getSupportedDirectives
public static Set getSupportedDirectives()
Returns the Set ofDirective
s that the discovery service supports.- Returns:
- Set of
Directive
s 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 theAuthorizer
specified in the discovery service. If noAuthorizer
is configured, an instance ofDefaultDiscoAuthorizer
will be returned.- Returns:
- Authorizer configured in discovery service.
-
getNameIdentifierMapper
public static NameIdentifierMapper getNameIdentifierMapper()
Returns theNameIdentifierMapper
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 theDiscoEntryHandler
specified in the discovery service.- Returns:
- DiscoEntryHandler of the service.
null
if no handler is configured.
-
getGlobalEntryHandler
public static DiscoEntryHandler getGlobalEntryHandler()
Returns the glbalDiscoEntryHandler
for business-to-enterprise (B2E) scenarios. This handler is invoked when the resource id is implied.
-
getResourceIDMapper
public static ResourceIDMapper getResourceIDMapper(String providerID)
Returns theResourceIDMapper
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 matchingResourceIDMapper
in the configuration. Caller could callDiscoServiceManager.getDefaultResourceIDMapper()
to obtain the defaultResourceIDMapper
.
-
getDefaultResourceIDMapper
public static ResourceIDMapper getDefaultResourceIDMapper()
Returns the defaultResourceIDMapper
of the discovery service.- Returns:
- ResourceIDMapper of the discovery service.
-
getBootstrappingDiscoEntry
public static com.sun.identity.liberty.ws.disco.plugins.jaxb.DiscoEntryElement getBootstrappingDiscoEntry()
Returns theDiscoEntryElement
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 ifSessionContextStatement
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 ifNameIdentifier
inSessionContext
needs to be encrypted for discovery bootstrapping.- Returns:
- true if
NameIdentifier
inSessionContext
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.
-
-