com.ibm.openpages.api.security

## Interface IPasswordPolicy

-     public interface IPasswordPolicy

  Interface for OpenPages password policy information.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getMaxLength()` Returns the maximum length for a password.
    `int` | `getMinLength()` Returns the minimum length for a valid password.The default value is 6.
    `boolean` | `isValidPassword(java.lang.String userName, java.lang.String password)` Validates a password based on the password policy for the specified user.
    `boolean` | `strongPasswordEnforced()` If strong password policy is enforced, each password will be required to contain at least one character from each group configured by admin.

- - ### Method Detail

    - #### isValidPassword

          boolean isValidPassword(java.lang.String userName,
                                  java.lang.String password)

      Validates a password based on the password policy for the specified user. Validates that the password length is less than the maximum and greater than the minimum length allowed by the platform. Validates that the password does not contains spaces. If strong password policy is enforced, it validates that strong password policy criteria is met.
      Parameters:
        `userName` - (required) the userName for a specific user
        `password` - (required) the password for userName
      Returns:
        true if the specified credentials are valid; otherwise, returns false

    - #### strongPasswordEnforced

          boolean strongPasswordEnforced()

      If strong password policy is enforced, each password will be required to contain at least one character from each group configured by admin. Strong passwords include letters, numbers, and symbols.
      Returns:
        true if strong password policy is enforced, otherwise false.

    - #### getMaxLength

          int getMaxLength()

      Returns the maximum length for a password. The default value is 32.
      Returns:
        an integer representing the maximum allowable length for a password

    - #### getMinLength

          int getMinLength()

      Returns the minimum length for a valid password.The default value is 6.
      Returns:
        an integer representing the minimum allowable length for a password

Licensed Materials - Property of IBM
OpenPages with Watson (PID: 5725-D51)
© Copyright IBM Corporation 2013, 2022. All Rights Reserved.
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.