org.appng.core.security

## Class DefaultPasswordPolicy

- java.lang.Object
- - org.appng.core.security.DefaultPasswordPolicy

- All Implemented Interfaces:
    PasswordPolicy

  Deprecated.
  use `ConfigurablePasswordPolicy` instead

      @Deprecated
      public class DefaultPasswordPolicy
      extends Object
      implements PasswordPolicy

  The default `PasswordPolicy` requiring 6 to 64 non-whitespace characters for a valid password.
  Author:
    Matthias Müller

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.appng.api.auth.PasswordPolicy

      `PasswordPolicy.ValidationResult`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `ERROR_MSSG_KEY` Deprecated.
    `static String` | `REGEX` Deprecated.

    - ### Fields inherited from interface org.appng.api.auth.PasswordPolicy

      `LOWERCASE, NUMBER, PUNCT, UPPERCASE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultPasswordPolicy()` Deprecated.
    `DefaultPasswordPolicy(String regEx, String errorMessageKey)` Deprecated.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `configure(Properties platformConfig)` Deprecated. Configures the `PasswordPolicy`
    `String` | `generatePassword()` Deprecated. Generates a new random password that matches the requirements and returns it.
    `String` | `getErrorMessageKey()` Deprecated. Returns the message-key of an errormessage for the case that the password doesn't match the requirements.
    `Pattern` | `getPattern()` Deprecated.
    `boolean` | `isValidPassword(char[] password)` Deprecated. Checks whether the given character-sequence is a valid password.
    `PasswordPolicy.ValidationResult` | `validatePassword(String username, char[] currentPassword, char[] password)` Deprecated. Validates the password an returns a `PasswordPolicy.ValidationResult`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### REGEX

          public static final String REGEX

      Deprecated.
      See Also:
        Constant Field Values

    - #### ERROR_MSSG_KEY

          public static final String ERROR_MSSG_KEY

      Deprecated.

  - ### Constructor Detail

    - #### DefaultPasswordPolicy

          @Deprecated
          public DefaultPasswordPolicy()

      Deprecated.

    - #### DefaultPasswordPolicy

          @Deprecated
          public DefaultPasswordPolicy(String regEx,
                                                   String errorMessageKey)

      Deprecated.

  - ### Method Detail

    - #### configure

          public void configure(Properties platformConfig)

      Deprecated.
      Description copied from interface: `PasswordPolicy`
      Configures the `PasswordPolicy`
      Specified by:
        `configure` in interface `PasswordPolicy`
      Parameters:
        `platformConfig` - the platform's `Properties`

    - #### isValidPassword

          public boolean isValidPassword(char[] password)

      Deprecated.
      Description copied from interface: `PasswordPolicy`
      Checks whether the given character-sequence is a valid password.
      Specified by:
        `isValidPassword` in interface `PasswordPolicy`
      Parameters:
        `password` - the character-sequence sequence to check
      Returns:
        `true` if the character-sequence is a valid password, `false` otherwise

    - #### validatePassword

          public PasswordPolicy.ValidationResult validatePassword(String username,
                                                                  char[] currentPassword,
                                                                  char[] password)

      Deprecated.
      Description copied from interface: `PasswordPolicy`
      Validates the password an returns a `PasswordPolicy.ValidationResult`
      Specified by:
        `validatePassword` in interface `PasswordPolicy`
      Parameters:
        `username` - the username (can be `null`)
        `currentPassword` - the current password (can be `null`)
        `password` - the new password (must not be `null`)
      Returns:
        the validation result

    - #### getErrorMessageKey

          public String getErrorMessageKey()

      Deprecated.
      Description copied from interface: `PasswordPolicy`
      Returns the message-key of an errormessage for the case that the password doesn't match the requirements.
      Specified by:
        `getErrorMessageKey` in interface `PasswordPolicy`
      Returns:
        the message key

    - #### getPattern

          public Pattern getPattern()

      Deprecated.

    - #### generatePassword

          public String generatePassword()

      Deprecated.
      Description copied from interface: `PasswordPolicy`
      Generates a new random password that matches the requirements and returns it.
      Specified by:
        `generatePassword` in interface `PasswordPolicy`
      Returns:
        the randomly generated password

Copyright © 2011–2023 aiticon GmbH. All rights reserved.