Class AMAuthenticationManager
- java.lang.Object
-
- com.sun.identity.authentication.config.AMAuthenticationManager
-
public class AMAuthenticationManager extends Object
This class provides interfaces to manage authentication module instances.
-
-
Constructor Summary
Constructors Constructor Description AMAuthenticationManager(SSOToken token, String org)Constructs an instance ofAMAuthenticationManagerfor the specified realm to manage the authentication module instances available to this realm.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AMAuthenticationInstancecreateAuthenticationInstance(String name, String type, Map attributes)Creates anAMAuthenticationInstanceinstance with the specified parameters.voiddeleteAuthenticationInstance(String name)Deletes a specified authentication module instance.Set<String>getAllowedModuleNames()Returns a Set of module instance names that is allowed for this organization.AMAuthenticationInstancegetAuthenticationInstance(String authName)Returns theAMAuthenticationInstanceobject whose name is as specified.Set<AMAuthenticationInstance>getAuthenticationInstances()Returns the authentication module instances that are available to this realm except the Application instance which is for internal use only.AMAuthenticationSchemagetAuthenticationSchema(String authType)Returns anAMAuthenticationSchemaobject for the specified authentication type.static StringgetAuthenticationServiceName(String moduleName)Returns authentication service name of a module.static Set<String>getAuthenticationServiceNames()Returns a Set contains all the module service names that are plugged in this server.static Set<String>getAuthenticationTypes()Returns a Set contains all the authentication types that are plugged in this server.StringgetAuthInstanceType(String authName)Returns the type of the authentication module instance with the specified instance name.Set<String>getModuleInstanceNames(String aModuleType)Returns a Set of all registered module instance names for a module type, including both the old instances from 6.3 DIT and the new instances in 7.0.booleanisEditable(AMAuthenticationInstance instance)Returnstrueif this authentication module instance editable by this user and/or in this realm.static voidreInitializeAuthServices()Re-initializes the module services.static voidupdateModuleInstanceTable(String realm, String serviceName)Updates the module instance table for the authentication service if the module instance table was already cached for the provided realm.
-
-
-
Constructor Detail
-
AMAuthenticationManager
public AMAuthenticationManager(SSOToken token, String org) throws AMConfigurationException
Constructs an instance ofAMAuthenticationManagerfor the specified realm to manage the authentication module instances available to this realm.- Parameters:
token- Single sign on token of the user identity on whose behalf the operations are performed.org- The realm in which the module instance management is performed.- Throws:
AMConfigurationException- if Service Management related error occurs.
-
-
Method Detail
-
reInitializeAuthServices
public static void reInitializeAuthServices()
Re-initializes the module services. This method is meant for global authentication configuration change.
-
getAuthenticationTypes
public static Set<String> getAuthenticationTypes()
Returns a Set contains all the authentication types that are plugged in this server.- Returns:
- Set of String values of the authentication types available on this server.
-
getAuthenticationServiceNames
public static Set<String> getAuthenticationServiceNames()
Returns a Set contains all the module service names that are plugged in this server.- Returns:
- Set of String values of the module service names available on this server.
-
getAuthenticationServiceName
public static String getAuthenticationServiceName(String moduleName)
Returns authentication service name of a module.- Parameters:
moduleName- Name of authentication module.- Returns:
- authentication service name of a module.
-
updateModuleInstanceTable
public static void updateModuleInstanceTable(String realm, String serviceName)
Updates the module instance table for the authentication service if the module instance table was already cached for the provided realm.- Parameters:
realm- The realm where the configuration has changed.serviceName- The authentication module's service name.
-
getAuthenticationSchema
public AMAuthenticationSchema getAuthenticationSchema(String authType) throws AMConfigurationException
Returns anAMAuthenticationSchemaobject for the specified authentication type.- Parameters:
authType- Type of the authentication module instance.- Returns:
AMAuthenticationSchemaobject of the specified authentication type.- Throws:
AMConfigurationException- if error occurred during retrieving the service schema.
-
getAuthenticationInstance
public AMAuthenticationInstance getAuthenticationInstance(String authName)
Returns theAMAuthenticationInstanceobject whose name is as specified. Name uniqueness is required for the instances among the same realm, as well as the instances that are available to this realm.- Parameters:
authName- Authentication instance name.- Returns:
- The
AMAuthenticationInstanceobject that is associated with the authentication instance name.
-
getAuthInstanceType
public String getAuthInstanceType(String authName)
Returns the type of the authentication module instance with the specified instance name.
-
getModuleInstanceNames
public Set<String> getModuleInstanceNames(String aModuleType)
Returns a Set of all registered module instance names for a module type, including both the old instances from 6.3 DIT and the new instances in 7.0.
-
getAllowedModuleNames
public Set<String> getAllowedModuleNames()
Returns a Set of module instance names that is allowed for this organization. Since this is only needed for 6.3 and earlier, for 7.0 it returns an empty set.- Returns:
- a Set of String values for module instance names.
-
getAuthenticationInstances
public Set<AMAuthenticationInstance> getAuthenticationInstances()
Returns the authentication module instances that are available to this realm except the Application instance which is for internal use only.- Returns:
- A Set of
AMAuthenticationInstanceobjects that are available to this realm.
-
createAuthenticationInstance
public AMAuthenticationInstance createAuthenticationInstance(String name, String type, Map attributes) throws AMConfigurationException
Creates anAMAuthenticationInstanceinstance with the specified parameters.- Parameters:
name- Name of the authentication module instance.type- Type of the authentication module instance.attributes- A Map of parameters for this module instance.- Returns:
AMAuthenticationInstanceobject is newly created.- Throws:
AMConfigurationException- if error occurred during the authentication creation.
-
deleteAuthenticationInstance
public void deleteAuthenticationInstance(String name) throws AMConfigurationException
Deletes a specified authentication module instance.- Parameters:
name- Name of the authentication module instance going to be deleted.- Throws:
AMConfigurationException- if it fails to delete the authentication instance.
-
isEditable
public boolean isEditable(AMAuthenticationInstance instance)
Returnstrueif this authentication module instance editable by this user and/or in this realm.- Parameters:
instance- The authentication module instance.- Returns:
trueif editable.
-
-