Class PasswordUtil

java.lang.Object
com.ssgllc.fish.service.util.registered.PasswordUtil

@Component public class PasswordUtil extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    PasswordUtil(com.ssgllc.fish.service.cache.EntityConfigCacheService entityConfigCacheService)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static com.ssgllc.fish.validation.ValidationResult
    checkDictWord(String password, String errorMessage)
     
    static com.ssgllc.fish.validation.ValidationResult
    checkMinValidations(Integer noOfValidationsToMatch, com.ssgllc.fish.validation.ValidationResult validation1, com.ssgllc.fish.validation.ValidationResult validation2, com.ssgllc.fish.validation.ValidationResult validation3, com.ssgllc.fish.validation.ValidationResult validation4, String errorMessage)
     
    static com.ssgllc.fish.validation.ValidationResult
    checkNumberOfDigits(Integer minDigitCount, String password, String errorMessage)
    Checks whether a password contains the required number of digits.
    static com.ssgllc.fish.validation.ValidationResult
    checkNumberOfLowercase(Integer minLowerCaseCount, String password, String errorMessage)
    Checks whether a password contains the required number of lowercase letters.
    static com.ssgllc.fish.validation.ValidationResult
    checkNumberOfSpecial(Integer minSepcialCharCount, String password, String errorMessage)
    Checks whether a password contains the required number of special characters.
    static com.ssgllc.fish.validation.ValidationResult
    checkNumberOfUppercase(Integer minUpperCaseCount, String password, String errorMessage)
    Checks whether a password contains the required number of uppercase letters.
    static com.ssgllc.fish.validation.ValidationResult
    checkPasswordHistory(Integer recentPassCount, String userId, String password, List<com.ssgllc.fish.domain.gen.User> userRevisions, String errorMessage)
     
    static com.ssgllc.fish.validation.ValidationResult
    checkPasswordLength(Integer minLength, Integer maxLength, String password, String errorMessage)
    Checks whether a password meets the minimum length requirement.
    static com.ssgllc.fish.validation.ValidationResult
    checkRepeatCount(Integer length, Integer count, String password, String errorMessage)
    Checks whether a password contains the required number of repeated characters.
    static com.ssgllc.fish.validation.ValidationResult
    checkSequenceCount(Integer minAcceptableSeq, String password, String errorMessage)
    Checks whether a password contains the required number of sequential characters.
    static void
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PasswordUtil

      public PasswordUtil(com.ssgllc.fish.service.cache.EntityConfigCacheService entityConfigCacheService) throws org.springframework.beans.BeansException
      Throws:
      org.springframework.beans.BeansException
  • Method Details

    • checkPasswordLength

      public static com.ssgllc.fish.validation.ValidationResult checkPasswordLength(Integer minLength, Integer maxLength, String password, String errorMessage)
      Checks whether a password meets the minimum length requirement.
      Parameters:
      minLength - The minimum length required for the password.
      maxLength - The maximum length allowed for the password.
      password - The password to check.
      errorMessage - The error message to display if the password is invalid.
      Returns:
      A ValidationResult object indicating whether the password meets the length requirement.
    • checkNumberOfUppercase

      public static com.ssgllc.fish.validation.ValidationResult checkNumberOfUppercase(Integer minUpperCaseCount, String password, String errorMessage)
      Checks whether a password contains the required number of uppercase letters.
      Parameters:
      minUpperCaseCount - The minimum number of uppercase letters required for the password.
      password - The password to check.
      errorMessage - The error message to display if the password is invalid.
      Returns:
      A ValidationResult object indicating whether the password meets the uppercase letter requirement.
    • checkNumberOfLowercase

      public static com.ssgllc.fish.validation.ValidationResult checkNumberOfLowercase(Integer minLowerCaseCount, String password, String errorMessage)
      Checks whether a password contains the required number of lowercase letters.
      Parameters:
      minLowerCaseCount - The minimum number of lowercase letters required for the password.
      password - The password to check.
      errorMessage - The error message to display if the password is invalid.
      Returns:
      A ValidationResult object indicating whether the password meets the lowercase letter requirement.
    • checkNumberOfDigits

      public static com.ssgllc.fish.validation.ValidationResult checkNumberOfDigits(Integer minDigitCount, String password, String errorMessage)
      Checks whether a password contains the required number of digits.
      Parameters:
      minDigitCount - The minimum number of digits required for the password.
      password - The password to check.
      errorMessage - The error message to display if the password is invalid.
      Returns:
      A ValidationResult object indicating whether the password meets the digit requirement.
    • checkNumberOfSpecial

      public static com.ssgllc.fish.validation.ValidationResult checkNumberOfSpecial(Integer minSepcialCharCount, String password, String errorMessage)
      Checks whether a password contains the required number of special characters.
      Parameters:
      minSepcialCharCount - The minimum number of special characters required for the password.
      password - The password to check.
      errorMessage - The error message to display if the password is invalid.
      Returns:
      A ValidationResult object indicating whether the password meets the special character requirement.
    • checkSequenceCount

      public static com.ssgllc.fish.validation.ValidationResult checkSequenceCount(Integer minAcceptableSeq, String password, String errorMessage)
      Checks whether a password contains the required number of sequential characters.
      Parameters:
      minAcceptableSeq - The minimum number of sequential characters allowed in the password.
      password - The password to check.
      errorMessage - The error message to display if the password is invalid.
      Returns:
      A ValidationResult object indicating whether the password meets the sequential character requirement.
    • checkRepeatCount

      public static com.ssgllc.fish.validation.ValidationResult checkRepeatCount(Integer length, Integer count, String password, String errorMessage)
      Checks whether a password contains the required number of repeated characters.
      Parameters:
      length - The length of the repeated character sequence.
      count - The maximum number of allowed repeated sequences.
      password - The password to check.
      errorMessage - The error message to display if the password is invalid.
      Returns:
      A ValidationResult object indicating whether the password meets the repeated character requirement.
    • checkPasswordHistory

      public static com.ssgllc.fish.validation.ValidationResult checkPasswordHistory(Integer recentPassCount, String userId, String password, List<com.ssgllc.fish.domain.gen.User> userRevisions, String errorMessage)
    • createCommonWordsDictionary

      public static void createCommonWordsDictionary()
    • checkDictWord

      public static com.ssgllc.fish.validation.ValidationResult checkDictWord(String password, String errorMessage)
    • checkMinValidations

      public static com.ssgllc.fish.validation.ValidationResult checkMinValidations(Integer noOfValidationsToMatch, com.ssgllc.fish.validation.ValidationResult validation1, com.ssgllc.fish.validation.ValidationResult validation2, com.ssgllc.fish.validation.ValidationResult validation3, com.ssgllc.fish.validation.ValidationResult validation4, String errorMessage)