Class AuthConfigurationModelImpl
- java.lang.Object
-
- com.sun.identity.console.base.model.AMModelBase
-
- com.sun.identity.console.authentication.model.AuthConfigurationModelImpl
-
- All Implemented Interfaces:
AuthConfigurationModel,AMAdminConstants,AMModel
public class AuthConfigurationModelImpl extends AMModelBase implements AuthConfigurationModel
This class is responsible for handling authentication configuration operations such as creating/deleting configurations; updating the auth instances that define the configuration, the success url, the failure url, etc... After instantiating the class , initialize should be invoked to set the name of the realm and the configuration begin acted on.
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONFIG_NAME-
Fields inherited from class com.sun.identity.console.base.model.AMModelBase
debug, locale, locationDN
-
Fields inherited from interface com.sun.identity.console.base.model.AMAdminConstants
ADMIN_CONSOLE_SERVICE, ADMIN_DISPLAY_ATTRIBUTE, ADMIN_DISPLAY_READONLY_ATTRIBUTE, AGENT_REPOSITORY_LOCATION_ATTR, AGENTS_NODE_ID, AMSDK_DEBUG_FILENAME, ATTR_USER_OLD_PASSWORD, ATTR_USER_PASSWORD, ATTR_USER_RESOURCE_OFFERING, ATTR_USER_STATUS, AUTH_CONFIG_SERVICE, CDM_CONTENT_TYPE_PROPERTY_NAME, CHOICES, CONFIGURATION_NODE_ID, CONSOLE_DEBUG_FILENAME, CONSOLE_LOCATION_DN, CONSOLE_ORG_CUSTOM_JSP_DIRECTORY, CONSOLE_UM_ENABLED_ATTR, CONSOLE_USER_ATTRS_SEARCH_KEY, CONSOLE_USER_SEARCH_KEY, CONSOLE_USER_SEARCH_RETURN_KEY, CORE_AUTH_SERVICE, CURRENT_ORG, CURRENT_PROFILE, CURRENT_REALM, DEFAULT_RB, DEFAULT_SEARCH_TIMEOUT, DISCOVERY_SERVICE, DISCOVERY_SERVICE_NAME_BOOTSTRAP_RES_OFF, DISCOVERY_SERVICE_NAME_DYNAMIC_DISCO_ENTRIES, DISCOVERY_SERVICE_PROVIDER_RESOURCE_ID_MAPPER, DISCOVERY_SERVICE_PROVIDER_RESOURCE_ID_MAPPER_ID_MAPPER, DISCOVERY_SERVICE_PROVIDER_RESOURCE_ID_MAPPER_PROVIDER_ID, DISPLAY_ATTRIBUTE, DISPLAY_READONLY_ATTRIBUTE, DYN_LINK_COMPONENT_NAME, ENCRYPTED, FED_TAB_ID, G11N_SERIVCE_COMMON_NAME_FORMAT, G11N_SERVICE_NAME, IDREPO_SERVICE_NAME, IMAGES_PRIMARY_PRODUCT_NAME_PNG, OPERATION_ADD, OPERATION_EDIT, OPTIONAL_ATTRIBUTE, ORGANIZATION_NODE_ID, PASSWORD, PERMISSION_DELEGATE, PERMISSION_MODIFY, PERMISSION_READ, PG_SESSION_INIT_PAGETRAIL, PLATFORM_SERVICE, POLICY_SELECTED_RESPONSE_PROVIDER, POLICY_SERVICE, PREVIOUS_ORGANIZATION, PREVIOUS_REALM, PREVIOUS_TAB_ID, PW_RESET_SERVICE, REALM_NODE_ID, REQUIRED_ATTRIBUTE, REST_STS_SERVICE, ROLE_DISPLAY_OPTION_ATTRIBUTE_NAME, SAML_SERVICE, SAVE_VB_NAME, SERVICE_NAME, SESSION_SERVICE, SESSIONS_NODE_ID, SOAP_STS_SERVICE, SSO_TOKEN_LOCALE_ATTRIBUTE_NAME, SSO_TOKEN_ORGANIZATION_ATTRIBUTE_NAME, STRING_ACTIVE, STRING_FALSE, STRING_INACTIVE, SUBJECTS_NODE_ID, TAB_AGENT_PREFIX, TAB_AGENT_PREFIX_INT, URL_LOGIN, URL_LOGOUT, USER_SERVICE, USER_SERVICE_PREFERRED_LOCALE, VALUES
-
Fields inherited from interface com.sun.identity.console.base.model.AMModel
CONSOLE_PAGING_SIZE_ATTR, CONSOLE_SEARCH_RESULT_LIMIT_ATTR, CONSOLE_SEARCH_TIME_LIMIT_ATTR, DEFAULT_PAGE_SIZE, DEFAULT_SEARCH_RESULT_LIMIT, DEFAULT_SEARCH_TIME_LIMIT
-
-
Constructor Summary
Constructors Constructor Description AuthConfigurationModelImpl(jakarta.servlet.http.HttpServletRequest req, Map map)Creates a model instance for configuring the core auth properties.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateAuthConfiguration(String name)Creates a new named authentication configuration object.voiddeleteAuthConfiguration(String realm, Set names)Deletes the named authentication configuration object.MapgetCriteriaMap()Returns aMapobject containing theAuthenticationEntrycriteria flags.StringgetModuleFlag(int idx)Gets the module flag for the given module index in the current authentication configuration attributesStringgetModuleName(int idx)Gets the module name for the given module index in the current authentication configuration attributesStringgetModuleOptions(int idx)Gets the module options string for the given module index in the current authentication configuration attributesstatic SetgetNamedConfigurations(SSOToken ssoToken, String realmName)Returns all the named authentication configurations in the given realm.intgetNumberEntries()Returns the number of entries in the current configuration.StringgetPostProcessingClass(String realm, String config)Returns the value for the post processing class set for the current configuration object.MapgetValues()Returns a map of the attributes that make up an auth config entry.StringgetXMLValue(String realm, String config)Returns the xml blob that represents the auth entries which make up the specified auth configuration.voidinitialize(String realm, String config)Initialize configuration entry information for the given realm and named configuration.voidremoveAuthEntries(Integer[] entries)Remove the entries selected in the UI.voidreset(String realm, String config)Used to restore the config data settings to their original values.voidsetEntries(List entries)Stores locally the list of authentication entries for the auth config object.voidsetPostAuthPropertiesClass(String className)Sets the value for the post authentication properties class.voidsetValues(Map data)Sets the specified attributes in the auth config entry.voidsetXMLValue(String value)Sets the xml blob that represents the auth entries which make up the specified auth configuration.voidstore(String realm, String config)Save the value for the given realm and configuration.-
Methods inherited from class com.sun.identity.console.base.model.AMModelBase
encryptString, getAttributesToDisplay, getAuthenticatedOrgDN, getClientType, getConsoleAttributes, getConsoleDirectory, getErrorString, getGlobalPageSize, getGlobalSearchResultLimit, getGlobalSearchTimeOutLimit, getLocalizedServiceName, getLocalizedServiceName, getLocalizedString, getLocationDN, getLogoutURL, getPageSize, getRandomString, getRealmNames, getResourceBundle, getSearchResultLimit, getSearchTimeOutLimit, getServerInstanceForLogMsg, getServicePropertiesViewBeanURL, getServiceResourceBundle, getServiceSchemaManager, getSpecialUsers, getStartDN, getStartDN, getStartDSDN, getSupportedAgentTypes, getSupportedEntityTypes, getUniversalID, getUserAdditionalSearchAttributes, getUserDisplayAttribute, getUserDisplayName, getUserDN, getUserInfo, getUserLocale, getUserName, getUserOrganization, getUserSearchAttribute, getUserSSOToken, ignoreUserProfile, initialize, isAmadminUser, isAMSDKEnabled, isDisplayed, logEvent, setLocationDN, validateUserStatusEntry
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.sun.identity.console.base.model.AMModel
getClientType, getConsoleDirectory, getErrorString, getLocalizedServiceName, getLocalizedString, getLocationDN, getPageSize, getRandomString, getRealmNames, getServicePropertiesViewBeanURL, getSpecialUsers, getStartDN, getStartDSDN, getSupportedAgentTypes, getSupportedEntityTypes, getUniversalID, getUserDisplayName, getUserDN, getUserLocale, getUserName, getUserSSOToken, ignoreUserProfile, isAmadminUser, isAMSDKEnabled, logEvent, setLocationDN
-
-
-
-
Field Detail
-
CONFIG_NAME
public static final String CONFIG_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AuthConfigurationModelImpl
public AuthConfigurationModelImpl(jakarta.servlet.http.HttpServletRequest req, Map map)Creates a model instance for configuring the core auth properties.- Parameters:
req- TheHttpServletRequestobject.map- of user information.
-
-
Method Detail
-
getValues
public Map getValues() throws AMConsoleException
Returns a map of the attributes that make up an auth config entry. The map will contain the success and failure url lists, the post processing class, and the list of auth modules that make up the auth configuration entry.- Specified by:
getValuesin interfaceAuthConfigurationModel- Returns:
- Map of attribute values.
- Throws:
AMConsoleException- if there is an error retrieving the data from the entry.
-
getNamedConfigurations
public static Set getNamedConfigurations(SSOToken ssoToken, String realmName)
Returns all the named authentication configurations in the given realm.- Parameters:
ssoToken- Single Sign On token.realmName- where the configuration will be created- Returns:
- set of named authentication configurations
-
createAuthConfiguration
public void createAuthConfiguration(String name) throws AMConsoleException
Creates a new named authentication configuration object. This object will be used by the various objects for authentication.- Specified by:
createAuthConfigurationin interfaceAuthConfigurationModel- Parameters:
name- used to reference the configuration.- Throws:
AMConsoleException- if the configuration cannot be created.
-
deleteAuthConfiguration
public void deleteAuthConfiguration(String realm, Set names) throws AMConsoleException
Deletes the named authentication configuration object.- Specified by:
deleteAuthConfigurationin interfaceAuthConfigurationModel- Parameters:
realm- name where configuration is locate.names- names of entries.- Throws:
AMConsoleException
-
setValues
public void setValues(Map data)
Sets the specified attributes in the auth config entry. The data will not be committed to the data store untilstore()is called.- Specified by:
setValuesin interfaceAuthConfigurationModel- Parameters:
data- that will be set in the config entry.
-
getPostProcessingClass
public String getPostProcessingClass(String realm, String config)
Returns the value for the post processing class set for the current configuration object. If the value is not present the emptry string will be returned.- Specified by:
getPostProcessingClassin interfaceAuthConfigurationModel- Parameters:
realm- name where configuration is locate.config- name of entry.- Returns:
- value of postprocessing class
-
getModuleFlag
public String getModuleFlag(int idx)
Gets the module flag for the given module index in the current authentication configuration attributes- Specified by:
getModuleFlagin interfaceAuthConfigurationModel- Parameters:
idx- the index of the module to retrieve Flag from.- Returns:
- the module flag
-
getModuleOptions
public String getModuleOptions(int idx)
Gets the module options string for the given module index in the current authentication configuration attributes- Specified by:
getModuleOptionsin interfaceAuthConfigurationModel- Parameters:
idx- the index of the module to retrieve Flag from.- Returns:
- the module options string
-
getModuleName
public String getModuleName(int idx)
Gets the module name for the given module index in the current authentication configuration attributes- Specified by:
getModuleNamein interfaceAuthConfigurationModel- Parameters:
idx- the index of the module to retrieve name from.- Returns:
- the module name
-
getNumberEntries
public int getNumberEntries()
Returns the number of entries in the current configuration.- Specified by:
getNumberEntriesin interfaceAuthConfigurationModel- Returns:
- number of entries
-
getXMLValue
public String getXMLValue(String realm, String config)
Returns the xml blob that represents the auth entries which make up the specified auth configuration.- Specified by:
getXMLValuein interfaceAuthConfigurationModel- Parameters:
realm- name where configuration exists.config- name of the configuration object.- Returns:
- String xml blob.
-
setXMLValue
public void setXMLValue(String value)
Sets the xml blob that represents the auth entries which make up the specified auth configuration.- Specified by:
setXMLValuein interfaceAuthConfigurationModel- Parameters:
value- of the xml blob.
-
removeAuthEntries
public void removeAuthEntries(Integer[] entries)
Remove the entries selected in the UI. This is done by creating a new List of the selected entries, then removing that List from the original list of all the entries.- Specified by:
removeAuthEntriesin interfaceAuthConfigurationModel- Parameters:
entries- array of index id's
-
setEntries
public void setEntries(List entries)
Stores locally the list of authentication entries for the auth config object.- Specified by:
setEntriesin interfaceAuthConfigurationModel- Parameters:
entries- list ofAuthConfigurationEntryobjects.
-
setPostAuthPropertiesClass
public void setPostAuthPropertiesClass(String className)
Sets the value for the post authentication properties class.- Specified by:
setPostAuthPropertiesClassin interfaceAuthConfigurationModel- Parameters:
className- name of the class used for post authentication processing
-
store
public void store(String realm, String config) throws AMConsoleException
Save the value for the given realm and configuration.- Specified by:
storein interfaceAuthConfigurationModel- Parameters:
realm- name where configuration is locate.config- name of entry.- Throws:
AMConsoleException
-
reset
public void reset(String realm, String config)
Used to restore the config data settings to their original values.- Specified by:
resetin interfaceAuthConfigurationModel- Parameters:
realm- name where configuration is locate.config- name of entry.
-
initialize
public void initialize(String realm, String config)
Initialize configuration entry information for the given realm and named configuration.- Specified by:
initializein interfaceAuthConfigurationModel- Parameters:
realm- name where configuration is locate.config- name of entry.
-
getCriteriaMap
public Map getCriteriaMap()
Returns aMapobject containing theAuthenticationEntrycriteria flags. The key is the value and the display string is the value.- Specified by:
getCriteriaMapin interfaceAuthConfigurationModel- Returns:
- map of criteria values.
-
-