Class DefaultPasswordGenerator

java.lang.Object
com.broadleafcommerce.auth.user.service.password.DefaultPasswordGenerator
All Implemented Interfaces:
PasswordGenerator

public class DefaultPasswordGenerator extends Object implements PasswordGenerator
Default implementation of PasswordGenerator.
  • Field Details

    • RANDOM

      protected static final Random RANDOM
  • Constructor Details

    • DefaultPasswordGenerator

      public DefaultPasswordGenerator()
  • Method Details

    • generateSecurePassword

      public String generateSecurePassword()
      This implementation attempts to stay in line with the requirements of DefaultPasswordRequestValidator.
      Specified by:
      generateSecurePassword in interface PasswordGenerator
      Returns:
      a random plaintext password
    • addAllCharsFromStringToList

      protected void addAllCharsFromStringToList(String source, List<Character> destination)
    • randomAlphabetic

      protected String randomAlphabetic(int count)
    • randomNumeric

      protected String randomNumeric(int count)
    • randomSpecialCharacters

      protected String randomSpecialCharacters(int count)
    • getAllowedSpecialCharacters

      protected char[] getAllowedSpecialCharacters()