Enabling and Disabling Username Reservation

11-60 Oracle Fusion Middleware Users Guide for Oracle Identity Manager public String getDescriptionLocale locale; } This plug-in point is exposed as a kernel plug-in that takes request data as input and returns the username. Each plug-in expects some information and generates username based on that information provided. The policy implementations generate the username, check for its availability, and if the username is not available, then generate other username based on the policy in the order mentioned in Table 11–8 , and repeat the procedure. The dollar sign in the username generation indicates random alphabet. If any of the expected information is missing, then the policies generate errors. The username generation is exposed as public APIs in User Manager. Oracle Identity Manager provides an utility class for accessing the functionality of generating user names. The class that contains utility methods is as shown: oracle.iam.identity.usermgmt.api.UserManager This class exposes the following main methods: Method that will generate username based on default policy public String generateUserNameHashMapString, String requestData throws UserNameGenerationException Method that will generate username based on policy public String generateUserNameString policyID, HashMap requestData throws UserNameGenerationException Method that will check whether username is valid against default policy public boolean isUserNameValidString userName, HashMapString, String reqData Method that will check whether username is valid against given policy public boolean isUserNameValidString userName, String userNamePolicyPluginID, HashMapString, String requestData Method to return all policies including customer written public ListMapString, String getAllUserNamePoliciesLocale locale Method that will return policy description in given locale public String getPolicyDescriptionString policyID, Locale locale Table 11–9 lists the constants defined in the UserManager class to represent the policy ID of the default username policies: Table 11–9 Constants Representing Policy IDs Policy Name Constant EmailUserNamePolicy EMAIL_ID_POLICY LastNameFirstInitialLocaleP olicy FIRSTNAME_LASTNAME_POLICY FirstInitialLastNameLocaleP olicy LASTNAME_FIRSTNAME_POLICY LastNameFirstInitialPolicy FIRSTINITIAL_LASTNAME_POLICY FirstInitialLastNamePolicy LASTNAME_FIRSTINITIAL_POLICY LastNameFirstNamePolicy FIRSTINITIAL_LASTNAME_LOCALE_POLICY FirstNameLastNamePolicy LASTNAME_FIRSTINITIAL_LOCALE_POLICY Managing Users 11-61 When called to generate username, the policy classes expect the attribute values to be set in a map by using the key constants defined in the oracle.iam.identity.utils class.Constants. This means that a proper parameter value must be passed to call the method by using the appropriate constant defined for it, for example, the FirstName parameter has a constant defined for it. The default username policy can be configured by using Oracle Identity Manager Administration. To do so: 1. Navigate to the System Configuration section. 2. Search for all the system properties.

3. Click Default policy for username generation. The System Property Detail page

for the selected property is displayed, as shown in Figure 11–8 : Figure 11–8 The Default Username Policy Configuration The XL.DefaultUserNameImpl system property is provided for picking up the default policy implementation. By default, it points to the default username policy, which is oracle.iam.identity.usermgmt.impl.plugins.DefaultComboPolicy displayed in the Value field.

4. In the Value field, enter oracle.iam.identity.usermgmt.impl.plugins.POLICY.

Here, POLICY is one of the policy implementations. DefaultComboPolicy DEFAULT_COMBO_POLICY LastNamePolicy LASTNAME_POLICY LastNameLocalePolicy LASTNAME_LOCALE_POLICY FirstNameLastNamePolicyF orAD FIRSTNAME_LASTNAME_POLICY_FOR_AD LastNameFirstNamePolicyF orAD LASTNAME_FIRSTNAME_POLICY_FOR_AD Table 11–9 Cont. Constants Representing Policy IDs Policy Name Constant